org.apache.axiom.soap.impl.dom
Class SOAPEnvelopeImpl

java.lang.Object
  extended by org.apache.axiom.om.impl.dom.NodeImpl
      extended by org.apache.axiom.om.impl.dom.ChildNode
          extended by org.apache.axiom.om.impl.dom.ParentNode
              extended by org.apache.axiom.om.impl.dom.ElementImpl
                  extended by org.apache.axiom.soap.impl.dom.SOAPElement
                      extended by org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl
All Implemented Interfaces:
Cloneable, OMContainerEx, OMNodeEx, OMConstants, OMContainer, OMElement, OMNode, OMSerializable, SOAPEnvelope, Element, Node, NodeList

public class SOAPEnvelopeImpl
extends SOAPElement
implements SOAPEnvelope, OMConstants


Field Summary
 
Fields inherited from class org.apache.axiom.om.impl.dom.ElementImpl
localName, namespace
 
Fields inherited from class org.apache.axiom.om.impl.dom.ParentNode
firstChild, lastChild
 
Fields inherited from class org.apache.axiom.om.impl.dom.ChildNode
nextSibling, parentNode, previousSibling
 
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.apache.axiom.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Fields inherited from interface org.apache.axiom.om.OMConstants
ARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DATA_HANDLER, DEFAULT_CHAR_SET_ENCODING, DEFAULT_DEFAULT_NAMESPACE, DEFAULT_XML_VERSION, IS_BINARY, IS_DATA_HANDLERS_AWARE, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLATTRTYPE_CDATA, XMLATTRTYPE_ENTITIES, XMLATTRTYPE_ENTITY, XMLATTRTYPE_ID, XMLATTRTYPE_IDREF, XMLATTRTYPE_IDREFS, XMLATTRTYPE_NMTOKEN, XMLATTRTYPE_NMTOKENS, XMLATTRTYPE_NOTATION, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI
 
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
SOAPEnvelopeImpl(DocumentImpl doc, OMXMLParserWrapper builder, SOAPFactory factory)
           
SOAPEnvelopeImpl(OMNamespace ns, SOAPFactory factory)
           
SOAPEnvelopeImpl(OMXMLParserWrapper builder, SOAPFactory factory)
           
 
Method Summary
 void addChild(OMNode child)
          Adds the given node as the last child.
protected  void checkParent(OMElement parent)
          This has to be implemented by all the derived classes to check for the correct parent.
 OMNode detach()
          Method detach
 SOAPBody getBody()
          Returns the SOAPBody object associated with this SOAPEnvelope object.
 SOAPHeader getHeader()
          Returns the SOAPHeader object for this SOAPEnvelope object.
 OMNode getNextOMSibling()
          Default behavior returns null, overriden in ChildNode.
 String getSOAPBodyFirstElementLocalName()
          Retrieves the local name of the first element in the body.
 OMNamespace getSOAPBodyFirstElementNS()
          Retrieves the OMNamespace of the first element in the body.
 SOAPVersion getVersion()
           
 boolean hasFault()
          Returns true if there is a SOAPFault in the body.
 Node insertBefore(Node newChild, Node refChild)
          Inserts newChild before the refChild.
 void internalSerialize(XMLStreamWriter writer2, boolean cache)
          Serializes the node.
 
Methods inherited from class org.apache.axiom.om.impl.dom.ElementImpl
addAttribute, addAttribute, buildWithAttachments, cloneNode, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, discard, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getChildElements, getDefaultNamespace, getElementsByTagName, getElementsByTagNameNS, getFirstElement, getLineNumber, getLocalName, getNamespace, getNamespaceURI, getNamespaceURI, getNodeName, getNodeType, getPrefix, getQName, getSchemaTypeInfo, getTagName, getText, getTextAsQName, getTrimmedText, getType, hasAttribute, hasAttributeNS, hasAttributes, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeNamespace, resolveQName, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setBuilder, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setOwnerDocument, setText, setText, setType, toString, toStringWithConsume
 
Methods inherited from class org.apache.axiom.om.impl.dom.ParentNode
buildNext, getBuilder, getChildNodes, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChild, getFirstChildWithName, getFirstOMChild, getFirstOMChildIfAvailable, getLastChild, getTextContent, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, hasChildNodes, importNode, removeChild, replaceChild, setFirstChild, setLastChild, setTextContent
 
Methods inherited from class org.apache.axiom.om.impl.dom.ChildNode
getNextOMSiblingIfAvailable, getNextSibling, getParent, getParentNode, getPreviousOMSibling, getPreviousSibling, insertSiblingAfter, insertSiblingBefore, setNextOMSibling, setParent, setPreviousOMSibling
 
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl
appendChild, build, close, compareDocumentPosition, getBaseURI, getFeature, getLength, getNodeValue, getOMFactory, getOwnerDocument, getUserData, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNodeValue, setPrefix, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getNamespaceURI, getQName, getText, getTextAsQName, removeAttribute, resolveQName, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume
 
