Class SOAPEnvelopeImpl
- All Implemented Interfaces:
jakarta.xml.soap.Node,jakarta.xml.soap.SOAPElement,jakarta.xml.soap.SOAPEnvelope,Element,Node
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.xml.soap.SOAPElementaddAttribute(jakarta.xml.soap.Name name, String value) Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on Envelopjakarta.xml.soap.SOAPBodyaddBody()Creates aSOAPBodyobject and sets it as theSOAPBodyobject for thisSOAPEnvelopeobject.jakarta.xml.soap.SOAPElementaddChildElement(jakarta.xml.soap.Name name) Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body elementjakarta.xml.soap.SOAPHeaderCreates aSOAPHeaderobject and sets it as theSOAPHeaderobject for thisSOAPEnvelopeobject.jakarta.xml.soap.SOAPElementaddTextNode(String text) Creates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.jakarta.xml.soap.NamecreateName(String localName) Creates a newNameobject initialized with the given local name.jakarta.xml.soap.NamecreateName(String localName, String prefix) jakarta.xml.soap.NamecreateName(String localName, String prefix, String uri) Creates a newNameobject initialized with the given local name, namespace prefix, and namespace URI.jakarta.xml.soap.SOAPBodygetBody()Returns theSOAPBodyobject associated with thisSOAPEnvelopeobject.jakarta.xml.soap.SOAPHeaderReturns theSOAPHeaderobject for thisSOAPEnvelopeobject.Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, clone, copyContents, createQName, getAllAttributes, getAllAttributesAsQNames, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getTagName, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setElementQName, setEncodingStyle, setValue, toStringMethods inherited from class org.apache.axis2.saaj.NodeImpl
detachNode, getParentElement, setParentElementMethods inherited from class org.apache.axis2.saaj.ProxyNode
appendChild, appendElement, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOMTarget, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getTarget, getTextContent, getType, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, removeChild, replaceChild, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setType, setUserData, toSAAJNodeListMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface jakarta.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValueMethods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataMethods inherited from interface jakarta.xml.soap.SOAPElement
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, createQName, getAllAttributes, getAllAttributesAsQNames, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getElementName, getElementQName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeAttribute, removeContents, removeNamespaceDeclaration, setElementQName, setEncodingStyle
-
Constructor Details
-
SOAPEnvelopeImpl
public SOAPEnvelopeImpl(org.apache.axiom.soap.SOAPEnvelope envelope)
-
-
Method Details
-
createName
public jakarta.xml.soap.Name createName(String localName, String prefix, String uri) throws jakarta.xml.soap.SOAPException Creates a newNameobject initialized with the given local name, namespace prefix, and namespace URI.This factory method creates
Nameobjects for use in the SOAP/XML document.- Specified by:
createNamein interfacejakarta.xml.soap.SOAPEnvelope- Parameters:
localName- aStringgiving the local nameprefix- aStringgiving the prefix of the namespaceuri- aStringgiving the URI of the namespace- Returns:
- a
Nameobject initialized with the given local name, namespace prefix, and namespace URI - Throws:
jakarta.xml.soap.SOAPException- if there is a SOAP error
-
createName
public jakarta.xml.soap.Name createName(String localName, String prefix) throws jakarta.xml.soap.SOAPException - Specified by:
createNamein interfacejakarta.xml.soap.SOAPEnvelope- Throws:
jakarta.xml.soap.SOAPException
-
createName
Creates a newNameobject initialized with the given local name.This factory method creates
Nameobjects for use in the SOAP/XML document.- Specified by:
createNamein interfacejakarta.xml.soap.SOAPEnvelope- Parameters:
localName- aStringgiving the local name- Returns:
- a
Nameobject initialized with the given local name - Throws:
jakarta.xml.soap.SOAPException- if there is a SOAP error
-
getHeader
public jakarta.xml.soap.SOAPHeader getHeader() throws jakarta.xml.soap.SOAPExceptionReturns theSOAPHeaderobject for thisSOAPEnvelopeobject.A new
SOAPMessageobject is by default created with aSOAPEnvelopeobject that contains an emptySOAPHeaderobject. As a result, the methodgetHeaderwill always return aSOAPHeaderobject unless the header has been removed and a new one has not been added.- Specified by:
getHeaderin interfacejakarta.xml.soap.SOAPEnvelope- Returns:
- the
SOAPHeaderobject ornullif there is none - Throws:
jakarta.xml.soap.SOAPException- if there is a problem obtaining theSOAPHeaderobject
-
getBody
public jakarta.xml.soap.SOAPBody getBody() throws jakarta.xml.soap.SOAPExceptionReturns theSOAPBodyobject associated with thisSOAPEnvelopeobject.A new
SOAPMessageobject is by default created with aSOAPEnvelopeobject that contains an emptySOAPBodyobject. As a result, the methodgetBodywill always return aSOAPBodyobject unless the body has been removed and a new one has not been added.- Specified by:
getBodyin interfacejakarta.xml.soap.SOAPEnvelope- Returns:
- the
SOAPBodyobject for thisSOAPEnvelopeobject ornullif there is none - Throws:
jakarta.xml.soap.SOAPException- if there is a problem obtaining theSOAPBodyobject
-
addHeader
public jakarta.xml.soap.SOAPHeader addHeader() throws jakarta.xml.soap.SOAPExceptionCreates aSOAPHeaderobject and sets it as theSOAPHeaderobject for thisSOAPEnvelopeobject.It is illegal to add a header when the envelope already contains a header. Therefore, this method should be called only after the existing header has been removed.
- Specified by:
addHeaderin interfacejakarta.xml.soap.SOAPEnvelope- Returns:
- the new
SOAPHeaderobject - Throws:
jakarta.xml.soap.SOAPException- if thisSOAPEnvelopeobject already contains a validSOAPHeaderobject
-
addBody
public jakarta.xml.soap.SOAPBody addBody() throws jakarta.xml.soap.SOAPExceptionCreates aSOAPBodyobject and sets it as theSOAPBodyobject for thisSOAPEnvelopeobject.It is illegal to add a body when the envelope already contains a body. Therefore, this method should be called only after the existing body has been removed.
- Specified by:
addBodyin interfacejakarta.xml.soap.SOAPEnvelope- Returns:
- the new
SOAPBodyobject - Throws:
jakarta.xml.soap.SOAPException- if thisSOAPEnvelopeobject already contains a validSOAPBodyobject
-
addTextNode
Description copied from class:SOAPElementImplCreates a newTextobject initialized with the givenStringand adds it to thisSOAPElementobject.- Specified by:
addTextNodein interfacejakarta.xml.soap.SOAPElement- Overrides:
addTextNodein classSOAPElementImpl<org.apache.axiom.soap.SOAPEnvelope>- Parameters:
text- aStringobject with the textual content to be added- Returns:
- the
SOAPElementobject into which the newTextobject was inserted - Throws:
jakarta.xml.soap.SOAPException- if there is an error in creating the newTextobject
-
addAttribute
public jakarta.xml.soap.SOAPElement addAttribute(jakarta.xml.soap.Name name, String value) throws jakarta.xml.soap.SOAPException Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on Envelop- Specified by:
addAttributein interfacejakarta.xml.soap.SOAPElement- Overrides:
addAttributein classSOAPElementImpl<org.apache.axiom.soap.SOAPEnvelope>- Parameters:
name- aNameobject with the name of the attributevalue- aStringgiving the value of the attribute- Returns:
- the
SOAPElementobject into which the attribute was inserted - Throws:
jakarta.xml.soap.SOAPException- if there is an error in creating the Attribute
-
addChildElement
public jakarta.xml.soap.SOAPElement addChildElement(jakarta.xml.soap.Name name) throws jakarta.xml.soap.SOAPException Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body element- Specified by:
addChildElementin interfacejakarta.xml.soap.SOAPElement- Overrides:
addChildElementin classSOAPElementImpl<org.apache.axiom.soap.SOAPEnvelope>- Throws:
jakarta.xml.soap.SOAPException
-