Package org.apache.axis.message
Class SOAPFault
java.lang.Object
org.apache.axis.message.NodeImpl
org.apache.axis.message.MessageElement
org.apache.axis.message.SOAPBodyElement
org.apache.axis.message.SOAPFault
- All Implemented Interfaces:
Serializable,Cloneable,Node,SOAPBodyElement,SOAPElement,SOAPFault,Element,Node,NodeList
A Fault body element.
- Author:
- Sam Ruby (rubys@us.ibm.com), Glen Daniels (gdaniels@apache.org), Tom Jordahl (tomj@macromedia.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.axis.message.MessageElement
MessageElement.QNameAttr -
Field Summary
FieldsFields inherited from class org.apache.axis.message.MessageElement
_isRoot, context, encodingStyle, endEventIndex, fixupDeserializer, href, id, message, namespaces, qNameAttrs, recorder, startContentsIndex, startEventIndex, typeQNameFields inherited from class org.apache.axis.message.NodeImpl
_isDirty, attributes, children, document, name, namespaceURI, parent, textRepFields inherited from interface org.w3c.dom.Node
ATTRIBUTE_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 Summary
ConstructorsConstructorDescriptionSOAPFault(String namespace, String localName, String prefix, Attributes attrs, DeserializationContext context) -
Method Summary
Modifier and TypeMethodDescriptionCreates aDetailobject and sets it as theDetailobject for thisSOAPFaultExceptionobject.Returns the detail element for thisSOAPFaultExceptionobject.getFault()Gets the fault actor for thisSOAPFaultExceptionobject.Gets the fault code for thisSOAPFaultExceptionobject.Gets the mandatory SOAP 1.1 fault code for thisSOAPFaultobject as a SAAJNameobject.Gets the fault string for thisSOAPFaultExceptionobject.Returns the optional detail element for thisSOAPFaultobject.voidoutputImpl(SerializationContext context) override point -output to a serialization context.voidvoidsetFaultActor(String faultActor) Sets thisSOAPFaultExceptionobject with the given fault actor.voidsetFaultCode(String faultCode) Sets thisSOAPFaultExceptionobject with the given fault code.voidsetFaultCode(Name faultCodeQName) Sets thisSOAPFaultobject with the given fault code.voidsetFaultString(String faultString) Sets the fault string for thisSOAPFaultExceptionobject to the given string.voidsetFaultString(String faultString, Locale locale) Sets the fault string for thisSOAPFaultobject to the given string and localized to the given locale.Methods inherited from class org.apache.axis.message.SOAPBodyElement
setParentElementMethods inherited from class org.apache.axis.message.MessageElement
addAttribute, 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, toStringMethods inherited from class org.apache.axis.message.NodeImpl
appendChild, compareDocumentPosition, convertAttrSAXtoDOM, detachNode, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getSchemaTypeInfo, getTextContent, getUserData, hasAttributes, hasChildNodes, initializeChildren, insertBefore, isDefaultNamespace, isDirty, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, makeAttributesEditable, normalize, recycleNode, removeChild, replaceChild, reset, setDirty, setDirty, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setOwnerDocument, setParent, setPrefix, setTextContent, setUserDataMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods inherited from interface javax.xml.soap.Node
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValueMethods inherited from interface org.w3c.dom.Node
appendChild, 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, setUserDataMethods inherited from interface javax.xml.soap.SOAPElement
addAttribute, addChildElement, addChildElement, addChildElement, addChildElement, addChildElement, addNamespaceDeclaration, addTextNode, getAllAttributes, getAttributeValue, getChildElements, getChildElements, getElementName, getEncodingStyle, getNamespacePrefixes, getNamespaceURI, getVisibleNamespacePrefixes, removeAttribute, removeContents, removeNamespaceDeclaration, setEncodingStyle
-
Field Details
-
fault
-
prefix
-
detail
-
-
Constructor Details
-
SOAPFault
public SOAPFault(String namespace, String localName, String prefix, Attributes attrs, DeserializationContext context) throws AxisFault - Throws:
AxisFault
-
SOAPFault
-
-
Method Details
-
outputImpl
Description copied from class:MessageElementoverride point -output to a serialization context.- Overrides:
outputImplin classMessageElement- Parameters:
context- destination.- Throws:
Exception- if something went wrong.
-
getFault
-
setFault
-
setFaultCode
Sets thisSOAPFaultExceptionobject with the given fault code.Fault codes, which given information about the fault, are defined in the SOAP 1.1 specification.
- Specified by:
setFaultCodein interfaceSOAPFault- Parameters:
faultCode- aStringgiving the fault code to be set; must be one of the fault codes defined in the SOAP 1.1 specification- Throws:
SOAPException- if there was an error in adding thefaultCodeto the underlying XML tree.- See Also:
-
getFaultCode
Gets the fault code for thisSOAPFaultExceptionobject.- Specified by:
getFaultCodein interfaceSOAPFault- Returns:
- a
Stringwith the fault code - See Also:
-
setFaultActor
Sets thisSOAPFaultExceptionobject with the given fault actor.The fault actor is the recipient in the message path who caused the fault to happen.
- Specified by:
setFaultActorin interfaceSOAPFault- Parameters:
faultActor- aStringidentifying the actor that caused thisSOAPFaultExceptionobject- Throws:
SOAPException- if there was an error in adding thefaultActorto the underlying XML tree.- See Also:
-
getFaultActor
Gets the fault actor for thisSOAPFaultExceptionobject.- Specified by:
getFaultActorin interfaceSOAPFault- Returns:
- a
Stringgiving the actor in the message path that caused thisSOAPFaultExceptionobject - See Also:
-
setFaultString
Sets the fault string for thisSOAPFaultExceptionobject to the given string.- Specified by:
setFaultStringin interfaceSOAPFault- Parameters:
faultString- aStringgiving an explanation of the fault- Throws:
SOAPException- if there was an error in adding thefaultStringto the underlying XML tree.- See Also:
-
getFaultString
Gets the fault string for thisSOAPFaultExceptionobject.- Specified by:
getFaultStringin interfaceSOAPFault- Returns:
- a
Stringgiving an explanation of the fault
-
getDetail
Returns the detail element for thisSOAPFaultExceptionobject.A
Detailobject carries application-specific error information related toSOAPBodyElementobjects. -
addDetail
Creates aDetailobject and sets it as theDetailobject for thisSOAPFaultExceptionobject.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.
- Specified by:
addDetailin interfaceSOAPFault- Returns:
- the new
Detailobject - Throws:
SOAPException- if thisSOAPFaultExceptionobject already contains a validDetailobject
-
setFaultCode
Description copied from interface:SOAPFaultSets thisSOAPFaultobject 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 typeQName. 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).- Specified by:
setFaultCodein interfaceSOAPFault- Parameters:
faultCodeQName- aNameobject giving the fault code to be set. It must be namespace qualified.- Throws:
SOAPException- if there was an error in adding thefaultcodeelement to the underlying XML tree
-
getFaultCodeAsName
Description copied from interface:SOAPFaultGets the mandatory SOAP 1.1 fault code for thisSOAPFaultobject as a SAAJNameobject. 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 SAAJNameobject. This method should be used instead of thegetFaultCode()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.
- Specified by:
getFaultCodeAsNamein interfaceSOAPFault- Returns:
- a
Namerepresenting the faultcode
-
setFaultString
Description copied from interface:SOAPFaultSets the fault string for thisSOAPFaultobject to the given string and localized to the given locale.- Specified by:
setFaultStringin interfaceSOAPFault- Parameters:
faultString- aStringgiving an explanation of the faultlocale- aLocaleobject indicating the native language of thefaultString- Throws:
SOAPException- if there was an error in adding thefaultStringto the underlying XML tree
-
getFaultStringLocale
Description copied from interface:SOAPFaultReturns the optional detail element for thisSOAPFaultobject.- Specified by:
getFaultStringLocalein interfaceSOAPFault- Returns:
- a
Localeobject indicating the native language of the fault string ornullif no locale was specified
-