axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <>
Subject Re: exception and SOAP fault
Date Fri, 02 May 2003 00:38:12 GMT
So thats what you meant :)  My exception also gets mapped to the default 
namespace when it is thrown:



So no, my patch doesn't apply to this situation.

On the upside, my client code generated from wsdl2java correctly picks 
up the NoSuchEmployeeFault, whereas before just an AxisFault was thrown.

I'm not an expert in these issues but it would seem like the exception 
should have a namespace generated like 
instead of the default one (or in your case  I'll have to look at 
the code and figure out what is going on and why :).

- Dan

David Green wrote:
> Dan,
> Glad that the patch works!
> What I mean when I said that the exception type is in the Axis namespace is shown in
the following fault example.  Notice the <ns1:exceptionName> element, which is namespaced
to axis.  Is this what your patch (
applies to?
> In my opinion, any client (inlcuding Axis clients) should be able to figure out the exception
type from the WSDL (ie: the generated code should automatically map the fault type to a generated
exception class.)  This would make Axis clients truly interoperable.
> <soapenv:Envelope 
> 	xmlns:soapenv="" 
> 	xmlns:xsd="" 
> 	xmlns:xsi="">
>  <soapenv:Body>
>   <soapenv:Fault>
>    <faultcode>soapenv:Server.generalException</faultcode>
>    <faultstring>com.maketechnologies.webservice.test.BusinessException: Parameter
evp is required, but missing. (ref# 7)</faultstring>
>    <detail>
>     <faultData href="#id0"/>
>     <ns1:exceptionName xmlns:ns1="">com.maketechnologies.webservice.test.BusinessException</ns1:exceptionName>
>    </detail>
>   </soapenv:Fault>
>   <multiRef id="id0" soapenc:root="0" 
> 	soapenv:encodingStyle="" 
> 	xsi:type="ns2:BusinessException" 
> 	xmlns:soapenc="" 
> 	xmlns:ns2="">
>    <errorCode xsi:type="xsd:int">7</errorCode>
>    <message xsi:type="xsd:string">Parameter evp is required, but missing. (ref#
>   </multiRef>
>  </soapenv:Body>
> </soapenv:Envelope>
> -----Original Message-----
> From: Dan Diephouse []
> Sent: Thursday, May 01, 2003 4:49 PM
> To:
> Subject: Re: exception and SOAP fault
> Hi David (and everyone else too),
> Thanks for the great patch! I was actually just about to look into this 
> issue today when I started scanning the axis list again and found your 
> message.  I've been travelling for the past month so I've missed a few 
> things....
> Anyway, the patch works great.  Haven't tested it with .NET yet either, 
> but I will soon (when I reboot to windows).  However, it works great 
> with my axis client that is generated from wsdl.
> You mentioned that the exception is in the Axis namespace.  I can't say 
> for sure, but I think a patch that I have here: 
> is probably related.  It helps axis do intelligent auto typing if there 
> isn't a serializer pre-registered.  It doesn't put things in the default 
> axis namespace, it uses the Namespace class to generate a namespace from 
> the java type.
> If you want to take a peek at my WSDL that is generated check here:
> Cheers,
> - Dan Diephouse
> David Green wrote:
>>All great questions.
>>re: What happens at the WSDL generation time?
>>WSDL generation is not affected by the patch, however it appears to me as if the proper
WSDL is already being generated, providing that your exceptions are declared in the throws
clause of your method declaration.
>>Wrt interop, it looks to me like the exception details are namespaced from the WSDL,
so that should work (speculation) -- however the exception class is Axis-namespace, so I doubt
that would work well with non-axis clients.
>>With regards to the other questions, I don't know.

View raw message