org.apache.axis2.saaj
Class SOAPEnvelopeImpl

java.lang.Object
  extended byorg.apache.axis2.om.impl.dom.NodeImpl
      extended byorg.apache.axis2.saaj.NodeImplEx
          extended byorg.apache.axis2.saaj.SOAPElementImpl
              extended byorg.apache.axis2.saaj.SOAPEnvelopeImpl
All Implemented Interfaces:
Cloneable, Element, Node, Node, NodeList, OMNode, OMNodeEx, SOAPElement, SOAPEnvelope

public class SOAPEnvelopeImpl
extends SOAPElementImpl
implements SOAPEnvelope


Field Summary
 
Fields inherited from class org.apache.axis2.saaj.SOAPElementImpl
element
 
Fields inherited from class org.apache.axis2.om.impl.dom.NodeImpl
builder, done, FIRSTCHILD, flags, nodeType, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.apache.axis2.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Constructor Summary
SOAPEnvelopeImpl(SOAPEnvelope element)
           
 
Method Summary
 SOAPBody addBody()
          Creates a SOAPBody object and sets it as the SOAPBody object for this SOAPEnvelope object.
 SOAPHeader addHeader()
          Creates a SOAPHeader object and sets it as the SOAPHeader object for this SOAPEnvelope object.
 Name createName(String localName)
          Creates a new Name object initialized with the given local name.
 Name createName(String localName, String prefix, String uri)
          Creates a new Name object initialized with the given local name, namespace prefix, and namespace URI.
 SOAPBody getBody()
          Returns the SOAPBody object associated with this SOAPEnvelope object.
 SOAPHeader getHeader()
          Returns the SOAPHeader object for this SOAPEnvelope object.
 SOAPEnvelope getOMEnvelope()
           
 void setOwnerDocument(Document document)
           
 
Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, discard, getAllAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributeValue, getChildElements, getChildElements, getChildNodes, getElement, getElementName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFirstChild, getLastChild, getNamespacePrefixes, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentElement, getPreviousSibling, getTagName, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasChildNodes, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, serialize, serializeAndConsume, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setEncodingStyle, setParent
 
Methods inherited from class org.apache.axis2.saaj.NodeImplEx
detachNode, getParent, getType, recycleNode, setParentElement, setType, setValue
 
Methods inherited from class org.apache.axis2.om.impl.dom.NodeImpl
appendChild, build, cloneNode, compareDocumentPosition, detach, getAttributes, getBaseURI, getFeature, getLength, getLocalName, getNamespaceURI, getNextOMSibling, getNodeValue, getParentNode, getPrefix, getPreviousOMSibling, getTextContent, getUserData, hasAttributes, insertBefore, insertSiblingAfter, insertSiblingBefore, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeWithCache, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setPrefix, setPreviousOMSibling, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
 
Methods inherited from interface javax.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 

Constructor Detail

SOAPEnvelopeImpl

public SOAPEnvelopeImpl(SOAPEnvelope element)
Method Detail

setOwnerDocument

public void setOwnerDocument(Document document)

getOMEnvelope

public SOAPEnvelope getOMEnvelope()

createName

public Name createName(String localName,
                       String prefix,
                       String uri)
                throws SOAPException
Creates a new Name 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 interface SOAPEnvelope
Parameters:
localName - a String giving the local name
prefix - a String giving the prefix of the namespace
uri - a String 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 new Name object initialized with the given local name.

This factory method creates Name objects for use in the SOAP/XML document.

Specified by:
createName in interface SOAPEnvelope
Parameters:
localName - a String 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 the SOAPHeader object for this SOAPEnvelope object.

A new SOAPMessage object is by default created with a SOAPEnvelope object that contains an empty SOAPHeader object. As a result, the method getHeader will always return a SOAPHeader object unless the header has been removed and a new one has not been added.

Specified by:
getHeader in interface SOAPEnvelope
Returns:
the SOAPHeader object or null if there is none
Throws:
SOAPException - if there is a problem obtaining the SOAPHeader object

getBody

public SOAPBody getBody()
                 throws SOAPException
Returns the SOAPBody object associated with this SOAPEnvelope object.

A new SOAPMessage object is by default created with a SOAPEnvelope object that contains an empty SOAPBody object. As a result, the method getBody will always return a SOAPBody object unless the body has been removed and a new one has not been added.

Specified by:
getBody in interface SOAPEnvelope
Returns:
the SOAPBody object for this SOAPEnvelope object or null if there is none
Throws:
SOAPException - if there is a problem obtaining the SOAPBody object

addHeader

public SOAPHeader addHeader()
                     throws SOAPException
Creates a SOAPHeader object and sets it as the SOAPHeader object for this SOAPEnvelope 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 interface SOAPEnvelope
Returns:
the new SOAPHeader object
Throws:
SOAPException - if this SOAPEnvelope object already contains a valid SOAPHeader object

addBody

public SOAPBody addBody()
                 throws SOAPException
Creates a SOAPBody object and sets it as the SOAPBody object for this SOAPEnvelope 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 interface SOAPEnvelope
Returns:
the new SOAPBody object
Throws:
SOAPException - if this SOAPEnvelope object already contains a valid SOAPBody object