Package org.apache.axiom.soap
Interface SOAPBody
-
- All Superinterfaces:
OMContainer,OMElement,OMInformationItem,OMNamedInformationItem,OMNode,OMSerializable
public interface SOAPBody extends OMElement
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
SOAPBodyobject containsOMBodyBlockobjects, which have the content for the SOAP body. BSOAPFaultobject, which carries status and/or error information, is an example of aOMBodyBlockobject.
-
-
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 SOAPFaultaddFault(Exception e)Creates a newSOAPFaultobject and adds it to thisSOAPBodyobject.voidaddFault(SOAPFault soapFault)SOAPFaultgetFault()Returns theSOAPFaultobject in thisSOAPBodyobject.StringgetFirstElementLocalName()Retrieves the local name of the first element in the body.OMNamespacegetFirstElementNS()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, 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
-
addFault
SOAPFault addFault(Exception e) throws OMException
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
void addFault(SOAPFault soapFault) throws OMException
- 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
-
-