|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis.message.NodeImpl org.apache.axis.message.MessageElement org.apache.axis.message.SOAPBodyElement org.apache.axis.message.SOAPFault
A Fault body element.
Field Summary |
Fields inherited from class org.apache.axis.message.MessageElement |
namespaces |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Constructor Summary | |
SOAPFault(AxisFault fault)
|
|
SOAPFault(java.lang.String namespace,
java.lang.String localName,
java.lang.String prefix,
org.xml.sax.Attributes attrs,
org.apache.axis.encoding.DeserializationContext context)
|
Method Summary | |
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()
|
java.lang.String |
getFaultActor()
Gets the fault actor for this SOAPFaultException
object. |
java.lang.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. |
java.lang.String |
getFaultString()
Gets the fault string for this SOAPFaultException
object. |
java.util.Locale |
getFaultStringLocale()
Returns the optional detail element for this SOAPFault
object. |
void |
outputImpl(org.apache.axis.encoding.SerializationContext context)
|
void |
setFault(AxisFault fault)
|
void |
setFaultActor(java.lang.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(java.lang.String faultCode)
Sets this SOAPFaultException object with the given
fault code. |
void |
setFaultString(java.lang.String faultString)
Sets the fault string for this SOAPFaultException
object to the given string. |
void |
setFaultString(java.lang.String faultString,
java.util.Locale locale)
Sets the fault string for this SOAPFault object to the given
string and localized to the given locale. |
Methods inherited from class org.apache.axis.message.SOAPBodyElement |
setParentElement |
Methods inherited from class org.apache.axis.message.NodeImpl |
appendChild, detachNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getParentElement, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isDirty, isSupported, normalize, recycleNode, removeChild, replaceChild, setDirty, setNodeValue, setOwnerDocument, setPrefix |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.xml.soap.Node |
detachNode, getParentElement, getValue, recycleNode, setParentElement, setValue |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Methods inherited from interface org.w3c.dom.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS |
Constructor Detail |
public SOAPFault(java.lang.String namespace, java.lang.String localName, java.lang.String prefix, org.xml.sax.Attributes attrs, org.apache.axis.encoding.DeserializationContext context) throws AxisFault
public SOAPFault(AxisFault fault)
Method Detail |
public void outputImpl(org.apache.axis.encoding.SerializationContext context) throws java.lang.Exception
context
- destination.
java.lang.Exception
- if something went wrong.public AxisFault getFault()
public void setFault(AxisFault fault)
public void setFaultCode(java.lang.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 SOAPFault
faultCode
- a String
giving
the fault code to be set; must be one of the fault codes
defined in the SOAP 1.1 specification
SOAPException
- if there was an error in
adding the faultCode
to the underlying XML
tree.getFaultCode()
public java.lang.String getFaultCode()
SOAPFaultException
object.
getFaultCode
in interface SOAPFault
String
with the fault codesetFaultCode(java.lang.String)
public void setFaultActor(java.lang.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 SOAPFault
faultActor
- a String
identifying the actor that caused this
SOAPFaultException
object
SOAPException
- if there was an error in
adding the faultActor
to the underlying XML
tree.getFaultActor()
public java.lang.String getFaultActor()
SOAPFaultException
object.
getFaultActor
in interface SOAPFault
String
giving the actor in the message
path that caused this SOAPFaultException
objectsetFaultActor(java.lang.String)
public void setFaultString(java.lang.String faultString) throws SOAPException
SOAPFaultException
object to the given string.
setFaultString
in interface SOAPFault
faultString
- a String
giving an explanation of the fault
SOAPException
- if there was an error in
adding the faultString
to the underlying XML
tree.getFaultString()
public java.lang.String getFaultString()
SOAPFaultException
object.
getFaultString
in interface SOAPFault
String
giving an explanation of the
faultpublic Detail getDetail()
SOAPFaultException
object.
A Detail
object carries
application-specific error information related to
SOAPBodyElement
objects.
getDetail
in interface SOAPFault
Detail
object with
application-specific error informationpublic 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 SOAPFault
Detail
object
SOAPException
- if this
SOAPFaultException
object already contains a valid
Detail
objectpublic void setFaultCode(Name faultCodeQName) throws SOAPException
SOAPFault
SOAPFault
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 SOAPFault
faultCodeQName
- 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()
SOAPFault
SOAPFault
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 SOAPFault
Name
representing the faultcodepublic void setFaultString(java.lang.String faultString, java.util.Locale locale) throws SOAPException
SOAPFault
SOAPFault
object to the given
string and localized to the given locale.
setFaultString
in interface SOAPFault
faultString
- a String
giving an explanation of
the faultlocale
- a Locale
object indicating the
native language of the faultString
SOAPException
- if there was an error in adding the
faultString
to the underlying XML treepublic java.util.Locale getFaultStringLocale()
SOAPFault
SOAPFault
object.
getFaultStringLocale
in interface SOAPFault
Locale
object indicating the native language of
the fault string or null
if no locale was
specified
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |