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 newSOAPFaultobject and adds it to thisSOAPBodyobject.voidgetFault()Returns theSOAPFaultobject in thisSOAPBodyobject.Retrieves the local name of the first element in the body.Retrieves the OMNamespace of the first element in the body.booleanhasFault()Indicates whether aSOAPFaultobject exists in thisSOAPBodyobject.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, serializeAndConsumeMethods 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, writeTextToMethods inherited from interface org.apache.axiom.om.OMInformationItem
clone, getOMFactoryMethods inherited from interface org.apache.axiom.om.OMNamedInformationItem
getLocalName, getNamespace, getNamespaceURI, getPrefix, getQName, hasName, setLocalName, setNamespaceMethods inherited from interface org.apache.axiom.om.OMNode
buildWithAttachments, detach, discard, getNextOMSibling, getParent, getPreviousOMSibling, getType, insertSiblingAfter, insertSiblingBeforeMethods inherited from interface org.apache.axiom.om.OMSerializable
build, close, isComplete, serialize, serialize, serializeAndConsume
-
Method Details
-
addFault
Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject.- Parameters:
e-- Returns:
- the new
SOAPFaultobject - Throws:
OMException- if there is a SOAP errorOMException
-
hasFault
boolean hasFault()Indicates whether aSOAPFaultobject exists in thisSOAPBodyobject.- Returns:
trueif aSOAPFaultobject exists in thisSOAPBodyobject;falseotherwise
-
getFault
SOAPFault getFault()Returns theSOAPFaultobject in thisSOAPBodyobject.- Returns:
- the
SOAPFaultobject in thisSOAPBodyobject
-
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
nullif 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
nullif the body is empty
-