|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.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,
String faultReason,
String faultNode,
String faultRole,
org.apache.axiom.om.OMElement faultDetail)
|
|
AxisFault(QName faultCode,
String faultReason,
Throwable cause)
These are the absolute minimum to construct a meaningful SOAPFault from user's information |
|
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(String message)
|
|
AxisFault(String messageText,
QName faultCode)
|
|
AxisFault(String messageText,
QName faultCode,
Throwable cause)
|
|
AxisFault(String messageText,
String faultCode)
|
|
AxisFault(String messageText,
String faultCode,
Throwable cause)
|
|
AxisFault(String message,
Throwable cause)
|
|
AxisFault(Throwable cause)
construct a fault from an exception TODO: handle AxisFaults or SOAPFaultException implementations differently? |
Method Summary | |
---|---|
void |
addHeader(org.apache.axiom.soap.SOAPHeader header)
Add a header to the list of fault headers |
void |
addReason(String text)
Add a reason for the fault in the empty "" language |
void |
addReason(String text,
String language)
Add a reason for the fault |
Throwable |
getCause()
|
org.apache.axiom.om.OMElement |
getDetail()
Get the current fault detail |
QName |
getFaultCode()
|
org.apache.axiom.soap.SOAPFaultCode |
getFaultCodeElement()
|
org.apache.axiom.soap.SOAPFaultDetail |
getFaultDetailElement()
|
Map |
getFaultElements()
|
String |
getFaultNode()
|
org.apache.axiom.soap.SOAPFaultNode |
getFaultNodeElement()
|
org.apache.axiom.soap.SOAPFaultReason |
getFaultReasonElement()
|
String |
getFaultRole()
|
org.apache.axiom.soap.SOAPFaultRole |
getFaultRoleElement()
|
String |
getMessage()
|
String |
getNodeURI()
Get the faulting node uri. |
String |
getReason()
Returns the first fault reason, if available. |
ListIterator |
headerIterator()
Iterate over all of the headers |
List |
headers()
Get at the headers. |
static AxisFault |
makeFault(Exception 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 |
setFaultCode(QName soapFaultCode)
|
void |
setFaultCode(String soapFaultCode)
|
void |
setNodeURI(String nodeURI)
Set the faulting node uri. |
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(String message)
message
- public AxisFault(QName faultCode, String faultReason, Throwable cause)
faultCode
- - fault code of the message as a QNamefaultReason
- - the reason for the fault. The language will be defaulted to 'en'cause
- public AxisFault(QName faultCode, String faultReason, String faultNode, String faultRole, org.apache.axiom.om.OMElement faultDetail)
public 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
- soapFaultReason
- soapFaultNode
- soapFaultRole
- public AxisFault(Throwable cause)
cause
- public AxisFault(String messageText, 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(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(String message, Throwable cause)
message
- cause
- public AxisFault(String messageText, QName faultCode, 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(String messageText, String faultCode, 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 FaultMethod Detail |
---|
public void addHeader(org.apache.axiom.soap.SOAPHeader header)
header
- to add.public void addReason(String text)
text
- text messagepublic void addReason(String text, String language)
text
- text messagelanguage
- languagepublic String getReason()
public ListIterator headerIterator()
public List headers()
public static AxisFault makeFault(Exception e)
e
- the Exception
to build a fault for
AxisFault
representing e
public org.apache.axiom.om.OMElement getDetail()
public QName getFaultCode()
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 String getNodeURI()
public void setDetail(org.apache.axiom.om.OMElement detail)
detail
- public void setFaultCode(QName soapFaultCode)
public void setFaultCode(String soapFaultCode)
public void setNodeURI(String nodeURI)
public Map getFaultElements()
public String getFaultNode()
public String getFaultRole()
public String getMessage()
getMessage
in class RemoteException
public Throwable getCause()
getCause
in class RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |