/** * recursively drills down to get namespace pairs in nested imported elements * * @param descriptionElement - a description element from where import elements * and types can be found */ private void createNamespaceMap(DescriptionElement descriptionElement) { ImportElement[] importElements = descriptionElement.getImportElements(); for (int i = 0; i < importElements.length; i++) { DescriptionElement descElem = importElements[i].getDescriptionElement(); NamespaceDeclaration[] namespaceDeclarations = descElem.getDeclaredNamespaces(); for (int j = 0; j < namespaceDeclarations.length; j++) { NamespaceDeclaration importedNamespaceDeclaration = namespaceDeclarations[j]; if (!stringBasedNamespaceMap.containsKey(importedNamespaceDeclaration.getPrefix())) { stringBasedNamespaceMap.put(importedNamespaceDeclaration.getPrefix(), importedNamespaceDeclaration.getNamespaceURI().toString()); } } createNamespaceMap(descElem); // recursively drill down } }
/** * recursively drills down to find all type definitions * (XSD schemas) in all imported WSDLs and XSDs * * @param descriptionElement - a description element from where import elements * and types can be found */ private void processTypes(DescriptionElement descriptionElement) { TypesElement typesElement = descriptionElement .getTypesElement(); if (typesElement != null) { Schema[] schemas = typesElement.getSchemas(); for (int i = 0; i < schemas.length; i++) { XmlSchema schemaDefinition = schemas[i].getSchemaDefinition(); // WSDL 2.0 spec requires that even the built-in schema should be returned // once asked for schema definitions. But for data binding purposes we can ignore that if (schemaDefinition != null && !Constants.URI_2001_SCHEMA_XSD .equals(schemaDefinition.getTargetNamespace())) { axisService.addSchema(schemaDefinition); } } } ImportElement[] importElements = descriptionElement.getImportElements(); for (int i = 0; i < importElements.length; i++) { DescriptionElement descElem = importElements[i].getDescriptionElement(); processTypes(descElem); // recursively drill down } }
/** * recursively drills down to find all type definitions * (XSD schemas) in all imported WSDLs and XSDs * * @param descriptionElement - a description element from where import elements * and types can be found */ private void processTypes(DescriptionElement descriptionElement) { TypesElement typesElement = descriptionElement .getTypesElement(); if (typesElement != null) { Schema[] schemas = typesElement.getSchemas(); for (int i = 0; i < schemas.length; i++) { XmlSchema schemaDefinition = schemas[i].getSchemaDefinition(); // WSDL 2.0 spec requires that even the built-in schema should be returned // once asked for schema definitions. But for data binding purposes we can ignore that if (schemaDefinition != null && !Constants.URI_2001_SCHEMA_XSD .equals(schemaDefinition.getTargetNamespace())) { axisService.addSchema(schemaDefinition); } } } ImportElement[] importElements = descriptionElement.getImportElements(); for (int i = 0; i < importElements.length; i++) { DescriptionElement descElem = importElements[i].getDescriptionElement(); processTypes(descElem); // recursively drill down } }
/** * recursively drills down to get namespace pairs in nested imported elements * * @param descriptionElement - a description element from where import elements * and types can be found */ private void createNamespaceMap(DescriptionElement descriptionElement) { ImportElement[] importElements = descriptionElement.getImportElements(); for (int i = 0; i < importElements.length; i++) { DescriptionElement descElem = importElements[i].getDescriptionElement(); NamespaceDeclaration[] namespaceDeclarations = descElem.getDeclaredNamespaces(); for (int j = 0; j < namespaceDeclarations.length; j++) { NamespaceDeclaration importedNamespaceDeclaration = namespaceDeclarations[j]; if (!stringBasedNamespaceMap.containsKey(importedNamespaceDeclaration.getPrefix())) { stringBasedNamespaceMap.put(importedNamespaceDeclaration.getPrefix(), importedNamespaceDeclaration.getNamespaceURI().toString()); } } createNamespaceMap(descElem); // recursively drill down } }
ImportElement[] imports = descElement.getImportElements(); int numImports = imports.length; for(int i = 0; i < numImports; i++)
ImportElement[] imports = descElement.getImportElements(); int numImports = imports.length; for(int i = 0; i < numImports; i++)
pw.println('>'); printDocumentation(desEle.getDocumentationElements(), desEle, pw); printImports(desEle.getImportElements(), desEle, pw); printIncludes(desEle.getIncludeElements(), desEle, pw); printTypes(desEle.getTypesElement(), desEle, pw);
pw.println('>'); printDocumentation(desEle.getDocumentationElements(), desEle, pw); printImports(desEle.getImportElements(), desEle, pw); printIncludes(desEle.getIncludeElements(), desEle, pw); printTypes(desEle.getTypesElement(), desEle, pw);
pw.println('>'); printDocumentation(desEle.getDocumentationElements(), desEle, pw); printImports(desEle.getImportElements(), desEle, pw); printIncludes(desEle.getIncludeElements(), desEle, pw); printTypes(desEle.getTypesElement(), desEle, pw);
ImportElement[] imports = desc.getImportElements(); for(int i=0; i<imports.length; i++) { ImportElement importElem = (ImportElement) imports[i];
ImportElement[] imports = desc.getImportElements(); for(int i=0; i<imports.length; i++) { ImportElement importElem = (ImportElement) imports[i];