axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Green" <david.gr...@maketechnologies.com>
Subject RE: exception and SOAP fault
Date Thu, 01 May 2003 19:35:32 GMT
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 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18084) 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="http://schemas.xmlsoap.org/soap/envelope/" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <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="http://xml.apache.org/axis/">com.maketechnologies.webservice.test.BusinessException</ns1:exceptionName>
   </detail>
  </soapenv:Fault>
  <multiRef id="id0" soapenc:root="0" 
	soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
	xsi:type="ns2:BusinessException" 
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
	xmlns:ns2="http://test.webservice.maketechnologies.com">
   <errorCode xsi:type="xsd:int">7</errorCode>
   <message xsi:type="xsd:string">Parameter evp is required, but missing. (ref# 7)</message>
  </multiRef>
 </soapenv:Body>
</soapenv:Envelope>



-----Original Message-----
From: Dan Diephouse [mailto:dan@envoisolutions.com]
Sent: Thursday, May 01, 2003 4:49 PM
To: axis-dev@xml.apache.org
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: 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18084
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:
http://junktoast.com/EmployeeInfo.wsdl

Cheers,

- Dan Diephouse

David Green wrote:
> Steve,
> 
> 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.
> 
> David
> 

Mime
View raw message