|
|||||||||||
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 |
Fields inherited from class java.rmi.RemoteException |
detail |
Constructor Summary | |
AxisFault()
No-arg constructor for building one from an XML stream. |
|
AxisFault(QName code,
QName[] subcodes,
java.lang.String faultString,
java.lang.String actor,
java.lang.String node,
org.w3c.dom.Element[] details)
Make a fault in any namespace. |
|
AxisFault(QName code,
java.lang.String faultString,
java.lang.String actor,
org.w3c.dom.Element[] details)
Make a fault in any namespace. |
|
AxisFault(java.lang.String message)
create a simple axis fault from the message. |
|
AxisFault(java.lang.String code,
java.lang.String faultString,
java.lang.String actor,
org.w3c.dom.Element[] details)
Make a fault in the Constants.NS_URI_AXIS namespace. |
|
AxisFault(java.lang.String message,
java.lang.Throwable t)
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(org.w3c.dom.Element detail)
Append an element to the fault detail list. |
void |
addFaultDetail(QName qname,
java.lang.String body)
Create an element of the given qname and add it to the details. |
void |
addFaultDetailString(java.lang.String detail)
add a string tag to the fault details. |
void |
addFaultSubCode(QName code)
Add a fault sub-code. |
void |
addFaultSubCodeAsString(java.lang.String code)
Add a fault sub-code with the local name code and namespace
Constants.NS_URI_AXIS . |
void |
addHeader(SOAPHeaderElement header)
Add a SOAP header which should be serialized along with the fault. |
void |
addHostname(java.lang.String hostname)
add the hostname string. |
void |
addHostnameIfNeeded()
add the hostname of the current system. |
void |
clearFaultDetails()
Clear the fault details list. |
void |
clearFaultSubCodes()
Clear all fault sub-codes. |
void |
clearHeaders()
Clear all fault headers. |
void |
dump()
Dump the fault info to the log at debug level. |
java.lang.String |
dumpToString()
turn the fault and details into a string, with XML escaping. |
java.lang.String |
getFaultActor()
get the fault actor |
QName |
getFaultCode()
Get the fault code QName . |
org.w3c.dom.Element[] |
getFaultDetails()
Get all the fault details. |
java.lang.String |
getFaultNode()
Get the fault node. |
java.lang.String |
getFaultReason()
This is SOAP 1.2 equivalent of getFaultString() . |
java.lang.String |
getFaultRole()
This is SOAP 1.2 equivalent of getFaultActor() . |
java.lang.String |
getFaultString()
Get the fault string; this will never be null but may be the empty string. |
QName[] |
getFaultSubCodes()
get the fault subcode list; only used in SOAP 1.2 |
java.util.ArrayList |
getHeaders()
Get the SOAP headers associated with this fault. |
org.w3c.dom.Element |
lookupFaultDetail(QName qname)
Find a fault detail element by its qname. |
static AxisFault |
makeFault(java.lang.Exception e)
Make an AxisFault based on a passed Exception. |
void |
output(org.apache.axis.encoding.SerializationContext context)
Add this fault and any needed headers to the output context. |
void |
printStackTrace(java.io.PrintStream ps)
The override of the base class method prints out the fault info before the stack trace. |
void |
printStackTrace(java.io.PrintWriter pw)
The override of the base class method prints out the fault info before the stack trace. |
boolean |
removeFaultDetail(QName qname)
Find and remove a specified fault detail element. |
void |
removeHostname()
strip out the hostname on a message. |
void |
setFaultActor(java.lang.String actor)
Set the fault actor. |
void |
setFaultCode(QName code)
Set the fault code. |
void |
setFaultCode(java.lang.String code)
Deprecated. expect to see this go away after 1.1, use setFaultCodeAsString instead! |
void |
setFaultCodeAsString(java.lang.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(org.w3c.dom.Element[] details)
Set the fault detail element to the arrary of details. |
void |
setFaultDetailString(java.lang.String details)
set the fault details to a string element. |
void |
setFaultNode(java.lang.String node)
Set the fault node. |
void |
setFaultReason(java.lang.String str)
This is SOAP 1.2 equivalent of setFaultString(java.lang.String) . |
void |
setFaultRole(java.lang.String role)
This is SOAP 1.2 equivalent of setFaultActor(java.lang.String) . |
void |
setFaultString(java.lang.String str)
Set a fault string. |
java.lang.String |
toString()
Stringify this fault as the current fault string. |
void |
writeDetails(QName qname,
org.apache.axis.encoding.SerializationContext context)
Writes any exception data to the faultDetails. |
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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AxisFault(java.lang.String code, java.lang.String faultString, java.lang.String actor, org.w3c.dom.Element[] details)
Constants.NS_URI_AXIS
namespace.
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(QName code, java.lang.String faultString, java.lang.String actor, org.w3c.dom.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(QName code, QName[] subcodes, java.lang.String faultString, java.lang.String actor, java.lang.String node, org.w3c.dom.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.public AxisFault(java.lang.String message)
message
- public AxisFault()
public AxisFault(java.lang.String message, java.lang.Throwable t)
message
- any extra text to with the faultt
- whatever is to be turned into a faultMethod Detail |
public static AxisFault makeFault(java.lang.Exception e)
e
- the Exception
to build a fault for
AxisFault
representing e
public void clearFaultDetails()
public void dump()
public java.lang.String dumpToString()
public void setFaultCode(QName code)
code
- a new fault codepublic void setFaultCode(java.lang.String code)
code
- a new fault codepublic void setFaultCodeAsString(java.lang.String code)
code
- fault codepublic QName getFaultCode()
QName
.
public void addFaultSubCodeAsString(java.lang.String code)
code
and namespace
Constants.NS_URI_AXIS
.
This is new in SOAP 1.2, ignored in SOAP 1.1
code
- the local name of the code to addpublic void addFaultSubCode(QName code)
code
- the QName
of the fault sub-code to addpublic void clearFaultSubCodes()
public QName[] getFaultSubCodes()
public void setFaultString(java.lang.String str)
str
- new fault string; null is turned into ""public java.lang.String getFaultString()
public void setFaultReason(java.lang.String str)
setFaultString(java.lang.String)
.
str
- the fault reason as a String
public java.lang.String getFaultReason()
getFaultString()
.
String
public void setFaultActor(java.lang.String actor)
actor
- fault actorpublic java.lang.String getFaultActor()
public java.lang.String getFaultRole()
getFaultActor()
.
public void setFaultRole(java.lang.String role)
setFaultActor(java.lang.String)
.
public java.lang.String getFaultNode()
public void setFaultNode(java.lang.String node)
node
- a String
representing the fault nodepublic void setFaultDetail(org.w3c.dom.Element[] details)
details
- list of detail elements, can be nullpublic void setFaultDetailString(java.lang.String details)
details
- XML fragmentpublic void addFaultDetailString(java.lang.String detail)
detail
- XML fragmentpublic void addFaultDetail(org.w3c.dom.Element detail)
detail
- the new element to addpublic void addFaultDetail(QName qname, java.lang.String body)
qname
- qname of the elementbody
- string to use as bodypublic org.w3c.dom.Element[] getFaultDetails()
public org.w3c.dom.Element lookupFaultDetail(QName qname)
qname
- name of the node to look for
public boolean removeFaultDetail(QName qname)
qname
- qualified name of detail
public void output(org.apache.axis.encoding.SerializationContext context) throws java.lang.Exception
context
-
java.lang.Exception
public java.lang.String toString()
public void printStackTrace(java.io.PrintStream ps)
ps
- where to printpublic void printStackTrace(java.io.PrintWriter pw)
pw
- where to printpublic void addHeader(SOAPHeaderElement header)
header
- a SOAPHeaderElement containing some fault-relevant stuffpublic java.util.ArrayList getHeaders()
public void clearHeaders()
public void writeDetails(QName qname, org.apache.axis.encoding.SerializationContext context) throws java.io.IOException
qname
- the QName
to write this undercontext
- the SerializationContext
to write this fault
to
java.io.IOException
- if we can't write ourselves for any reasonpublic void addHostnameIfNeeded()
public void addHostname(java.lang.String hostname)
hostname
- string name of a hostpublic void removeHostname()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |