}
try {
if (description == null) {
Description description;
DescriptionElement descriptionElement;
if (wsdlURI != null && !"".equals(wsdlURI)) {
description = readInTheWSDLFile(wsdlURI);
descriptionElement = description.toElement();
} else if (in != null) {
description = readInTheWSDLFile(in);
descriptionElement = description.toElement();
} else {
throw new AxisFault("No resources found to read the wsdl");
}
savedTargetNamespace = descriptionElement.getTargetNamespace().toString();
namespacemap = descriptionElement.getDeclaredNamespaces();
this.description = description;
}
// Create the namespacemap
stringBasedNamespaceMap = new NamespaceMap();
for (int i = 0; i < namespacemap.length; i++) {
NamespaceDeclaration namespaceDeclaration = namespacemap[i];
stringBasedNamespaceMap.put(namespaceDeclaration.getPrefix(),
namespaceDeclaration.getNamespaceURI().toString());
}
DescriptionElement descriptionElement = description.toElement();
createNamespaceMap(descriptionElement);
setupComplete = true;
} catch (AxisFault e) {
throw e; // just rethrow AxisFaults