/** * Dereference a qualified name given in the "ns:name" form using the namespace * context of a given element. * * @param prefixedQNameStr qualified name, represented as a prefixed string * @param context context element * @return a resolved {@link QName} * @throws javax.wsdl.WSDLException in case of resolution error (e.g. undefined prefix) */ protected static QName derefQName(String prefixedQNameStr, Element context) throws WSDLException { int idx = prefixedQNameStr.indexOf(":"); String uri; if (idx == -1) { uri = DOMUtils.getNamespaceURIFromPrefix(context, null); } else { if (idx >= prefixedQNameStr.length() || idx == 0) { String msg = __msgs.msgMalformedQName(prefixedQNameStr); throw new WSDLException(WSDLException.INVALID_WSDL, msg); } // Look up the prefix from the namespaces defined *at the element*. String prefix = prefixedQNameStr.substring(0, idx); uri = DOMUtils.getMyNSContext(context).getNamespaceURI(prefix); if (uri == null) { String msg = __msgs.msgInvalidNamespacePrefix(prefix); throw new WSDLException(WSDLException.INVALID_WSDL, msg); } } return new QName(uri, prefixedQNameStr.substring(idx + 1, prefixedQNameStr.length())); }
NSContext nscontext = DOMUtils.getMyNSContext((Element) headerNode); injectNamespaces(hb, nscontext.toMap());
NSContext nscontext = DOMUtils.getMyNSContext(src); injectNamespaces(omElement,nscontext.toMap()); } else {