|
|||||||||||
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.axis.AxisFault
An exception which maps cleanly to a SOAP fault. This is a base class for exceptions which are mapped to faults. SOAP faults contain
Field Summary | |
protected String |
faultActor
|
protected javax.xml.namespace.QName |
faultCode
|
protected Vector |
faultDetails
|
protected ArrayList |
faultHeaders
SOAP headers which should be serialized with the Fault List |
protected String |
faultNode
|
protected String |
faultString
|
protected Vector |
faultSubCode
SOAP1.2 addition: subcodes of faults; a Vector of QNames |
Fields inherited from class java.rmi.RemoteException |
detail |
Constructor Summary | |
|
AxisFault()
No-arg constructor for building one from an XML stream. |
protected |
AxisFault(Exception target)
Wrap an AxisFault around an existing Exception - this is private to force everyone to use makeFault() above, which sanity-checks us. |
|
AxisFault(javax.xml.namespace.QName code,
javax.xml.namespace.QName[] subcodes,
String faultString,
String actor,
String node,
Element[] details)
make a fault in any namespace |
|
AxisFault(javax.xml.namespace.QName code,
String faultString,
String actor,
Element[] details)
make a fault in any namespace |
|
AxisFault(String message)
create a simple axis fault from the message. |
|
AxisFault(String code,
String faultString,
String actor,
Element[] details)
make a fault |
|
AxisFault(String message,
Throwable target)
create a fault from any throwable; When faulting a throwable (as opposed to an exception), stack trace information does not go into the fault. |
Method Summary | |
void |
addFaultDetail(Element detail)
append an element to the fault detail list |
void |
addFaultDetail(javax.xml.namespace.QName qname,
String body)
create an element of the given qname and add it to the details |
void |
addFaultDetailString(String detail)
add a string tag to the fault details. |
void |
addFaultSubCode(javax.xml.namespace.QName code)
This is new in SOAP 1.2, ignored in SOAP 1.1 |
void |
addFaultSubCodeAsString(String code)
This is new in SOAP 1.2, ignored in SOAP 1.1 |
void |
addHeader(SOAPHeaderElementAxisImpl header)
Add a SOAP header which should be serialized along with the fault. |
void |
clearFaultDetails()
clear the fault details list |
void |
clearFaultSubCodes()
This is new in SOAP 1.2, ignored in SOAP 1.1 |
void |
clearHeaders()
clear all fault headers |
void |
dump()
dump the fault info to the log at debug level |
String |
dumpToString()
turn the fault and details into a string, with XML escaping. |
String |
getFaultActor()
get the fault actor |
javax.xml.namespace.QName |
getFaultCode()
get the fault code |
Element[] |
getFaultDetails()
get all the fault details |
String |
getFaultNode()
This is new in SOAP 1.2 |
String |
getFaultReason()
This is SOAP 1.2 equivalent of getFaultString() |
String |
getFaultRole()
This is SOAP 1.2 equivalent of getFaultActor() |
String |
getFaultString()
get the fault string; this will never be null but may be the empty string |
javax.xml.namespace.QName[] |
getFaultSubCodes()
get the fault subcode list; only used in SOAP 1.2 |
ArrayList |
getHeaders()
Get the SOAP headers associated with this fault. |
protected void |
initFaultSubCodes()
do whatever is needed to create the fault subcodes data structure, if it is needed |
Element |
lookupFaultDetail(javax.xml.namespace.QName qname)
Find a fault detail element by its qname |
static AxisFault |
makeFault(Exception e)
Make an AxisFault based on a passed Exception. |
void |
output(SerializationContext context)
add this fault and any needed headers to the output context |
void |
printStackTrace(PrintStream ps)
The override of the base class method prints out the fault info before the stack trace |
void |
printStackTrace(PrintWriter pw)
The override of the base class method prints out the fault info before the stack trace |
boolean |
removeFaultDetail(javax.xml.namespace.QName qname)
find and remove a specified fault detail element |
void |
setFaultActor(String actor)
set the fault actor |
void |
setFaultCode(javax.xml.namespace.QName code)
set the fault code |
void |
setFaultCode(String code)
Deprecated. expect to see this go away after 1.1, use setFaultCodeAsString instead! |
void |
setFaultCodeAsString(String code)
set a fault code string that is turned into a qname in the SOAP 1.1 or 1.2 namespace, depending on the current context |
void |
setFaultDetail(Element[] details)
set the fault detail element to the arrary of details |
void |
setFaultDetailString(String details)
set the fault details to a string element. |
void |
setFaultNode(String node)
This is new in SOAP 1.2 |
void |
setFaultReason(String str)
This is SOAP 1.2 equivalent of setFaultString(java.lang.String) |
void |
setFaultRole(String role)
This is SOAP 1.2 equivalent of setFaultActor(java.lang.String) |
void |
setFaultString(String str)
set a fault string; |
String |
toString()
string operator |
void |
writeDetails(javax.xml.namespace.QName qname,
SerializationContext context)
Writes any exception data to the faultDetails This can be overrided (and is) by emitted exception clases. |
Methods inherited from class java.rmi.RemoteException |
getCause, getMessage |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected javax.xml.namespace.QName faultCode
protected Vector faultSubCode
protected String faultString
protected String faultActor
protected Vector faultDetails
protected String faultNode
protected ArrayList faultHeaders
Constructor Detail |
public AxisFault(String code, String faultString, String actor, Element[] details)
code
- fault code which will be passed into the Axis namespacefaultString
- fault stringactor
- fault actordetails
- details; if null the current stack trace and classname is
inserted into the details.public AxisFault(javax.xml.namespace.QName code, String faultString, String actor, Element[] details)
code
- fault code which will be passed into the Axis namespacefaultString
- fault stringactor
- fault actordetails
- details; if null the current stack trace and classname is
inserted into the details.public AxisFault(javax.xml.namespace.QName code, javax.xml.namespace.QName[] subcodes, String faultString, String actor, String node, Element[] details)
code
- fault code which will be passed into the Axis namespacesubcodes
- fault subcodes which will be pased into the Axis namespacefaultString
- fault stringactor
- fault actor, same as fault role in SOAP 1.2node
- which node caused the fault on the SOAP pathdetails
- details; if null the current stack trace and classname is
inserted into the details.protected AxisFault(Exception target)
public AxisFault(String message)
message
- public AxisFault()
public AxisFault(String message, Throwable target)
message
- any extra text to with the faulttarget
- whatever is to be turned into a faultMethod Detail |
public static AxisFault makeFault(Exception e)
public void clearFaultDetails()
public void dump()
public String dumpToString()
public void setFaultCode(javax.xml.namespace.QName code)
code
- a new fault codepublic void setFaultCode(String code)
public void setFaultCodeAsString(String code)
code
- fault codepublic javax.xml.namespace.QName getFaultCode()
public void addFaultSubCodeAsString(String code)
protected void initFaultSubCodes()
public void addFaultSubCode(javax.xml.namespace.QName code)
public void clearFaultSubCodes()
public javax.xml.namespace.QName[] getFaultSubCodes()
public void setFaultString(String str)
str
- new fault string; null is turned into ""public String getFaultString()
public void setFaultReason(String str)
setFaultString(java.lang.String)
public String getFaultReason()
getFaultString()
public void setFaultActor(String actor)
actor
- fault actorpublic String getFaultActor()
public String getFaultRole()
getFaultActor()
public void setFaultRole(String role)
setFaultActor(java.lang.String)
public String getFaultNode()
public void setFaultNode(String node)
public void setFaultDetail(Element[] details)
details
- list of detail elements, can be nullpublic void setFaultDetailString(String details)
details
- XML fragmentpublic void addFaultDetailString(String detail)
detail
- XML fragmentpublic void addFaultDetail(Element detail)
detail
- the new element to addpublic void addFaultDetail(javax.xml.namespace.QName qname, String body)
qname
- qname of the elementbody
- string to use as bodypublic Element[] getFaultDetails()
public Element lookupFaultDetail(javax.xml.namespace.QName qname)
qname
- name of the node to look for
public boolean removeFaultDetail(javax.xml.namespace.QName qname)
qname
- qualified name of detail
public void output(SerializationContext context) throws Exception
context
-
Exception
public String toString()
public void printStackTrace(PrintStream ps)
ps
- where to printpublic void printStackTrace(PrintWriter pw)
pw
- where to printpublic void addHeader(SOAPHeaderElementAxisImpl header)
header
- a SOAPHeaderElement containing some fault-relevant stuffpublic ArrayList getHeaders()
public void clearHeaders()
public void writeDetails(javax.xml.namespace.QName qname, SerializationContext context) throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |