当前位置: 首页>>代码示例>>Java>>正文


Java Types.getExtensibilityElements方法代码示例

本文整理汇总了Java中javax.wsdl.Types.getExtensibilityElements方法的典型用法代码示例。如果您正苦于以下问题:Java Types.getExtensibilityElements方法的具体用法?Java Types.getExtensibilityElements怎么用?Java Types.getExtensibilityElements使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.wsdl.Types的用法示例。


在下文中一共展示了Types.getExtensibilityElements方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseWSDLTypes

import javax.wsdl.Types; //导入方法依赖的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: importTypes

import javax.wsdl.Types; //导入方法依赖的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

示例3: extractTypesSchema

import javax.wsdl.Types; //导入方法依赖的package包/类
public static org.jdom.Element extractTypesSchema(Definition wsdlDefinition) {
	org.jdom.Element typesSchemaElm = null;
	if (wsdlDefinition != null) {
		Types types = wsdlDefinition.getTypes();
		if (types != null) {
		    List extensibilityElements = types.getExtensibilityElements();
			for (int i = 0; i < extensibilityElements.size(); i++) {
				ExtensibilityElement schemaExtElem = (ExtensibilityElement) extensibilityElements.get(i);
				if (schemaExtElem != null) {
					QName elementType = schemaExtElem.getElementType();
					if (elementType.getLocalPart().equals("schema")
						&& (schemaExtElem instanceof UnknownExtensibilityElement)) {
						Element element = ((UnknownExtensibilityElement) schemaExtElem).getElement();
						DOMBuilder domBuilder = new DOMBuilder();
						typesSchemaElm = domBuilder.build(element);
					}
				}
			}
		}
	}
	return typesSchemaElm;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:23,代码来源:WSDLUtils.java

示例4: readPackagesFromSchema

import javax.wsdl.Types; //导入方法依赖的package包/类
public Set<String> readPackagesFromSchema(Definition wsdlDefinition)
        throws SchemaReaderException {
    if (wsdlDefinition == null) {
        if (log.isDebugEnabled()) {
            log.debug("Invalid wsdl definition provided, NULL");
        }
        throw new SchemaReaderException(Messages.getMessage("SchemaReaderErr1"));
    }
    this.wsdlDefinition = wsdlDefinition;
    List<Schema> schemaList = new ArrayList<Schema>();
    Set<String> packageList = new TreeSet<String>();
    //Add WSDL TargetNamespace
    String namespace = wsdlDefinition.getTargetNamespace();
    List packages = JavaUtils.getPackagesFromNamespace(namespace);
    if (packages != null && packages.size() > 0) {
        packageList.addAll(packages);   
    }

    //Read All Schema Definition in wsdl;
    Types types = wsdlDefinition.getTypes();
    if (types == null) {
        if (log.isDebugEnabled()) {
            log.debug("WARNING: Could not find any Schema/Types from WSDL");
            log.debug("no packages will derived from WSDL schema");
        }
        return packageList;
    }
    List extensibilityElements = types.getExtensibilityElements();
    for (Object obj : extensibilityElements) {
        if (obj != null && isSchema((ExtensibilityElement)obj)) {
            Schema schema = (Schema)obj;
            //process schemas and read packages from them.
            processSchema(schema, schemaList, packageList);
        }
    }

    //Set always stores unique objects, so I dont have to worry about removing duplicates from this set.
    return packageList;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:40,代码来源:SchemaReaderImpl.java


注:本文中的javax.wsdl.Types.getExtensibilityElements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。