----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 12, 2002 1:42 PM
Subject: RE: (Chained) Exceptions and beanMapping


>Can anyone explain clearly WHY developers are forced
>to inherit from AxisFault class?

>It is a huge problem with the AXIS product. The reality is that
>lots of developers adding WEB Services to EXISTING applications.

You are thinking about it wrong. At least, you are if you are trying to turn
SOAP into a kind of RMI-over-XML.

The purpose of SOAP is interoperable web services, and that includes callers
using C++, Perl, C, Prolog, C# ...

That means
-languages that dont have exceptions
-languages that dont have java's 'you must declare all exceptions rule'

Over the wire, exceptions become soapfaults, which have a fixed structure, a
structure which includes an XML fragment. But what that far end makes of it,
is up to the far end. For many languages, it just becomes some XML they get
to look at.

JAX-RPC has this wierdness that says a java.rmi.RemoteException can be
marshalled provided it has a constructor with a named parameter for each of
the beans that get marshalled. So it is a) a fixed parent and b) an odder
way of deserializing than any other (I guess it allows immutable
exceptions). And that is a JCP spec, not an Axis spec, so dont blame us. NB:
I dont know how well JAX-RPC exceptions are handled in Axis.


Here is what .net does:
http://msdn.microsoft.com/webservices/default.aspx?pull=/library/en-us/dnser
vice/html/service09172002.asp

Scott Seely is the only MS employee I've seen bulding Java code during a
demo, even if he did use .vbs to build it rather than ant (we heckled him)

>And there is no way to change existing exceptions nor register custom
>serializer/desirializer.

>AXIS should not be so strict about exceptions. It should at least have
>an INTERFACE instead of a class

There is some validity in what you say. Meaning that there could be some
'getExceptionXML' interface that gets the XML for the exception. But the
other trick is to have a try/catch handler in your own endpoints that create
AxisFaults from your own faults and fills in the appropriate exceptions.
That doesnt help you at the far end, but as I've explained, all they get at
the far end is a SoapFault.

>In my case I becomes a showstopper to use AXIS at all, since it can't
>properly serialize my CustomExeptions at the moment.

1. you are free to correct axis as you see fit.
2. I think if you are trying to web-service-ize an existing app and
expecting an RMI or EJB API to suddenly become a web service you are going
to be disappointed, regardless of the web service framework you are using.

Can you tell us more about 'the problem' and your app as it exists so far?

-steve

Reply via email to