@Override public SOAPElement createElement(String localName, String prefix, String uri) throws SOAPException { return new SOAPElementImpl(localName, prefix, uri); }
@Override public SOAPElement createElement(Name name) throws SOAPException { return new SOAPElementImpl(name); }
@Override public SOAPElement createElement(String localName) throws SOAPException { return new SOAPElementImpl(localName); }
public Element createElement(String tagName) throws DOMException { return new SOAPElementImpl(tagName); }
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { int loc = qualifiedName.indexOf(":"); if (loc == -1) return new SOAPElementImpl(qualifiedName, null, namespaceURI); if (loc == qualifiedName.length() - 1) throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "INVALID_QUALIFIED_NAME")); return new SOAPElementImpl(qualifiedName.substring(loc + 1), qualifiedName.substring(0, loc), namespaceURI); }
/** * Creates a new SOAPElement object initialized with the given Name object and adds the new element to this SOAPElement object. * * @param name a Name object with the XML name for the new element * @return the new SOAPElement object that was created * @throws javax.xml.soap.SOAPException if there is an error in creating the SOAPElement object */ public SOAPElement addChildElement(Name name) throws SOAPException { Document doc = this.element.getOwnerDocument(); Element childEle = null; if (name.getPrefix() == null || name.getPrefix().length() == 0) { childEle = doc.createElementNS(name.getURI(), name.getLocalName()); } else { childEle = doc.createElementNS(name.getURI(), name.getPrefix() + ":" + name.getLocalName()); } SOAPElement child = new SOAPElementImpl(childEle); return addChildElement(child); }