You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Merten Schumann <Me...@asg.com> on 2004/02/12 14:55:38 UTC

Original user-defined exception from Axis server rethrown in Axis client?

Hello,

is Axis (version 1.1) able to rethrow an original user-defined exception on
the client side?

I've read the user guide and all, there's a quite nice section about
exceptions. :-)

The exception of my service is written IMHO in a way JAX-RPC requires. It
has an "String info" field and "String getInfo()" method, it implementes
Serializable. In the WSDL of my service there's an wsdl:fault element, my
Exception is mentioned including it's "info" field.
WSDL2Java creates the Exception as expected, with the "info" field and a
constructor to take it.

But in a client I always get an AxisFault and not my exception. The fault's
toString() contains my exceptions toString() output, getCause() is null.
(I tried to use on the client side my original exception class (not the one
from generated wsdl2java output) but same happens).

faultActor null
faultCcode {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultReason foo foo   (toString() of my exception)
faultString   same as faultReason

I'm using GLUE right now to implement some web service stuff. They have
problems with exceptions too, but at least my original exception class is
used on client side. Now I want to achieve this with Axis as SOAP
implementation ...

So, is the "rethrow" feature implemented in Axis???
If yes, could anybody point me to a piece of information, how to use this
feature?

Thanx!
   Merten