Package org.apache.axiom.soap
Interface SOAPBody
- All Superinterfaces:
OMContainer
,OMElement
,OMInformationItem
,OMNamedInformationItem
,OMNode
,OMSerializable
An object that represents the contents of the SOAP body element in a SOAP message. B SOAP body
element consists of XML data that affects the way the application-specific content is processed.
B SOAPBody
object contains OMBodyBlock
objects, which have the content
for the SOAP body. B SOAPFault
object, which carries status and/or error
information, is an example of a OMBodyBlock
object.
-
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
Modifier and TypeMethodDescriptionCreates a newSOAPFault
object and adds it to thisSOAPBody
object.void
getFault()
Returns theSOAPFault
object in thisSOAPBody
object.Retrieves the local name of the first element in the body.Retrieves the OMNamespace of the first element in the body.boolean
hasFault()
Indicates whether aSOAPFault
object exists in thisSOAPBody
object.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 Details
-
addFault
Creates a newSOAPFault
object and adds it to thisSOAPBody
object.- Parameters:
e
-- Returns:
- the new
SOAPFault
object - Throws:
OMException
- if there is a SOAP errorOMException
-
hasFault
boolean hasFault()Indicates whether aSOAPFault
object exists in thisSOAPBody
object.- Returns:
true
if aSOAPFault
object exists in thisSOAPBody
object;false
otherwise
-
getFault
SOAPFault getFault()Returns theSOAPFault
object in thisSOAPBody
object.- Returns:
- the
SOAPFault
object in thisSOAPBody
object
-
addFault
- Parameters:
soapFault
-- Throws:
OMException
-
getFirstElementNS
OMNamespace getFirstElementNS()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
-
getFirstElementLocalName
String getFirstElementLocalName()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
if the body is empty
-