XMLElement importEl,
DescriptionElement desc,
Map wsdlModules)
throws WSDLException {
ImportElement imp = desc.addImportElement();
String namespaceURI = importEl.getAttributeValue(Constants.ATTR_NAMESPACE);
String locationURI = importEl.getAttributeValue(Constants.ATTR_LOCATION);
parseExtensionAttributes(importEl, ImportElement.class, imp, desc);
if(namespaceURI != null)
{
//TODO handle missing namespace attribute (REQUIRED attr)
imp.setNamespace(getURI(namespaceURI));
}
if(locationURI != null)
{
//TODO handle missing locationURI (OPTIONAL attr)
URI resolvedLocationURI = resolveURI(getURI(locationURI));
imp.setLocation(resolvedLocationURI);
DescriptionElement importedDesc =
getWSDLFromLocation(resolvedLocationURI.toString(), desc, wsdlModules);
imp.setDescriptionElement(importedDesc);
}
return imp;
}