axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Green" <>
Subject RE: exception and SOAP fault
Date Thu, 01 May 2003 20:31:35 GMT

That's good news!  Thanks for the heads-up.


-----Original Message-----
From: Tom Jordahl []
Sent: Thursday, May 01, 2003 12:44 PM
To: ''
Subject: RE: exception and SOAP fault

Hi David and Dan,

Please note, the <exceptionName> element is an obsolete hack that I put in to get the
same exception class to be created on the client as was thrown on the server.  The 1.1 code
base keeps sending this element to allow Axis 1.0 clients to continue to work in the same
(broken) fashion.  I believe it is used as a fallback on the client, if present.  It probably
should not be.

For 1.1, the exceptions in the client are registered in a map, which maps QNames to Java classes.
 See the emitted client stubs for API usage.  When Axis gets an exception, it examines the
details for QNames, and looks them up in the map.  If it finds one, it hands the class name
and the element to the Bean deserializer, which then proceeds to create the exception class
and populate the data.

DO NOT create any code that depends on this exceptionName element.  There is no way that this
will be interoperable.  In particular, many people have different package/class names for
their exceptions on the client and server.

This is why this element is in an Apache axis namespace.

Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: David Green [] 
Sent: Thursday, May 01, 2003 3:36 PM
Subject: RE: exception and SOAP fault


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

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.

   <faultstring>com.maketechnologies.webservice.test.BusinessException: Parameter evp
is required, but missing. (ref# 7)</faultstring>
    <faultData href="#id0"/>
    <ns1:exceptionName xmlns:ns1="">com.maketechnologies.webservice.test.BusinessException</ns1:exceptionName>
  <multiRef id="id0" soapenc:root="0" 
   <errorCode xsi:type="xsd:int">7</errorCode>
   <message xsi:type="xsd:string">Parameter evp is required, but missing. (ref# 7)</message>

-----Original Message-----
From: Dan Diephouse []
Sent: Thursday, May 01, 2003 4:49 PM
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 

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:


- 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

View raw message