axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Kamins <>
Subject Re: Problem with custom exceptions not getting deserialized
Date Tue, 15 Jul 2003 08:45:40 GMT

I faced the same problem (can't throw app-specific exceptions) and solved it by subclassing
AxisFault for all of my exceptions.  It allows me to explicitly set text for the actor, code,
details, etc. fields of the SOAP fault fairly easily in the constructors of the exceptions.

That being said, I am somewhat unhappy with this, because it prevents me from doing what seems
proper, which you (Peter) said in a previous post:

> keep my business logic interfaces (and the exceptions 
> which belong to it) as independent from the underlying 
> RPC technology as possible

A nicer solution might be some form of type-mapping serialization setup as is done with bean
mapping and serialization of other classes.  AFAIK this does not exist, and if nobody responds
to say it does, I second it as a nice feature request, and you should enter it in.  

After all, avoiding vendor lock-in is one of the reasons people choose open source to begin

Dan Kamins

On Tue, 15 Jul 2003 10:15:28 +0200, Peter Landmann wrote:
>Once again, as no one replied: Did really no one else face this
>problem up
>to now? Don't you use exceptions in your service interfaces?
>I took a look on the JAX-RPC specification 1.0 now: It defines that
>specific exceptions must extend java.lang.Exception - and not
>like RemoteException or AxisFault. This means that Axis 1.1 doesn't
>with the specification in this point, unfortunately. Should I write
>a bug
>Peter Landmann
>e-Business Services
>System Engineer
>Tel.: +49 89 898157-85
>Fax: +49 89 898157-49
>PEGAS systemhaus gmbh
>Rudolf-Diesel-Str. 1
>D-82166 Gräfelfing

View raw message