public class SOAPFault extends SOAPBodyElement implements SOAPFault
MessageElement.QNameAttr| Modifier and Type | Field and Description |
|---|---|
protected Detail |
detail |
protected AxisFault |
fault |
protected String |
prefix |
_isRoot, context, encodingStyle, endEventIndex, fixupDeserializer, href, id, message, namespaces, qNameAttrs, recorder, startContentsIndex, startEventIndex, typeQName_isDirty, attributes, children, document, name, namespaceURI, parent, textRepATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
SOAPFault(AxisFault fault) |
SOAPFault(String namespace,
String localName,
String prefix,
Attributes attrs,
DeserializationContext context) |
| Modifier and Type | Method and Description |
|---|---|
Detail |
addDetail()
Creates a
Detail object and sets it as the
Detail object for this SOAPFaultException
object. |
Detail |
getDetail()
Returns the detail element for this
SOAPFaultException
object. |
AxisFault |
getFault() |
String |
getFaultActor()
Gets the fault actor for this
SOAPFaultException
object. |
String |
getFaultCode()
Gets the fault code for this
SOAPFaultException
object. |
Name |
getFaultCodeAsName()
Gets the mandatory SOAP 1.1 fault code for this
SOAPFault
object as a SAAJ Name object. |
String |
getFaultString()
Gets the fault string for this
SOAPFaultException
object. |
Locale |
getFaultStringLocale()
Returns the optional detail element for this
SOAPFault
object. |
void |
outputImpl(SerializationContext context)
override point -output to a serialization context.
|
void |
setFault(AxisFault fault) |
void |
setFaultActor(String faultActor)
Sets this
SOAPFaultException object with the given
fault actor. |
void |
setFaultCode(Name faultCodeQName)
Sets this
SOAPFault object with the given fault code. |
void |
setFaultCode(String faultCode)
Sets this
SOAPFaultException object with the given
fault code. |
void |
setFaultString(String faultString)
Sets the fault string for this
SOAPFaultException
object to the given string. |
void |
setFaultString(String faultString,
Locale locale)
Sets the fault string for this
SOAPFault object to the given
string and localized to the given locale. |
setParentElementaddAttribute, addAttribute, addAttribute, addAttribute, addChild, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addMapping, addNamespaceDeclaration, addTextNode, childDeepCloned, cloneNode, cloning, detachAllChildren, equals, findElement, getAllAttributes, getAsDocument, getAsDOM, getAsString, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributesEx, getAttributeValue, getAttributeValue, getChildElement, getChildElements, getChildElements, getChildElements, getChildren, getCompleteAttributes, getDeserializationContext, getElementName, getElementsByTagName, getElementsByTagNameNS, getElementsNS, getEncodingStyle, getEnvelope, getFixupDeserializer, getHref, getID, getLength, getName, getNamespacePrefixes, getNamespaceURI, getObjectValue, getObjectValue, getOwnerDocument, getPrefix, getQName, getRealElement, getRecorder, getTagName, getType, getValue, getValueAsType, getValueAsType, getValueDOM, getVisibleNamespacePrefixes, hasAttribute, hasAttributeNS, isRoot, item, output, publishContents, publishToHandler, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeContents, removeNamespaceDeclaration, setAllAttributes, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setContentsIndex, setEncodingStyle, setEndIndex, setEnvelope, setFixupDeserializer, setName, setNamespaceURI, setNSMappings, setObjectValue, setQName, setRecorder, setType, setValue, toStringappendChild, convertAttrSAXtoDOM, detachNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDirty, isSupported, makeAttributesEditable, normalize, recycleNode, removeChild, replaceChild, reset, setDirty, setDirty, setNodeValue, setOwnerDocument, setParent, setPrefixclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyledetachNode, getParentElement, getValue, recycleNode, setParentElement, setValuegetAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSappendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataprotected AxisFault fault
protected String prefix
protected Detail detail
public SOAPFault(String namespace, String localName, String prefix, Attributes attrs, DeserializationContext context) throws AxisFault
AxisFaultpublic SOAPFault(AxisFault fault)
public void outputImpl(SerializationContext context) throws Exception
MessageElementoutputImpl in class MessageElementcontext - destination.Exception - if something went wrong.public AxisFault getFault()
public void setFault(AxisFault fault)
public void setFaultCode(String faultCode) throws SOAPException
SOAPFaultException object with the given
fault code.
Fault codes, which given information about the fault, are defined in the SOAP 1.1 specification.
setFaultCode in interface SOAPFaultfaultCode - a String giving
the fault code to be set; must be one of the fault codes
defined in the SOAP 1.1 specificationSOAPException - if there was an error in
adding the faultCode to the underlying XML
tree.getFaultCode()public String getFaultCode()
SOAPFaultException
object.getFaultCode in interface SOAPFaultString with the fault codesetFaultCode(java.lang.String)public void setFaultActor(String faultActor) throws SOAPException
SOAPFaultException object with the given
fault actor.
The fault actor is the recipient in the message path who caused the fault to happen.
setFaultActor in interface SOAPFaultfaultActor - a String
identifying the actor that caused this
SOAPFaultException objectSOAPException - if there was an error in
adding the faultActor to the underlying XML
tree.getFaultActor()public String getFaultActor()
SOAPFaultException
object.getFaultActor in interface SOAPFaultString giving the actor in the message
path that caused this SOAPFaultException objectsetFaultActor(java.lang.String)public void setFaultString(String faultString) throws SOAPException
SOAPFaultException
object to the given string.setFaultString in interface SOAPFaultfaultString - a String
giving an explanation of the faultSOAPException - if there was an error in
adding the faultString to the underlying XML
tree.getFaultString()public String getFaultString()
SOAPFaultException
object.getFaultString in interface SOAPFaultString giving an explanation of the
faultpublic Detail getDetail()
SOAPFaultException
object.
A Detail object carries
application-specific error information related to
SOAPBodyElement objects.
public Detail addDetail() throws SOAPException
Detail object and sets it as the
Detail object for this SOAPFaultException
object.
It is illegal to add a detail when the fault already contains a detail. Therefore, this method should be called only after the existing detail has been removed.
addDetail in interface SOAPFaultDetail objectSOAPException - if this
SOAPFaultException object already contains a valid
Detail objectpublic void setFaultCode(Name faultCodeQName) throws SOAPException
SOAPFaultSOAPFault object with the given fault code.
Fault codes, which give information about the fault, are defined in the
SOAP 1.1 specification. A fault code is mandatory and must be of type
QName. This method provides a convenient way to set a fault
code. For example,
SOAPEnvelope se = ...;
// Create a qualified name in the SOAP namespace with a localName
// of "Client". Note that prefix parameter is optional and is null
// here which causes the implementation to use an appropriate prefix.
Name qname = se.createName("Client", null,
SOAPConstants.URI_NS_SOAP_ENVELOPE);
SOAPFault fault = ...;
fault.setFaultCode(qname);
It is preferable to use this method over setFaultCode(String).setFaultCode in interface SOAPFaultfaultCodeQName - a Name object giving the fault code to be set.
It must be namespace qualified.SOAPException - if there was an error in adding the
faultcode element to the underlying XML treepublic Name getFaultCodeAsName()
SOAPFaultSOAPFault
object as a SAAJ Name object. The SOAP 1.1 specification
requires the value of the "faultcode" element to be of type QName. This
method returns the content of the element as a QName in the form of a
SAAJ Name object. This method should be used instead of the
getFaultCode() method since it allows applications to easily
access the namespace name without additional parsing.
In the future, a QName object version of this method may also be added.
getFaultCodeAsName in interface SOAPFaultName representing the faultcodepublic void setFaultString(String faultString, Locale locale) throws SOAPException
SOAPFaultSOAPFault object to the given
string and localized to the given locale.setFaultString in interface SOAPFaultfaultString - a String giving an explanation of
the faultlocale - a Locale object indicating the
native language of the faultStringSOAPException - if there was an error in adding the
faultString to the underlying XML treepublic Locale getFaultStringLocale()
SOAPFaultSOAPFault
object.getFaultStringLocale in interface SOAPFaultLocale object indicating the native language of
the fault string or null if no locale was
specifiedCopyright © The Apache Software Foundation. All Rights Reserved.