@Override public Name createName(String localName) throws SOAPException { return new NameImpl(localName); }
public Name createName(String localName) throws SOAPException { return new NameImpl(localName); }
public Name createName(String localName, String prefix, String uri) throws SOAPException { return new NameImpl(localName, prefix, uri); }
@Override public Name createName(String localName, String prefix, String uri) throws SOAPException { return new NameImpl(localName, prefix, uri); }
public SOAPFaultImpl(String prefix, String namespace) throws SOAPException { super(new NameImpl("Fault", prefix, namespace)); }
/** * Creates a new SOAPElement object initialized with the specified local name and adds the new element to this SOAPElement object. * * @param name a String giving the local name for the 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(String name) throws SOAPException { Name nameImp = new NameImpl(name); return addChildElement(nameImp); }
/** * Gets the mandatory SOAP 1.1 fault code for this SOAPFault object as a SAAJ Name object. */ public Name getFaultCodeAsName() { return new NameImpl(getFaultCodeAsQName()); }
@Override public SOAPElement createElement(QName qname) throws SOAPException { return createElement(new NameImpl(qname)); }
public boolean removeAttribute(QName qname) { return removeAttribute(new NameImpl(qname)); }
public SOAPElement addChildElement(QName qname) throws SOAPException { return addChildElement(new NameImpl(qname)); }
public String getAttributeValue(QName qname) { return getAttributeValue(new NameImpl(qname)); }
/** * Creates a new SOAPElement object initialized with the specified local name, prefix, and URI and adds the new element to this SOAPElement object. * * @param localName a String giving the local name for the new element * @param prefix a String giving the namespace prefix for the new element * @param uri a String giving the URI of the namespace to which the new element belongs * @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(String localName, String prefix, String uri) throws SOAPException { Name nameImpl = new NameImpl(localName, prefix, uri); return addChildElement(nameImpl); }
public SOAPElement addAttribute(QName qname, String value) throws SOAPException { return addAttribute(new NameImpl(qname), value); }
/** * Returns the name of this SOAPElement object. * * @return a Name object with the name of this SOAPElement object */ public Name getElementName() { if (elementName == null) { String nsURI = element.getNamespaceURI(); if (nsURI != null && nsURI.length() > 0) { String prefix = element.getPrefix(); String localName = element.getLocalName(); elementName = new NameImpl(localName, prefix, nsURI); } else { String nodeName = element.getNodeName(); elementName = new NameImpl(nodeName); } } return elementName; }
/** * Sets the encoding style for this SOAPElement object to one specified. * * @see http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383495 * @see http://www.w3.org/TR/soap12-part1/#soapencattr * * @param encodingStyle a String giving the encoding style * @throws IllegalArgumentException if there was a problem in the encoding style being set. * @throws javax.xml.soap.SOAPException if setting the encodingStyle is invalid for this SOAPElement. */ public void setEncodingStyle(String encodingStyle) throws SOAPException { String namespaceURI = getNamespaceURI(Constants.PREFIX_ENV); NameImpl name = new NameImpl("encodingStyle", Constants.PREFIX_ENV, namespaceURI); addAttribute(name, encodingStyle); }
/** * Creates a new SOAPElement object initialized with the specified local name and prefix and adds the new element to this SOAPElement object. * * @param localName a String giving the local name for the new element * @param prefix a String giving the namespace prefix 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(String localName, String prefix) throws SOAPException { String nsURI = getNamespaceURI(prefix); if (nsURI == null) throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_NAMESPACE_URI", prefix)); Name nameImp = new NameImpl(localName, prefix, nsURI); return addChildElement(nameImp); }
public SOAPElement setElementQNameInternal(QName qname) throws SOAPException { elementName = new NameImpl(qname); Document owner = domNode.getOwnerDocument(); domNode = owner.renameNode(domNode, elementName.getURI(), elementName.getQualifiedName()); element = (Element)domNode; return this.completeNamespaceDeclaration(); }
@Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { String envNamespace = getNamespaceURI(); if (Constants.NS_SOAP12_ENV.equals(envNamespace) && name.equals(new NameImpl("encodingStyle", Constants.PREFIX_ENV, envNamespace))) throw new SOAPException(BundleUtils.getMessage(bundle, "CANNOT_SET_ENCODINGSTYLE", getElementQName())); return super.addAttribute(name, value); }
@Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { String envNamespace = getNamespaceURI(); if (Constants.NS_SOAP12_ENV.equals(envNamespace) && name.equals(new NameImpl("encodingStyle", Constants.PREFIX_ENV, envNamespace))) throw new SOAPException(BundleUtils.getMessage(bundle, "CANNOT_SET_ENCODINGSTYLE_ON", getElementQName())); return super.addAttribute(name, value); }
/** Creates a new SOAPHeaderElement object initialized with the specified name and adds it to this SOAPHeader object. */ public SOAPHeaderElement addHeaderElement(Name name) throws SOAPException { if (name == null) throw new SOAPException(BundleUtils.getMessage(bundle, "INVALID_SOAPHEADERELEMENT_NAME", name)); return addHeaderElement(new NameImpl(name.getLocalName(), name.getPrefix(), name.getURI()).toQName()); }