org.apache.axis2.saaj
Class SOAPEnvelopeImpl

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

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.saaj.NodeImplEx
parentElement
 
Fields inherited from class org.apache.axiom.om.impl.dom.NodeImpl
builder, done, factory, FIRSTCHILD, flags, 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_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
 
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
 
Fields inherited from interface org.apache.axiom.om.OMNode
DTD_NODE, PI_NODE, SPACE_NODE
 
Constructor Summary
SOAPEnvelopeImpl(org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl envelope)
           
 
Method Summary
 SOAPElement addAttribute(Name name, java.lang.String value)
          Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on Envelop
 SOAPBody addBody()
          Creates a SOAPBody object and sets it as the SOAPBody object for this SOAPEnvelope object.
 SOAPElement addChildElement(Name name)
          Override SOAPElement.addChildElement SOAP 1.2 should not allow element to be added after body element
 SOAPHeader addHeader()
          Creates a SOAPHeader object and sets it as the SOAPHeader object for this SOAPEnvelope object.
 SOAPElement addTextNode(java.lang.String text)
          Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
 Name createName(java.lang.String localName)
          Creates a new Name object initialized with the given local name.
 Name createName(java.lang.String localName, java.lang.String prefix, java.lang.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.
 org.apache.axiom.soap.SOAPEnvelope getOMEnvelope()
           
 void setOwnerDocument(org.w3c.dom.Document document)
           
 
Methods inherited from class org.apache.axis2.saaj.SOAPElementImpl
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, createQName, detach, detachNode, discard, getAllAttributes, getAllAttributesAsQNames, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getAttributeValue, getChildElements, getChildElements, getChildElements, getChildNodes, getElement, getElementName, getElementQName, getElementsByTagName, getElementsByTagNameNS, getEncodingStyle, getFirstChild, getLastChild, getLocalName, getNamespacePrefixes, getNamespaceURI, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTagName, getValue, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, hasChildNodes, internalSerialize, internalSerializeAndConsume, removeAttribute, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setElementQName, setEncodingStyle, setParent, setParentElement, setValue, toString
 
Methods inherited from class org.apache.axis2.saaj.NodeImplEx
getParent, getSchemaTypeInfo, getType, recycleNode, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setType
 
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl
appendChild, build, buildWithAttachments, cloneNode, close, compareDocumentPosition, getBaseURI, getFeature, getLength, getNextOMSibling, getNodeValue, getOMFactory, getPreviousOMSibling, getTextContent, getUserData, hasAttributes, insertBefore, insertSiblingAfter, insertSiblingBefore, internalSerializeWithCache, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setPrefix, setPreviousOMSibling, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 
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 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 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
 

Constructor Detail

SOAPEnvelopeImpl

public SOAPEnvelopeImpl(org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl envelope)
Method Detail

setOwnerDocument

public void setOwnerDocument(org.w3c.dom.Document document)

getOMEnvelope

public org.apache.axiom.soap.SOAPEnvelope getOMEnvelope()

createName

public Name createName(java.lang.String localName,
                       java.lang.String prefix,
                       java.lang.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(java.lang.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

addTextNode

public SOAPElement addTextNode(java.lang.String text)
                        throws SOAPException
Description copied from class: SOAPElementImpl
Creates a new Text object initialized with the given String and adds it to this SOAPElement object.

Specified by:
addTextNode in interface SOAPElement
Overrides:
addTextNode in class SOAPElementImpl
Parameters:
text - a String object with the textual content to be added
Returns:
the SOAPElement object into which the new Text object was inserted
Throws:
SOAPException - if there is an error in creating the new Text object

addAttribute

public SOAPElement addAttribute(Name name,
                                java.lang.String value)
                         throws SOAPException
Override SOAPElement.addAttribute SOAP1.2 should not allow encodingStyle attribute to be set on Envelop

Specified by:
addAttribute in interface SOAPElement
Overrides:
addAttribute in class SOAPElementImpl
Parameters:
name - a Name object with the name of the attribute
value - a String 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 interface SOAPElement
Overrides:
addChildElement in class SOAPElementImpl
Parameters:
name - a Name object with the XML name for the new element
Returns:
the new SOAPElement object that was created
Throws:
SOAPException - if there is an error in creating the SOAPElement object


Copyright © 2007 Apache Web Services Project. All Rights Reserved.