• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SchemaImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SharedPreferences类代码示例发布时间:2022-05-22
下一篇:
Java View类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap