org.apache.axis.message

Class SOAPFault

public class SOAPFault extends SOAPBodyElement implements SOAPFault

A Fault body element.

Author: Sam Ruby (rubys@us.ibm.com) Glen Daniels (gdaniels@apache.org) Tom Jordahl (tomj@macromedia.com)

Field Summary
protected Detaildetail
protected AxisFaultfault
protected Stringprefix
Constructor Summary
SOAPFault(String namespace, String localName, String prefix, Attributes attrs, DeserializationContext context)
SOAPFault(AxisFault fault)
Method Summary
DetailaddDetail()
Creates a Detail object and sets it as the Detail object for this SOAPFaultException object.
DetailgetDetail()
Returns the detail element for this SOAPFaultException object.
AxisFaultgetFault()
StringgetFaultActor()
Gets the fault actor for this SOAPFaultException object.
StringgetFaultCode()
Gets the fault code for this SOAPFaultException object.
NamegetFaultCodeAsName()
StringgetFaultString()
Gets the fault string for this SOAPFaultException object.
LocalegetFaultStringLocale()
voidoutputImpl(SerializationContext context)
voidsetFault(AxisFault fault)
voidsetFaultActor(String faultActor)
Sets this SOAPFaultException object with the given fault actor.
voidsetFaultCode(String faultCode)
Sets this SOAPFaultException object with the given fault code.
voidsetFaultCode(Name faultCodeQName)
voidsetFaultString(String faultString)
Sets the fault string for this SOAPFaultException object to the given string.
voidsetFaultString(String faultString, Locale locale)

Field Detail

detail

protected Detail detail

fault

protected AxisFault fault

prefix

protected String prefix

Constructor Detail

SOAPFault

public SOAPFault(String namespace, String localName, String prefix, Attributes attrs, DeserializationContext context)

SOAPFault

public SOAPFault(AxisFault fault)

Method Detail

addDetail

public Detail addDetail()
Creates a 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.

Returns: the new Detail object

Throws: SOAPException if this SOAPFaultException object already contains a valid Detail object

getDetail

public Detail getDetail()
Returns the detail element for this SOAPFaultException object.

A Detail object carries application-specific error information related to SOAPBodyElement objects.

Returns: a Detail object with application-specific error information

getFault

public AxisFault getFault()

getFaultActor

public String getFaultActor()
Gets the fault actor for this SOAPFaultException object.

Returns: a String giving the actor in the message path that caused this SOAPFaultException object

See Also: setFaultActor(java.lang.String)

getFaultCode

public String getFaultCode()
Gets the fault code for this SOAPFaultException object.

Returns: a String with the fault code

getFaultCodeAsName

public Name getFaultCodeAsName()

getFaultString

public String getFaultString()
Gets the fault string for this SOAPFaultException object.

Returns: a String giving an explanation of the fault

getFaultStringLocale

public Locale getFaultStringLocale()

outputImpl

public void outputImpl(SerializationContext context)

setFault

public void setFault(AxisFault fault)

setFaultActor

public void setFaultActor(String faultActor)
Sets this SOAPFaultException object with the given fault actor.

The fault actor is the recipient in the message path who caused the fault to happen.

Parameters: faultActor a String identifying the actor that caused this SOAPFaultException object

Throws: SOAPException if there was an error in adding the faultActor to the underlying XML tree.

setFaultCode

public void setFaultCode(String faultCode)
Sets this SOAPFaultException object with the given fault code.

Fault codes, which given information about the fault, are defined in the SOAP 1.1 specification.

Parameters: faultCode a String giving 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 the faultCode to the underlying XML tree.

setFaultCode

public void setFaultCode(Name faultCodeQName)

setFaultString

public void setFaultString(String faultString)
Sets the fault string for this SOAPFaultException object to the given string.

Parameters: faultString a String giving an explanation of the fault

Throws: SOAPException if there was an error in adding the faultString to the underlying XML tree.

See Also: getFaultString()

setFaultString

public void setFaultString(String faultString, Locale locale)
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.