Package org.apache.axiom.soap
Interface SOAPFaultClassifier
- All Superinterfaces:
OMContainer
,OMElement
,OMInformationItem
,OMNamedInformationItem
,OMNode
,OMSerializable
- All Known Subinterfaces:
SOAPFaultCode
,SOAPFaultSubCode
Common superinterface for
SOAPFaultCode
and SOAPFaultSubCode
.
This interface enables manipulation of SOAP fault codes and SOAP fault sub
codes using common code.-
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 TypeMethodDescriptiongetValue()
Get theSOAPFaultValue
for this fault code or subcode.Get the value of this fault code or subcode.void
setSubCode
(SOAPFaultSubCode subCode) Fault SubCode can contain an optional SubCodevoid
Set the value of this fault code or subcode.void
setValue
(SOAPFaultValue value) Fault SubCode contain only one mandatory Value child.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
-
setValue
Fault SubCode contain only one mandatory Value child. This value child contains a QName- Parameters:
value
-- Throws:
SOAPProcessingException
-
getValue
SOAPFaultValue getValue()Get theSOAPFaultValue
for this fault code or subcode. Note that for SOAP 1.1, the return value will always benull
. UsegetValueAsQName()
as a SOAP version independent way to extract the value of a fault code or subcode.- Returns:
- the
SOAPFaultValue
object ornull
if there is noSOAPFaultValue
-
setValue
Set the value of this fault code or subcode. The effect of this method depends on the SOAP version. For SOAP 1.1, the method sets the text content of theSOAPFaultCode
element. For SOAP 1.2, the method ensures that theSOAPFaultCode
orSOAPFaultSubCode
element has a child of typeSOAPFaultValue
child (creating one if necessary) and sets the text content of that child. In both cases, the method adds an appropriate namespace declaration if necessary.- Parameters:
value
- the QName for the fault code or subcode value
-
getValueAsQName
QName getValueAsQName()Get the value of this fault code or subcode. This method can be consistently used for all SOAP versions. For SOAP 1.1, it gets the text content of this element (which is necessarily aSOAPFaultCode
) and resolves it as aQName
. For SOAP 1.2, it locates theSOAPFaultValue
child, extracts the text content from that element and resolves it as aQName
.The method returns
null
if it fails to extract the value. Note that invalid SOAP faults are very common (especially with SOAP 1.1). Therefore the caller must be prepared to get anull
value.- Returns:
- the QName for the fault code or subcode value, or
null
if the value could not be determined
-
setSubCode
Fault SubCode can contain an optional SubCode- Parameters:
subCode
-- Throws:
SOAPProcessingException
-
getSubCode
SOAPFaultSubCode getSubCode()- Returns:
- Returns SOAPFaultSubCode.
-