Tom,

The Axis client throws an AxisFault, unfortunately...
Here's what I posted previously:

> How can I get a service-specific exception passed back properly
> (proper type, etc) to the invoking client?
> 
> My service interface looks somewhat like this:
> > public TestType test(TestType data) throws TestExc;
> 
> The generated WSDL contains the proper typedef for the exception,
> WSDL2Java generates the proper classes (including the exception),
> the client stub has the proper signature (throws TestExc), but the
> type of returned exception on the client side at runtime is
> "org.apache.axis.AxisFault", not "TestExc".
> 
> And therefore it never catches "TestExc" in the client...

Is it a bug? Or am I missing something?

Thx,

-- Oliver

Tom Jordahl wrote:
> 
> Oliver,
> 
> Axis client should throw the fault specified in the WSDL if the Soap:Fault comes 
>from an Axis server.  The client side exception will NOT contain the data that we in 
>the server side exception, this is not implemented yet.
> 
> See the test in src/test/wsdl/faults.
> 
> The basic problem is there is no specification as to how the client knows where the 
>fault name lives and where the data lives in the soap:fault that is returned from a 
>web service.  There is now way currently to tie the info from the WSDL to an actual 
>implementation class.  Axis currently embeds the actual java class name of the 
>exception in the faultDetails element, but this is non-standard (i.e. we made this 
>up).
> 
> --
> Tom Jordahl
> Macromedia
> 
> -----Original Message-----
> From: Oliver Suciu [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 19, 2002 4:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: .Net ignores <wsdl:fault>?
> 
> Yes, but wsdl.exe doesn't generate the exception classes, so I
> can't catch an exception more specific than SoapException.
> 
> It actually doesn't matter cuz I don't even get exceptions
> propagated properly to an Axis client -- looks like the
> current state of the art is not ready yet for <fault>...
> 
> -- Oliver
> 
> PS: Just found out that C# has no equivalent to the Java
>     "throws" declaration -- interesting...
> 
> Scott Seely wrote:
> >
> > At this point in time, what .NET will do is receive the data and make it
> > visible to the client code as XML through the details element (IIRC).
> >
> > -----Original Message-----
> > From: Oliver Suciu [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 19, 2002 10:49 AM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: .Net ignores <wsdl:fault>?
> >
> > Hi all,
> >
> > (Sorry, this one is somewhat geared towards .Net...)
> >
> > I've got an Axis service that throws an exception, and WSDL2Java
> > correctly generates a <wsdl:fault> for the <wsdl:operation>.
> >
> > However, the .Net wsdl.exe seems to completely ignore the <fault>,
> > and no corresponding client-side code is generated.
> >
> > Has anybdoy got this working?
> > Anybdoy looked into .Net interop with respect to <fault>?
> >
> > Thanks,
> >
> > -- Oliver

Reply via email to