while (prefixMap.containsKey(jaxbPrefix)) { incr++; jaxbPrefix = jaxbPrefix + Integer.toString(incr);
/** * 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 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 } }
if (!xmlsNamespaceMap.containsKey(WSDLConstants.CONVENTIONAL_TNS_PREFIX) if (!xmlsNamespaceMap.containsKey("xsd") && !xmlsNamespaceMap.containsValue(Constants.URI_2001_SCHEMA_XSD)) { xmlsNamespaceMap.add("xsd", Constants.URI_2001_SCHEMA_XSD);
while (prefixmap.containsKey(coxbPrefix)) { coxbPrefix = coxbPrefix + Integer.toString(i); i++;
if (!xmlsNamespaceMap.containsKey(WSDLConstants.CONVENTIONAL_TNS_PREFIX) if (!xmlsNamespaceMap.containsKey("xsd") && !xmlsNamespaceMap.containsValue(Constants.URI_2001_SCHEMA_XSD)) { xmlsNamespaceMap.add("xsd", Constants.URI_2001_SCHEMA_XSD);