Methods inherited from interface org.apache.axiom.om.OMNode
buildWithAttachments, discard, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore
 
Methods inherited from interface org.apache.axiom.om.OMContainer
buildNext, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching
 
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
 
Methods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasChildNodes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.apache.axiom.om.impl.OMContainerEx
setComplete
 

Constructor Detail

SOAPEnvelopeImpl

public SOAPEnvelopeImpl(OMXMLParserWrapper builder,
                        SOAPFactory factory)
Parameters:
builder -

SOAPEnvelopeImpl

public SOAPEnvelopeImpl(DocumentImpl doc,
                        OMXMLParserWrapper builder,
                        SOAPFactory factory)

SOAPEnvelopeImpl

public SOAPEnvelopeImpl(OMNamespace ns,
                        SOAPFactory factory)
Parameters:
ns -
Method Detail

getVersion

public SOAPVersion getVersion()
Specified by:
getVersion in interface SOAPEnvelope

getHeader

public SOAPHeader getHeader()
                     throws OMException
Returns the SOAPHeader object for this SOAPEnvelope object.

This SOAPHeader will just be a container for all the headers in the OMMessage

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

addChild

public void addChild(OMNode child)
Description copied from interface: OMContainer
Adds the given node as the last child. One must preserve the order of children, in this operation. Tip : appending the new child is preferred.

Specified by:
addChild in interface OMContainer
Overrides:
addChild in class ParentNode

insertBefore

public Node insertBefore(Node newChild,
                         Node refChild)
                  throws DOMException
Description copied from class: ParentNode
Inserts newChild before the refChild. If the refChild is null then the newChild is made the last child.

Specified by:
insertBefore in interface Node
Overrides:
insertBefore in class ParentNode
Throws:
DOMException

getBody

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

This SOAPBody will just be a container for all the BodyElements in the OMMessage

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

detach

public OMNode detach()
              throws OMException
Method detach

Specified by:
detach in interface OMNode
Overrides:
detach in class ChildNode
Returns:
The detached node. This is always the instance on which this method is invoked.
Throws:
OMException

checkParent

protected void checkParent(OMElement parent)
                    throws SOAPProcessingException
Description copied from class: SOAPElement
This has to be implemented by all the derived classes to check for the correct parent.

Specified by:
checkParent in class SOAPElement
Throws:
SOAPProcessingException

internalSerialize

public void internalSerialize(XMLStreamWriter writer2,
                              boolean cache)
                       throws XMLStreamException
Description copied from interface: OMNodeEx
Serializes the node. Note that this is an internal method that MUST NOT be used outside of Axiom. Please use OMSerializable.serialize(XMLStreamWriter, boolean) instead.

Specified by:
internalSerialize in interface OMNodeEx
Overrides:
internalSerialize in class ElementImpl
cache - indicates if caching should be enabled
Throws:
XMLStreamException

getNextOMSibling

public OMNode getNextOMSibling()
                        throws OMException
Description copied from class: NodeImpl
Default behavior returns null, overriden in ChildNode.

Specified by:
getNextOMSibling in interface OMNode
Overrides:
getNextOMSibling in class ElementImpl
Returns:
Returns the next sibling in document order.
Throws:
OMException

hasFault

public boolean hasFault()
Description copied from interface: SOAPEnvelope
Returns true if there is a SOAPFault in the body. The implementation may choose to get this information by building the OM tree or use parser provided information.

Specified by:
hasFault in interface SOAPEnvelope
Returns:
true if SOAPFault in the body

getSOAPBodyFirstElementLocalName

public String getSOAPBodyFirstElementLocalName()
Description copied from interface: SOAPEnvelope
Retrieves the local name of the first element in the body. The implementation might build the OMElement or it may obtain this information from the builder/parser without building the OMElement. Use this method in the situations where you need to know the name, but don't necessarily need the OMElement.

Specified by:
getSOAPBodyFirstElementLocalName in interface SOAPEnvelope
Returns:
local name of first element in the body or null

getSOAPBodyFirstElementNS

public OMNamespace getSOAPBodyFirstElementNS()
Description copied from interface: SOAPEnvelope
Retrieves the OMNamespace of the first element in the body. The implementation might build the OMElement or it may obtain this information from the builder/parser without building the OMElement. Use this method in the situations where you need to know the OMNamespace, but don't necessarily need the OMElement.

Specified by:
getSOAPBodyFirstElementNS in interface SOAPEnvelope
Returns:
OMNamespace of first element in the body or null


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.