Return-Path: Delivered-To: apmail-xml-axis-user-archive@xml.apache.org Received: (qmail 83903 invoked by uid 500); 13 Nov 2002 15:49:56 -0000 Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 83885 invoked from network); 13 Nov 2002 15:49:56 -0000 From: Ruslan.Zenin@ubs.com X-OpenMail-Hops: 1 Date: Wed, 13 Nov 2002 10:41:06 -0500 Message-Id: Subject: RE: (Chained) Exceptions and beanMapping MIME-Version: 1.0 TO: axis-user@xml.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline ;Creation-Date="Wed, 13 Nov 2002 10:41:06 -0500" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Steve, Sorry if my message sounded negative to you in any way. I did not mean to do it. I'm fully aware that Web Services are designed for interoperation among different platforms and languages. However, JAX-RPC has specified that this WS method can generate Fault events. The information of how it is handled by implementation is very ambiguous. So, I think it is up to AXIS team to implement proper handling if FAULTS. Am I wrong=3F Particularly I want to achieve Fault processing/handling similar to Complex type processing/handling. AXIS has a way (in wsdd) to register (typeMapping) custom serializer/deserializer for parameter. e.g. Should it be the same for FAULT typeMapping=3F For example I have the following WSDL declaration: =2E.. =2E.. then in wsdd file similarly to parameter typeMapping: =2D------------------ When I tried this, it did not pick up my custom typeMapping. Looks like it works only for wsdl:input / wsdl:output. Why not for wsdl:fault=3F Again, am I doing something wrong here=3F So, as you can see I'm trying to define ComplexType for SOAP Fault. In WSDL I describe my exception's fields. However, AXIS generated stubs does not serialize Exception's fields into= SOAP Fault object Also, I noticed if web service method throws exception not derived from AxisFault it DOES NOT serialize its fields (even if it follows JavaBean spec). SHOULDN'T it be changed=3F What would you suggest in the situation like this=3F I don't want to end= up with RE-ENCODING all my Java exceptions into AXIS specific class AxisFault - this would lock me into AXIS specific implementation. Should be more elegant way of doing this... regards, Ruslan Zenin http://www.geocities.com/russ=5Fzenin =2D----Original Message----- From: steve.l=20 Sent: November 12, 2002 7:11 PM To: steve.l; axis-user Subject: Re: (Chained) Exceptions and beanMapping =2D---- Original Message ----- From: Ruslan Zenin To: 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=3F >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 =2Dlanguages that dont have exceptions =2Dlanguages 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=3Fpull=3D/library/en-= us/d nser 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=3F =2Dsteve