Class SOAPEnvelopeImpl
- java.lang.Object
-
- org.apache.axis2.saaj.ProxyNode<T,S>
-
- org.apache.axis2.saaj.NodeImpl<Element,T>
-
- org.apache.axis2.saaj.SOAPElementImpl<SOAPEnvelope>
-
- org.apache.axis2.saaj.SOAPEnvelopeImpl
-
- All Implemented Interfaces:
Node
,SOAPElement
,SOAPEnvelope
,Element
,Node
public class SOAPEnvelopeImpl extends SOAPElementImpl<SOAPEnvelope> implements SOAPEnvelope
-
-
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 Constructor Description SOAPEnvelopeImpl(SOAPEnvelope envelope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SOAPElement
addAttribute(Name name, String value)
Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on EnvelopSOAPBody
addBody()
Creates aSOAPBody
object and sets it as theSOAPBody
object for thisSOAPEnvelope
object.SOAPElement
addChildElement(Name name)
Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body elementSOAPHeader
addHeader()
Creates aSOAPHeader
object and sets it as theSOAPHeader
object for thisSOAPEnvelope
object.SOAPElement
addTextNode(String text)
Creates a newText
object initialized with the givenString
and adds it to thisSOAPElement
object.Name
createName(String localName)
Creates a newName
object initialized with the given local name.Name
createName(String localName, String prefix, String uri)
Creates a newName
object initialized with the given local name, namespace prefix, and namespace URI.SOAPBody
getBody()
Returns theSOAPBody
object associated with thisSOAPEnvelope
object.SOAPHeader
getHeader()
Returns theSOAPHeader
object for thisSOAPEnvelope
object.-
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, toString
-
Methods inherited from class org.apache.axis2.saaj.NodeImpl
detachNode, getParentElement, setParentElement
-
Methods 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, toSAAJNodeList
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods 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, setIdAttributeNS
-
Methods inherited from interface javax.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue
-
Methods 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, setUserData
-
Methods inherited from interface javax.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 Detail
-
SOAPEnvelopeImpl
public SOAPEnvelopeImpl(SOAPEnvelope envelope)
-
-
Method Detail
-
createName
public Name createName(String localName, String prefix, String uri) throws SOAPException
Creates a newName
object initialized with the given local name, namespace prefix, and namespace URI.This factory method creates
Name
objects for use in the SOAP/XML document.- Specified by:
createName
in interfaceSOAPEnvelope
- Parameters:
localName
- aString
giving the local nameprefix
- aString
giving the prefix of the namespaceuri
- aString
giving the URI of the namespace- Returns:
- a
Name
object initialized with the given local name, namespace prefix, and namespace URI - Throws:
SOAPException
- if there is a SOAP error
-
createName
public Name createName(String localName) throws SOAPException
Creates a newName
object initialized with the given local name.This factory method creates
Name
objects for use in the SOAP/XML document.- Specified by:
createName
in interfaceSOAPEnvelope
- Parameters:
localName
- aString
giving the local name- Returns:
- a
Name
object initialized with the given local name - Throws:
SOAPException
- if there is a SOAP error
-
getHeader
public SOAPHeader getHeader() throws SOAPException
Returns theSOAPHeader
object for thisSOAPEnvelope
object.A new
SOAPMessage
object is by default created with aSOAPEnvelope
object that contains an emptySOAPHeader
object. As a result, the methodgetHeader
will always return aSOAPHeader
object unless the header has been removed and a new one has not been added.- Specified by:
getHeader
in interfaceSOAPEnvelope
- Returns:
- the
SOAPHeader
object ornull
if there is none - Throws:
SOAPException
- if there is a problem obtaining theSOAPHeader
object
-
getBody
public SOAPBody getBody() throws SOAPException
Returns theSOAPBody
object associated with thisSOAPEnvelope
object.A new
SOAPMessage
object is by default created with aSOAPEnvelope
object that contains an emptySOAPBody
object. As a result, the methodgetBody
will always return aSOAPBody
object unless the body has been removed and a new one has not been added.- Specified by:
getBody
in interfaceSOAPEnvelope
- Returns:
- the
SOAPBody
object for thisSOAPEnvelope
object ornull
if there is none - Throws:
SOAPException
- if there is a problem obtaining theSOAPBody
object
-
addHeader
public SOAPHeader addHeader() throws SOAPException
Creates aSOAPHeader
object and sets it as theSOAPHeader
object for thisSOAPEnvelope
object.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:
addHeader
in interfaceSOAPEnvelope
- Returns:
- the new
SOAPHeader
object - Throws:
SOAPException
- if thisSOAPEnvelope
object already contains a validSOAPHeader
object
-
addBody
public SOAPBody addBody() throws SOAPException
Creates aSOAPBody
object and sets it as theSOAPBody
object for thisSOAPEnvelope
object.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:
addBody
in interfaceSOAPEnvelope
- Returns:
- the new
SOAPBody
object - Throws:
SOAPException
- if thisSOAPEnvelope
object already contains a validSOAPBody
object
-
addTextNode
public SOAPElement addTextNode(String text) throws SOAPException
Description copied from class:SOAPElementImpl
Creates a newText
object initialized with the givenString
and adds it to thisSOAPElement
object.- Specified by:
addTextNode
in interfaceSOAPElement
- Overrides:
addTextNode
in classSOAPElementImpl<SOAPEnvelope>
- Parameters:
text
- aString
object with the textual content to be added- Returns:
- the
SOAPElement
object into which the newText
object was inserted - Throws:
SOAPException
- if there is an error in creating the newText
object
-
addAttribute
public SOAPElement addAttribute(Name name, String value) throws SOAPException
Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on Envelop- Specified by:
addAttribute
in interfaceSOAPElement
- Overrides:
addAttribute
in classSOAPElementImpl<SOAPEnvelope>
- Parameters:
name
- aName
object with the name of the attributevalue
- aString
giving the value of the attribute- Returns:
- the
SOAPElement
object into which the attribute was inserted - Throws:
SOAPException
- if there is an error in creating the Attribute
-
addChildElement
public SOAPElement addChildElement(Name name) throws SOAPException
Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body element- Specified by:
addChildElement
in interfaceSOAPElement
- Overrides:
addChildElement
in classSOAPElementImpl<SOAPEnvelope>
- Throws:
SOAPException
-
-