本文整理汇总了Java中com.ibm.wsdl.extensions.schema.SchemaImpl类的典型用法代码示例。如果您正苦于以下问题:Java SchemaImpl类的具体用法?Java SchemaImpl怎么用?Java SchemaImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SchemaImpl类属于com.ibm.wsdl.extensions.schema包,在下文中一共展示了SchemaImpl类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parseWSDLTypes
import com.ibm.wsdl.extensions.schema.SchemaImpl; //导入依赖的package包/类
private void parseWSDLTypes( XSOMParser schemaParser )
throws IOException
{
Definition definition = getWSDLDefinition();
if ( definition != null ) {
Types types = definition.getTypes();
if ( types != null ) {
List<ExtensibilityElement> list = types.getExtensibilityElements();
for( ExtensibilityElement element : list ) {
if ( element instanceof SchemaImpl ) {
Element schemaElement = ((SchemaImpl) element).getElement();
Map<String, String> namespaces = definition.getNamespaces();
for( Entry<String, String> entry : namespaces.entrySet() ) {
if ( entry.getKey().equals( "xmlns" ) || entry.getKey().trim().isEmpty() ) {
continue;
}
if ( schemaElement.getAttribute( "xmlns:" + entry.getKey() ).isEmpty() ) {
schemaElement.setAttribute( "xmlns:" + entry.getKey(), entry.getValue() );
}
}
parseSchemaElement( definition, schemaElement, schemaParser );
}
}
}
}
}
开发者ID:jolie,项目名称:jolie,代码行数:27,代码来源:SoapProtocol.java
示例2: toWSDL
import com.ibm.wsdl.extensions.schema.SchemaImpl; //导入依赖的package包/类
/**
* Generates WSDL-document from this web service model
* @param dispatchContext dispatch context where nested service models
* can be found
* @param locationURI SOAP location URI
* @return WSDL-document object model
* @throws GenericServiceException if exception encountered when
* getting nested service model
* @throws SAXException if XML-schema could not be parsed
* @throws WSDLException if XML-schema type could not be found
*/
public Document toWSDL(DispatchContext dispatchContext, String locationURI) throws GenericServiceException, ParserConfigurationException,
SAXException, TransformerException, WSDLException {
if (this.wsdl != null) {
return this.wsdl;
}
WSDLFactory factory = WSDLFactory.newInstance();
Definition definition = factory.newDefinition();
definition.setTargetNamespace(namespace);
definition.addNamespace("tns", namespace);
definition.addNamespace("xsd", ModelService.XSD);
definition.addNamespace("soap", SOAP);
definition.addNamespace("wsse", WSSE);
this.wsdl = modelService.generateWSDL(dispatchContext.getDelegator(), locationURI);
SchemaImpl schemaImpl = makeSchemaImpl(wsdl, namespace);
Element schema = schemaImpl.getElement();
wsdlSchema = makeValidationSchema(schema);
return this.wsdl;
}
开发者ID:gildaslemoal,项目名称:elpi,代码行数:32,代码来源:SoapService.java
示例3: importTypes
import com.ibm.wsdl.extensions.schema.SchemaImpl; //导入依赖的package包/类
private void importTypes(Types types) {
SchemaCompiler compiler = XJC.createSchemaCompiler();
ErrorListener elForRun = new ConsoleErrorReporter();
compiler.setErrorListener(elForRun);
List<?> implementationTypes = types.getExtensibilityElements();
if (implementationTypes.size() == 0) {
return;
}
SchemaImpl impl = (SchemaImpl) implementationTypes.get(0);
S2JJAXBModel intermediateModel = this.compileModel(types, compiler, impl.getElement());
intermediateModel.generateCode(null, elForRun);
Collection<? extends Mapping> mappings = intermediateModel.getMappings();
for (Mapping mapping : mappings){
this.importStructure(mapping);
}
}
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:21,代码来源:CxfWSDLImporter.java
示例4: importTypes
import com.ibm.wsdl.extensions.schema.SchemaImpl; //导入依赖的package包/类
protected void importTypes(Types types) {
SchemaCompiler compiler = XJC.createSchemaCompiler();
ErrorListener elForRun = new ConsoleErrorReporter();
compiler.setErrorListener(elForRun);
SchemaImpl impl = (SchemaImpl) types.getExtensibilityElements().get(0);
S2JJAXBModel intermediateModel = this.compileModel(types, compiler, impl.getElement());
Collection<? extends Mapping> mappings = intermediateModel.getMappings();
for (Mapping mapping : mappings) {
this.importStructure(mapping);
}
}
开发者ID:flowable,项目名称:flowable-engine,代码行数:15,代码来源:CxfWSDLImporter.java
示例5: importTypes
import com.ibm.wsdl.extensions.schema.SchemaImpl; //导入依赖的package包/类
private void importTypes(Types types) {
SchemaCompiler compiler = XJC.createSchemaCompiler();
ErrorListener elForRun = new ConsoleErrorReporter();
compiler.setErrorListener(elForRun);
SchemaImpl impl = (SchemaImpl) types.getExtensibilityElements().get(0);
S2JJAXBModel intermediateModel = this.compileModel(types, compiler, impl.getElement());
Collection<? extends Mapping> mappings = intermediateModel.getMappings();
for (Mapping mapping : mappings){
this.importStructure(mapping);
}
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:15,代码来源:CxfWSDLImporter.java
示例6: makeSchemaImpl
import com.ibm.wsdl.extensions.schema.SchemaImpl; //导入依赖的package包/类
protected SchemaImpl makeSchemaImpl(Document document, String targetNamespace) {
SchemaImpl schemaImpl = new SchemaImpl();
Element schema = null;
NodeList schemaNodes = document.getElementsByTagName("xsd:schema");
if(schemaNodes != null && schemaNodes.getLength() > 0) {
schema = (Element) schemaNodes.item(0);
schemaImpl.setElementType(new QName(ModelService.XSD, "schema"));
}
schemaImpl.setElement(schema);
return schemaImpl;
}
开发者ID:gildaslemoal,项目名称:elpi,代码行数:12,代码来源:SoapService.java
示例7: initXsom
import com.ibm.wsdl.extensions.schema.SchemaImpl; //导入依赖的package包/类
private void initXsom() throws IOException {
try {
SchemaImpl schema = (SchemaImpl) wsdlObject.getTypes()
.getExtensibilityElements().get(0);
Element el = schema.getElement();
InputStream is = prepareSchema(el);
XSOMParser parser = new XSOMParser();
// is needed to read element documentations which are inside
// annotations
parser.setAnnotationParser(new AnnotationFactory());
parser.parse(is);
String targetNamespace = wsdlObject.getTargetNamespace();
if (parser.getResult() == null)
throw new IOException(
"Could not initialize XML Schema");
schemaObject = parser.getResult().getSchema(targetNamespace);
addSchemaElements();
} catch (TransformerException | SAXException e) {
throw new IOException("Problem initializing XML Schema.", e);
}
}
开发者ID:impactcentre,项目名称:iif-generic-soap-client,代码行数:30,代码来源:WsdlDocument.java
注:本文中的com.ibm.wsdl.extensions.schema.SchemaImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论