Package org.apache.axiom.soap
Interface SOAPEnvelope
-
- All Superinterfaces:
OMContainer
,OMElement
,OMInformationItem
,OMNamedInformationItem
,OMNode
,OMSerializable
public interface SOAPEnvelope extends OMElement
Interface SOAPEnvelope
-
-
Field Summary
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SOAPBody
getBody()
Returns theSOAPBody
object associated with thisSOAPEnvelope
object.SOAPHeader
getHeader()
Returns theSOAPHeader
object for this envelope.SOAPHeader
getOrCreateHeader()
Returns the existingSOAPHeader
object for this envelope or creates a new one if there is none.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.-
Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getSAXResult, getSAXSource, getXMLStreamReader, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, getXOPEncodedStreamReader, removeChildren, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume
-
Methods inherited from interface org.apache.axiom.om.OMElement
addAttribute, addAttribute, cloneOMElement, declareDefaultNamespace, declareNamespace, declareNamespace, findNamespace, findNamespaceURI, getAllAttributes, getAllDeclaredNamespaces, getAttribute, getAttributeValue, getChildElements, getDefaultNamespace, getDescendants, getFirstElement, getLineNumber, getNamespaceContext, getNamespacesInScope, getText, getTextAsQName, getTextAsStream, removeAttribute, resolveQName, setLineNumber, setNamespace, setNamespaceWithNoFindInCurrentScope, setText, setText, toString, toStringWithConsume, undeclarePrefix, writeTextTo
-
Methods inherited from interface org.apache.axiom.om.OMInformationItem
clone, getOMFactory
-
Methods inherited from interface org.apache.axiom.om.OMNamedInformationItem
getLocalName, getNamespace, getNamespaceURI, getPrefix, getQName, hasName, setLocalName, setNamespace
-
Methods inherited from interface org.apache.axiom.om.OMNode
buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBefore
-
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, isComplete, serialize, serialize, serializeAndConsume
-
-
-
-
Method Detail
-
getHeader
SOAPHeader getHeader()
Returns theSOAPHeader
object for this envelope. This method takes advantage of the fact that theSOAPHeader
must be the first child element (if it exists) to avoid building theSOAPBody
if it is still incomplete.- Returns:
- the
SOAPHeader
object ornull
if there is none
-
getOrCreateHeader
SOAPHeader getOrCreateHeader()
Returns the existingSOAPHeader
object for this envelope or creates a new one if there is none. Similarly togetHeader()
, this method avoids building theSOAPBody
.- Returns:
- the existing or newly created
SOAPHeader
object for this envelope
-
getBody
SOAPBody getBody() throws OMException
Returns theSOAPBody
object associated with thisSOAPEnvelope
object.This SOAPBody will just be a container for all the BodyElements in the
OMMessage
- Returns:
- the
SOAPBody
object for thisSOAPEnvelope
object ornull
if there is none - Throws:
OMException
- if there is a problem obtaining theSOAPBody
object
-
getVersion
SOAPVersion getVersion()
-
hasFault
boolean hasFault()
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.- Returns:
- true if SOAPFault in the body
-
getSOAPBodyFirstElementNS
OMNamespace getSOAPBodyFirstElementNS()
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.- Returns:
- the namespace of first element in the body, or
null
if the element has no namespace or the body is empty
-
getSOAPBodyFirstElementLocalName
String getSOAPBodyFirstElementLocalName()
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.- Returns:
- local name of first element in the body or null
-
-