It might make sense, as I am thinking of cleaning up fault handling so the
fault body *never* contains a stack trace of a nested fault, to stop stack
traces going down the wire in production boxes. We still need access to
contained faults when appropriate...




----- Original Message -----
From: "Robert Cauble" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 11:55 AM
Subject: No way to get original exception from AxisFault


If I have a service which throws an exception that doesn't extend AxisFault,
the exception is wrapped as an AxisFault, but there doesn't seem to be any
way to get the original exception.

I noticed that there is an element "exceptionName" in the fault-details, but
that is only set if the exception is a subclass of AxisFault, as you can see
from the piece of code in AxisFault.initFromException:

...
if ((target instanceof AxisFault) &&
    (target.getClass() != AxisFault.class)) {
   el = XMLUtils.StringToElement(Constants.NS_URI_AXIS,
                                 "exceptionName",
                                 target.getClass().getName());

   faultDetails.add(el);
}
...

Are there plans to add a "getRootException" method to AxisFault which
returns the root exception?

Any help would be appreciated.

Thanks,
Rob

Reply via email to