protected void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem) throws WSDLException { Element elem = (Element)xmlElem.getSource(); NamedNodeMap attrs = elem.getAttributes(); int size = attrs.getLength(); for (int i = 0; i < size; i++) { Attr attr = (Attr)attrs.item(i); String namespaceURI = attr.getNamespaceURI(); String localPart = attr.getLocalName(); String value = attr.getValue(); if ((Constants.NS_STRING_XMLNS).equals(namespaceURI)) { if (!(Constants.ATTR_XMLNS).equals(localPart)) { wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace } else { wsdlElem.addNamespace(null, getURI(value)); //the default namespace } } } }
protected void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem) throws WSDLException { Element elem = (Element)xmlElem.getSource(); NamedNodeMap attrs = elem.getAttributes(); int size = attrs.getLength(); for (int i = 0; i < size; i++) { Attr attr = (Attr)attrs.item(i); String namespaceURI = attr.getNamespaceURI(); String localPart = attr.getLocalName(); String value = attr.getValue(); if ((Constants.NS_STRING_XMLNS).equals(namespaceURI)) { if (!(Constants.ATTR_XMLNS).equals(localPart)) { wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace } else { wsdlElem.addNamespace(null, getURI(value)); //the default namespace } } } }
protected void parseNamespaceDeclarations( XMLElement xmlElem, WSDLElement wsdlElem) throws WSDLException { OMElement omDescription = (OMElement)xmlElem.getSource(); Iterator namespaces = omDescription.getAllDeclaredNamespaces(); while(namespaces.hasNext()){ OMNamespace namespace = (OMNamespace)namespaces.next(); String localPart = namespace.getPrefix(); String value = namespace.getNamespaceURI(); if (!(Constants.ATTR_XMLNS).equals(localPart)){ wsdlElem.addNamespace(localPart, getURI(value)); //a prefixed namespace } else{ wsdlElem.addNamespace(null, getURI(value)); //the default namespace } } }