|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.io.IOException java.rmi.RemoteException org.apache.axis2.AxisFault
public class AxisFault
An exception which maps cleanly to a SOAP fault. This is a base class for exceptions which are mapped to faults.
SOAP1.2 SOAP1.1 node faultactor reason(0).text faultstring faultcode.value faultcode faultcode.subcode (discarded) detail detail role (discarded), Serialized Form
Constructor Summary | |
---|---|
|
AxisFault(QName faultCode,
java.util.List faultSubCodes,
java.lang.String faultReason,
java.lang.Throwable cause)
Constructor |
|
AxisFault(QName faultCode,
java.lang.String faultReason,
java.lang.String faultNode,
java.lang.String faultRole,
org.apache.axiom.om.OMElement faultDetail)
Constructor |
|
AxisFault(QName faultCode,
java.lang.String faultReason,
java.lang.Throwable cause)
Constructor |
|
AxisFault(org.apache.axiom.soap.SOAPFault fault)
|
|
AxisFault(org.apache.axiom.soap.SOAPFaultCode soapFaultCode,
org.apache.axiom.soap.SOAPFaultReason soapFaultReason,
org.apache.axiom.soap.SOAPFaultNode soapFaultNode,
org.apache.axiom.soap.SOAPFaultRole soapFaultRole,
org.apache.axiom.soap.SOAPFaultDetail soapFaultDetail)
This is just a convenience method for the user. |
|
AxisFault(org.apache.axiom.soap.SOAPFault fault,
MessageContext faultCtx)
|
|
AxisFault(java.lang.String message)
Constructor. |
|
AxisFault(java.lang.String message,
MessageContext faultMessageContext)
Create an AxisFault by providing a textual message and a MessageContext that contains the actual fault representation. |
|
AxisFault(java.lang.String message,
MessageContext faultMessageContext,
java.lang.Throwable cause)
|
|
AxisFault(java.lang.String messageText,
QName faultCode)
Constructor |
|
AxisFault(java.lang.String messageText,
QName faultCode,
java.lang.Throwable cause)
|
|
AxisFault(java.lang.String messageText,
java.lang.String faultCode)
Constructor. |
|
AxisFault(java.lang.String messageText,
java.lang.String faultCode,
java.lang.Throwable cause)
|
|
AxisFault(java.lang.String message,
java.lang.Throwable cause)
Constructor |
protected |
AxisFault(java.lang.Throwable cause)
Construct a fault from a Throwable. |
Method Summary | |
---|---|
void |
addHeader(org.apache.axiom.soap.SOAPHeaderBlock header)
Add a header to the list of fault headers |
void |
addReason(java.lang.String text)
Add a reason for the fault in the empty "" language |
void |
addReason(java.lang.String text,
java.lang.String language)
Add a reason for the fault |
org.apache.axiom.om.OMElement |
getDetail()
Get the current fault detail |
java.lang.String |
getFaultAction()
|
QName |
getFaultCode()
|
org.apache.axiom.soap.SOAPFaultCode |
getFaultCodeElement()
|
org.apache.axiom.soap.SOAPFaultDetail |
getFaultDetailElement()
|
MessageContext |
getFaultMessageContext()
Returns the MessageContext representation of the fault if the fault was created by providing that. |
java.lang.String |
getFaultNode()
|
org.apache.axiom.soap.SOAPFaultNode |
getFaultNodeElement()
|
org.apache.axiom.soap.SOAPFaultReason |
getFaultReasonElement()
|
java.lang.String |
getFaultRole()
|
org.apache.axiom.soap.SOAPFaultRole |
getFaultRoleElement()
|
java.util.List |
getFaultSubCodes()
|
int |
getFaultType()
|
java.lang.String |
getMessage()
Returns the detail message, including the message from the cause, if any, of this exception. |
java.lang.String |
getNodeURI()
Get the faulting node uri. |
java.lang.String |
getReason()
Returns the first fault reason, if available. |
java.util.ListIterator |
headerIterator()
Iterate over all of the headers |
java.util.List |
headers()
Get at the headers. |
static AxisFault |
makeFault(java.lang.Throwable e)
Make an AxisFault based on a passed Exception. |
void |
setDetail(org.apache.axiom.om.OMElement detail)
Set the entire detail element of the fault |
void |
setFaultAction(java.lang.String faultAction)
Set the (OPTIONAL) action value for the fault message |
void |
setFaultCode(QName soapFaultCode)
|
void |
setFaultCode(java.lang.String soapFaultCode)
|
void |
setFaultSubCodes(java.util.List faultSubCodes)
|
void |
setFaultType(int faultType)
|
void |
setNodeURI(java.lang.String nodeURI)
Set the faulting node uri. |
Methods inherited from class java.rmi.RemoteException |
---|
getCause |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, 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 |
Constructor Detail |
---|
public AxisFault(java.lang.String message)
message
- the human-readable text describing the faultpublic AxisFault(QName faultCode, java.lang.String faultReason, java.lang.Throwable cause)
faultCode
- - fault code of the message as a QNamefaultReason
- - the reason for the fault. The language will be defaulted to 'en'cause
- embedded fault which caused this onepublic AxisFault(QName faultCode, java.util.List faultSubCodes, java.lang.String faultReason, java.lang.Throwable cause)
faultCode
- - fault code of the message as a QNamefaultSubCodes
- - list sub fault codes as a list if QNamesfaultReason
- - the reason for the fault. The language will be defaulted to 'en'cause
- embedded fault which caused this onepublic AxisFault(QName faultCode, java.lang.String faultReason, java.lang.String faultNode, java.lang.String faultRole, org.apache.axiom.om.OMElement faultDetail)
faultCode
- a QName for the fault codefaultReason
- the reason for the fault. The language will be defaulted to 'en'faultNode
- a URL identifying the SOAP node generating this fault, or nullfaultRole
- a URL identifying the SOAP role active when generating this fault, or nullfaultDetail
- arbitrary XML containing application-specific fault datapublic AxisFault(org.apache.axiom.soap.SOAPFaultCode soapFaultCode, org.apache.axiom.soap.SOAPFaultReason soapFaultReason, org.apache.axiom.soap.SOAPFaultNode soapFaultNode, org.apache.axiom.soap.SOAPFaultRole soapFaultRole, org.apache.axiom.soap.SOAPFaultDetail soapFaultDetail)
soapFaultCode
- the fault codesoapFaultReason
- the fault reasonsoapFaultNode
- the SOAPFaultNode representing the source node for this faultsoapFaultRole
- the SOAPFaultRole representing the source role for this faultsoapFaultDetail
- the SOAPFaultDetail containing any application-specific infopublic AxisFault(org.apache.axiom.soap.SOAPFault fault)
public AxisFault(org.apache.axiom.soap.SOAPFault fault, MessageContext faultCtx)
protected AxisFault(java.lang.Throwable cause)
cause
- the Throwable that caused the problempublic AxisFault(java.lang.String messageText, java.lang.String faultCode)
messageText
- - this will appear as the Text in the Reason information item of SOAP FaultfaultCode
- - this will appear as the Value in the Code information item of SOAP Faultpublic AxisFault(java.lang.String messageText, QName faultCode)
messageText
- this will appear as the Text in the Reason information item of SOAP FaultfaultCode
- this will appear as the Value in the Code information item of SOAP Faultpublic AxisFault(java.lang.String message, java.lang.Throwable cause)
message
- this will appear as the Text in the Reason information item of SOAP Faultcause
- the embedded Throwable that caused this faultpublic AxisFault(java.lang.String messageText, QName faultCode, java.lang.Throwable cause)
messageText
- - this will appear as the Text in the Reason information item of SOAP FaultfaultCode
- - this will appear as the Value in the Code information item of SOAP Faultcause
- - this will appear under the Detail information item of SOAP Faultpublic AxisFault(java.lang.String message, MessageContext faultMessageContext, java.lang.Throwable cause)
message
- faultMessageContext
- cause
- public AxisFault(java.lang.String messageText, java.lang.String faultCode, java.lang.Throwable cause)
messageText
- - this will appear as the Text in the Reason information item of SOAP FaultfaultCode
- - this will appear as the Value in the Code information item of SOAP Faultcause
- - this will appear under the Detail information item of SOAP Faultpublic AxisFault(java.lang.String message, MessageContext faultMessageContext)
message
- A string that's really only useful for logging.faultMessageContext
- A MessageContext which must contain SOAP fault infoMethod Detail |
---|
public void addHeader(org.apache.axiom.soap.SOAPHeaderBlock header)
header
- to add.public void addReason(java.lang.String text)
text
- text messagepublic void addReason(java.lang.String text, java.lang.String language)
text
- text messagelanguage
- languagepublic java.lang.String getReason()
public java.util.ListIterator headerIterator()
public java.util.List headers()
public static AxisFault makeFault(java.lang.Throwable e)
e
- the Exception
to build a fault for
AxisFault
representing e
public org.apache.axiom.om.OMElement getDetail()
public QName getFaultCode()
public java.util.List getFaultSubCodes()
public org.apache.axiom.soap.SOAPFaultCode getFaultCodeElement()
SOAPFaultCode
element when constructing the
AxisFault
public org.apache.axiom.soap.SOAPFaultReason getFaultReasonElement()
SOAPFaultReason
element when constructing the
AxisFault
public org.apache.axiom.soap.SOAPFaultNode getFaultNodeElement()
SOAPFaultNode
element when constructing the
AxisFault
public org.apache.axiom.soap.SOAPFaultRole getFaultRoleElement()
SOAPFaultRole
element when constructing the
AxisFault
public org.apache.axiom.soap.SOAPFaultDetail getFaultDetailElement()
SOAPFaultDetail
element when constructing the
AxisFault
public java.lang.String getNodeURI()
public void setDetail(org.apache.axiom.om.OMElement detail)
detail
- an OMElement which MUST bepublic void setFaultCode(QName soapFaultCode)
public void setFaultSubCodes(java.util.List faultSubCodes)
public void setFaultCode(java.lang.String soapFaultCode)
public void setNodeURI(java.lang.String nodeURI)
nodeURI
- a String containing a URI indicating which SOAP Node faultedpublic java.lang.String getFaultNode()
public java.lang.String getFaultRole()
public MessageContext getFaultMessageContext()
public java.lang.String getFaultAction()
public void setFaultAction(java.lang.String faultAction)
faultAction
- a String containing an action URI for the faultpublic java.lang.String getMessage()
getMessage
in class java.rmi.RemoteException
public int getFaultType()
public void setFaultType(int faultType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |