|
||||||||||
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.XFireException
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.
Field Summary | |
---|---|
static javax.xml.namespace.QName |
DATA_ENCODING_UNKNOWN
|
static javax.xml.namespace.QName |
MUST_UNDERSTAND
|
static javax.xml.namespace.QName |
RECEIVER
A SOAP 1.2 only fault code. |
static javax.xml.namespace.QName |
SENDER
"The message was incorrectly formed or did not contain the appropriate information in order to succeed." -- SOAP 1.2 Spec |
static javax.xml.namespace.QName |
SOAP11_CLIENT
|
static javax.xml.namespace.QName |
SOAP11_MUST_UNDERSTAND
|
static javax.xml.namespace.QName |
SOAP11_SERVER
|
static javax.xml.namespace.QName |
SOAP11_VERSION_MISMATCH
|
static javax.xml.namespace.QName |
VERSION_MISMATCH
|
Constructor Summary | |
---|---|
protected |
XFireFault()
|
|
XFireFault(java.lang.String message,
javax.xml.namespace.QName code)
Create an exception wih the specified fault message and faultCode. |
|
XFireFault(java.lang.String message,
java.lang.Throwable cause,
javax.xml.namespace.QName code)
Create a fault. |
|
XFireFault(java.lang.Throwable throwable)
Create a fault for the specified exception. |
|
XFireFault(java.lang.Throwable throwable,
javax.xml.namespace.QName code)
Create a fault with the specified faultCode. |
Method Summary | |
---|---|
void |
addNamespace(java.lang.String prefix,
java.lang.String ns)
Adds a namespace with prefix to this fault. |
static XFireFault |
createFault(java.lang.Throwable throwable)
Creates a XFireFault from the given throwable. |
org.jdom.Element |
getDetail()
Returns the detail node. |
javax.xml.namespace.QName |
getFaultCode()
Returns the fault code of this fault. |
java.lang.String |
getMessage()
Returns the detail message string of this fault. |
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 |
getRole()
Returns the fault actor. |
javax.xml.namespace.QName |
getSubCode()
Returns the SubCode for the Fault Code. |
boolean |
hasDetails()
Indicates whether this fault has a detail message. |
void |
setDetail(org.jdom.Element details)
Sets a details Node on this fault. |
void |
setFaultCode(javax.xml.namespace.QName faultCode)
Sets the fault code of this fault. |
void |
setMessage(java.lang.String message)
|
void |
setRole(java.lang.String actor)
Sets the fault actor. |
void |
setSubCode(javax.xml.namespace.QName subCode)
Sets the SubCode for the Fault Code. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, 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 javax.xml.namespace.QName VERSION_MISMATCH
public static final javax.xml.namespace.QName MUST_UNDERSTAND
public static final javax.xml.namespace.QName DATA_ENCODING_UNKNOWN
public static final javax.xml.namespace.QName SENDER
public static final javax.xml.namespace.QName RECEIVER
public static final javax.xml.namespace.QName SOAP11_SERVER
public static final javax.xml.namespace.QName SOAP11_CLIENT
public static final javax.xml.namespace.QName SOAP11_MUST_UNDERSTAND
public static final javax.xml.namespace.QName SOAP11_VERSION_MISMATCH
Constructor Detail |
---|
protected XFireFault()
public XFireFault(java.lang.Throwable throwable)
throwable
- public XFireFault(java.lang.Throwable throwable, javax.xml.namespace.QName code)
throwable
- The exception that caused this fault.code
- The fault code. See XFireFault's static fields.public XFireFault(java.lang.String message, javax.xml.namespace.QName code)
message
- The fault message.code
- The fault code. See XFireFault's static fields.public XFireFault(java.lang.String message, java.lang.Throwable cause, javax.xml.namespace.QName code)
cause
- The exception which caused this fault.code
- The fault code. See XFireFault's static fields.Method Detail |
---|
public static XFireFault createFault(java.lang.Throwable throwable)
XFireFault
from the given throwable. If the throwable is a XFireFault
, it is
not wrapped.
throwable
- the throwable
public void addNamespace(java.lang.String prefix, java.lang.String ns)
prefix
- the prefixns
- the namespace.public org.jdom.Element getDetail()
<detail>
is created.
public void setDetail(org.jdom.Element details)
Node
on this fault.
details
- the detail node.public javax.xml.namespace.QName getFaultCode()
public void setFaultCode(javax.xml.namespace.QName faultCode)
faultCode
- the fault code.public java.lang.String getMessage()
getMessage
in class java.lang.Throwable
XfireFault
(which may be null
)public void setMessage(java.lang.String message)
message
- The message to set.public java.util.Map getNamespaces()
public java.lang.String getReason()
public java.lang.String getRole()
public void setRole(java.lang.String actor)
actor
- the actor.public javax.xml.namespace.QName getSubCode()
public void setSubCode(javax.xml.namespace.QName subCode)
subCode
- The SubCode element as detailed by the SOAP 1.2 spec.public boolean hasDetails()
true
if this fault has a detail message; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |