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

java.lang.Object
  extended by org.apache.axiom.om.impl.llom.OMNodeImpl
      extended by org.apache.axiom.om.impl.llom.OMElementImpl
          extended by org.apache.axiom.soap.impl.llom.SOAPElement
              extended by org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl
All Implemented Interfaces:
org.apache.axiom.om.impl.OMContainerEx, org.apache.axiom.om.impl.OMNodeEx, org.apache.axiom.om.OMConstants, org.apache.axiom.om.OMContainer, org.apache.axiom.om.OMElement, org.apache.axiom.om.OMNode, org.apache.axiom.soap.SOAPEnvelope

public class SOAPEnvelopeImpl
extends SOAPElement
implements org.apache.axiom.soap.SOAPEnvelope, org.apache.axiom.om.OMConstants

Class SOAPEnvelopeImpl


Field Summary
 
Fields inherited from class org.apache.axiom.om.impl.llom.OMElementImpl
attributes, DEFAULT_DEFAULT_NS_OBJECT, firstChild, lastChild, localName, namespaces, noPrefixNamespaceCounter, ns
 
Fields inherited from class org.apache.axiom.om.impl.llom.OMNodeImpl
builder, done, factory, nextSibling, nodeType, parent, previousSibling
 
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, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI
 
Constructor Summary
SOAPEnvelopeImpl(org.apache.axiom.om.OMNamespace ns, org.apache.axiom.soap.SOAPFactory factory)
          Constructor
SOAPEnvelopeImpl(org.apache.axiom.om.OMXMLParserWrapper builder, org.apache.axiom.soap.SOAPFactory factory)
          Constructor
 
Method Summary
 void addChild(org.apache.axiom.om.OMNode child)
          Add a SOAPHeader or SOAPBody object
protected  void checkParent(org.apache.axiom.om.OMElement parent)
          This has to be implemented by all the derived classes to check for the correct parent.
 org.apache.axiom.om.OMNode detach()
          Method detach
 org.apache.axiom.soap.SOAPBody getBody()
          Returns the SOAPBody object associated with this SOAPEnvelope object.
 org.apache.axiom.soap.SOAPHeader getHeader()
          Returns the SOAPHeader object for this SOAPEnvelope object.
private  javax.xml.namespace.QName getPayloadQName_Optimized()
          Use a parser property to fetch the first element in the body.
 java.lang.String getSOAPBodyFirstElementLocalName()
           
 org.apache.axiom.om.OMNamespace getSOAPBodyFirstElementNS()
           
 org.apache.axiom.soap.SOAPVersion getVersion()
           
 boolean hasFault()
           
protected  void internalSerialize(javax.xml.stream.XMLStreamWriter writer2, boolean cache)
           
private  void serializeInternally(OMNodeImpl child, org.apache.axiom.om.impl.MTOMXMLStreamWriter writer)
           
 
Methods inherited from class org.apache.axiom.soap.impl.llom.SOAPElement
registerContentHandler, setParent
 
Methods inherited from class org.apache.axiom.om.impl.llom.OMElementImpl
addAttribute, addAttribute, build, buildNext, buildWithAttachments, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, discard, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getBuilder, getChildElements, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getDefaultNamespace, getFirstChildWithName, getFirstElement, getFirstOMChild, getLineNumber, getLocalName, getNamespace, getNextOMSibling, getQName, getText, getTextAsQName, getTrimmedText, getType, getXMLStreamReader, getXMLStreamReaderWithoutCaching, internalSerialize, internalSerializeAndConsume, isComplete, notifyChildComplete, removeAttribute, resolveQName, setBuilder, setFirstChild, setLastChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume
 
Methods inherited from class org.apache.axiom.om.impl.llom.OMNodeImpl
close, getOMFactory, getParent, getPreviousOMSibling, importNode, insertSiblingAfter, insertSiblingBefore, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNextOMSibling, setPreviousOMSibling, setType
 
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, getBuilder, getChildElements, getDefaultNamespace, getFirstElement, getLineNumber, getLocalName, getNamespace, getQName, getText, getTextAsQName, getXMLStreamReader, getXMLStreamReaderWithoutCaching, removeAttribute, resolveQName, setBuilder, setFirstChild, setLineNumber, setLocalName, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume
 
