|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.codehaus.xfire.fault.XFireFault
public class XFireFault
In XFire, applications throw their own declared exceptions which are then turned into faults. The XFireFault class wraps these exceptions extracting out the details for the fault message.
If the developer wishes to generate their own custom fault messages, they can either override XFireFault to provide the FaultHandlers with the necessary information or write a new FaultHandler.
TODO Add i18n support
Field Summary | |
---|---|
static java.lang.String |
DATA_ENCODING_UNKNOWN
|
static java.lang.String |
MUST_UNDERSTAND
|
static java.lang.String |
RECEIVER
A SOAP 1.2 only fault code. |
static java.lang.String |
SENDER
"The message was incorrectly formed or did not contain the appropriate information in order to succeed." -- SOAP 1.2 Spec |
static java.lang.String |
VERSION_MISMATCH
Fault codes. |
Constructor Summary | |
---|---|
XFireFault(java.lang.Exception exception)
Create a fault for the specified exception. |
|
XFireFault(java.lang.Exception exception,
java.lang.String code)
Create a fault with the specified faultCode. |
|
XFireFault(java.lang.String message,
java.lang.Exception exception,
java.lang.String code)
Create a fault. |
|
XFireFault(java.lang.String message,
java.lang.String code)
Create an exception wih the specified fault message and faultCode. |
Method Summary | |
---|---|
void |
addNamespace(java.lang.String prefix,
java.lang.String ns)
|
static XFireFault |
createFault(java.lang.Exception e)
|
java.lang.String |
getCode()
|
org.w3c.dom.Element |
getDetailElement()
|
java.lang.String |
getFaultCode()
|
java.util.Map |
getNamespaces()
User defined namespaces which will be written out on the resultant SOAP Fault (for use easy with SubCodes and Detail) elements. |
java.lang.String |
getReason()
|
java.lang.String |
getSubCode()
Returns the SubCode for the Fault Code. |
boolean |
hasDetails()
|
void |
setFaultCode(java.lang.String faultCode)
|
void |
setSubCode(java.lang.String subCode)
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION_MISMATCH
public static final java.lang.String MUST_UNDERSTAND
public static final java.lang.String DATA_ENCODING_UNKNOWN
public static final java.lang.String SENDER
public static final java.lang.String RECEIVER
A SOAP 1.2 only fault code.
"The message could not be processed for reasons attributable to the processing of the message rather than to the contents of the message itself." -- SOAP 1.2 Spec
Constructor Detail |
---|
public XFireFault(java.lang.String message, java.lang.Exception exception, java.lang.String code)
string
- The fault message.exception
- The exception which caused this fault.code
- The fault code. See XFireFault's static fields.public XFireFault(java.lang.Exception exception)
exception
- public XFireFault(java.lang.Exception exception, java.lang.String code)
exception
- The exception that caused this fault.code
- The fault code. See XFireFault's static fields.public XFireFault(java.lang.String message, java.lang.String code)
message
- The fault message.code
- The fault code. See XFireFault's static fields.Method Detail |
---|
public static XFireFault createFault(java.lang.Exception e)
public java.lang.String getCode()
public java.lang.String getReason()
public java.lang.String getSubCode()
public org.w3c.dom.Element getDetailElement()
public void setSubCode(java.lang.String subCode)
public java.lang.String getFaultCode()
public void setFaultCode(java.lang.String faultCode)
public java.util.Map getNamespaces()
public void addNamespace(java.lang.String prefix, java.lang.String ns)
public boolean hasDetails()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |