Is axis configured to handle you custom exceptions? If you look at samples.faults in the wsdd it defines the exceptions like below. When I define faults in my wsdl, then wsdl2Java puts configuration code in the stubs and skeleton classes.
<operation name="getEmployee" ... > ... <fault name="NoSuchEmployeeFault" qname="fns:fault" xmlns:fns="http://localhost:8080/ch09/services/Employee" class="samples.faults.NoSuchEmployeeFault" type="tns:NoSuchEmployeeFault" xmlns:tns="http://faults.samples"/> </operation> > -----Original Message----- > From: Stuart Barlow [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 20, 2003 8:07 AM > To: [EMAIL PROTECTED] > Subject: Re: best practise and exceptions > > > Well Im attempting the second approach. But with no success. > Would I be right in thinking that AXIS is still not able to > transport custom exceptions from the server to the client? > > At present I am just getting an AxisFault exception on the client. > > My exception dervives from Exception until I run the Java2WSDL and > WSDL2Java tools and then it derives from AxisFault. So as the code > is completely generated by AXIS I thought it would have worked. > > Any thoughts? > Stuart. > > > Stuart Barlow wrote: > > If I have a Java interface that I am going to be turning into > > a web service (with AXIS and the Java2WSDL and WSDL2Java tools). > > > > Should I define a hierarchy of exception classes that could be > > thrown from the server. e.g. > > > > Exception <--- MyServiceException > > MyServiceException <---- InvalidOperationException > > InvalidOperationException <---- LogonFailure > > MyServiceException <---- InvalidKeyException > > > > So I end up with a complex hierarchy of exceptions. But then AXIS > > will have to transport and de-derialize across the wire with all > > the complexities involved. > > > > Or should I just have a single exception class (MyServiceException) > > containing error code information? > > This second approach sounds easier for AXIS. > > > > Thanks for any advise, > > Stuart. > > > > >