Methods inherited from interface org.apache.axiom.om.OMNode
build, buildWithAttachments, close, discard, getNextOMSibling, getOMFactory, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore, isComplete, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMContainer
buildNext, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, isComplete
 
Methods inherited from interface org.apache.axiom.om.impl.OMContainerEx
setComplete
 

Constructor Detail

SOAPEnvelopeImpl

public SOAPEnvelopeImpl(org.apache.axiom.om.OMXMLParserWrapper builder,
                        org.apache.axiom.soap.SOAPFactory factory)
Constructor

Parameters:
builder - the OMXMLParserWrapper building this envelope
factory - the SOAPFactory building this envelope

SOAPEnvelopeImpl

public SOAPEnvelopeImpl(org.apache.axiom.om.OMNamespace ns,
                        org.apache.axiom.soap.SOAPFactory factory)
Constructor

Parameters:
ns - OMNamespace for this envelope
factory - SOAPFactory associated with this envelope
Method Detail

getVersion

public org.apache.axiom.soap.SOAPVersion getVersion()
Specified by:
getVersion in interface org.apache.axiom.soap.SOAPEnvelope

getHeader

public org.apache.axiom.soap.SOAPHeader getHeader()
                                           throws org.apache.axiom.om.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 org.apache.axiom.soap.SOAPEnvelope
Returns:
the SOAPHeader object or null if there is none
Throws:
org.apache.axiom.om.OMException - if there is a problem obtaining the SOAPHeader object

addChild

public void addChild(org.apache.axiom.om.OMNode child)
Add a SOAPHeader or SOAPBody object

Specified by:
addChild in interface org.apache.axiom.om.OMContainer
Overrides:
addChild in class OMElementImpl
Parameters:
child - an OMNode to add - must be either a SOAPHeader or a SOAPBody

getBody

public org.apache.axiom.soap.SOAPBody getBody()
                                       throws org.apache.axiom.om.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 org.apache.axiom.soap.SOAPEnvelope
Returns:
the SOAPBody object for this SOAPEnvelope object or null if there is none
Throws:
org.apache.axiom.om.OMException - if there is a problem obtaining the SOAPBody object

detach

public org.apache.axiom.om.OMNode detach()
                                  throws org.apache.axiom.om.OMException
Method detach

Specified by:
detach in interface org.apache.axiom.om.OMNode
Overrides:
detach in class OMElementImpl
Throws:
org.apache.axiom.om.OMException

checkParent

protected void checkParent(org.apache.axiom.om.OMElement parent)
                    throws org.apache.axiom.soap.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:
org.apache.axiom.soap.SOAPProcessingException

internalSerialize

protected void internalSerialize(javax.xml.stream.XMLStreamWriter writer2,
                                 boolean cache)
                          throws javax.xml.stream.XMLStreamException
Overrides:
internalSerialize in class OMElementImpl
Throws:
javax.xml.stream.XMLStreamException

serializeInternally

private void serializeInternally(OMNodeImpl child,
                                 org.apache.axiom.om.impl.MTOMXMLStreamWriter writer)
                          throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

hasFault

public boolean hasFault()
Specified by:
hasFault in interface org.apache.axiom.soap.SOAPEnvelope

getSOAPBodyFirstElementLocalName

public java.lang.String getSOAPBodyFirstElementLocalName()
Specified by:
getSOAPBodyFirstElementLocalName in interface org.apache.axiom.soap.SOAPEnvelope

getSOAPBodyFirstElementNS

public org.apache.axiom.om.OMNamespace getSOAPBodyFirstElementNS()
Specified by:
getSOAPBodyFirstElementNS in interface org.apache.axiom.soap.SOAPEnvelope

getPayloadQName_Optimized

private javax.xml.namespace.QName getPayloadQName_Optimized()
Use a parser property to fetch the first element in the body. Returns null if this optimized property is not set or not available.

Returns:
The qname of the first element in the body or null