private static void registerNSDeclarations(NamedNodeMap attrs, Definition def) { 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 (namespaceURI != null && namespaceURI.equals(Constants.NS_URI_XMLNS)) { if (localPart != null && !localPart.equals(Constants.ATTR_XMLNS)) { DOMUtils.registerUniquePrefix(localPart, value, def); } else { DOMUtils.registerUniquePrefix(null, value, def); } } } }
public static QName getQName(String prefixedValue, Element contextEl, Definition def) throws WSDLException { int index = prefixedValue.indexOf(':'); String prefix = (index != -1) ? prefixedValue.substring(0, index) : null; String localPart = prefixedValue.substring(index + 1); String namespaceURI = getNamespaceURIFromPrefix(contextEl, prefix); if (namespaceURI != null) { registerUniquePrefix(prefix, namespaceURI, def); return new QName(namespaceURI, localPart); } else { String faultCode = (prefix == null) ? WSDLException.NO_PREFIX_SPECIFIED : WSDLException.UNBOUND_PREFIX; WSDLException wsdlExc = new WSDLException(faultCode, "Unable to determine " + "namespace of '" + prefixedValue + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(contextEl)); throw wsdlExc; } }
DOMUtils.registerUniquePrefix(prefix, namespaceURI, def);
private static void registerNSDeclarations(NamedNodeMap attrs, Definition def) { 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 (namespaceURI != null && namespaceURI.equals(Constants.NS_URI_XMLNS)) { if (localPart != null && !localPart.equals(Constants.ATTR_XMLNS)) { DOMUtils.registerUniquePrefix(localPart, value, def); } else { DOMUtils.registerUniquePrefix(null, value, def); } } } }
private static void registerNSDeclarations(NamedNodeMap attrs, Definition def) { 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 (namespaceURI != null && namespaceURI.equals(Constants.NS_URI_XMLNS)) { if (localPart != null && !localPart.equals(Constants.ATTR_XMLNS)) { DOMUtils.registerUniquePrefix(localPart, value, def); } else { DOMUtils.registerUniquePrefix(null, value, def); } } } }
public static QName getQName(String prefixedValue, Element contextEl, Definition def) throws WSDLException { int index = prefixedValue.indexOf(':'); String prefix = (index != -1) ? prefixedValue.substring(0, index) : null; String localPart = prefixedValue.substring(index + 1); String namespaceURI = getNamespaceURIFromPrefix(contextEl, prefix); if (namespaceURI != null) { registerUniquePrefix(prefix, namespaceURI, def); return new QName(namespaceURI, localPart); } else { String faultCode = (prefix == null) ? WSDLException.NO_PREFIX_SPECIFIED : WSDLException.UNBOUND_PREFIX; WSDLException wsdlExc = new WSDLException(faultCode, "Unable to determine " + "namespace of '" + prefixedValue + "'."); wsdlExc.setLocation(XPathUtils.getXPathExprFromNode(contextEl)); throw wsdlExc; } }
DOMUtils.registerUniquePrefix(prefix, namespaceURI, def);
DOMUtils.registerUniquePrefix(prefix, namespaceURI, def);