Hi Sam,

As Bob Cotton mentioned, we are currently working on this, however, our
challenge is to get the data from our custom exception sent over as
well.  If your custom exception does not have any ivars, it should work
with the lastes version of the axis code.  You do, however, have to
catch your real EInvalidCustomer, not the code generated class.

We will send more details on what we did when we get it working.

|)ave 

On Tue, 2002-06-11 at 17:52, Sam Kapoor wrote:
> Hi:
> 
> what I want to do is write a custom exception class and propagate it 
> from one of the methods on my Web-Service to the client.  So I define 
> a Java exception class:
> public class EInvalidCustomer extends Exception {
>   public EInvalidCustomer(String err){
>    super(err);
>   }
> 
> The method on my web-service throws this EInvalidCustomer exception.
> Now I run the WSDL2Java and I get
> public class EInvalidCustomer extends org.apache.axis.AxisFault
> 
> Also in my WSDL I have a
> <wsdl:fault message="intf:EInvalidCustomer" name="EInvalidCustomer"/>
> 
> So in my client when I call the method I catch 2 exceptions, 1 is the 
> RemoteException and the other is EInvalidCustomer excpetion.  
> However,  the catch is always going to the RemoteException.  Now if I 
> replace EInvalidCustomer with AxisFault then the catch will go to the 
> AxisFault.
> 
> I cannot find any example on Axis doc's that show how to pass a custom 
> exception class.
> 
> Do you have any ideas????
> 
> Thanks,
> 
> -Sam
> 
-- 
And in my spare time, I think I'll write some code.

Reply via email to