You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Sergio Bossa <se...@gmail.com> on 2005/04/24 17:20:38 UTC

WSDL2Java custom exception problem

Hi all,

When I try to generate client Java code from my WSDLs, I have some
problems with my custom exception.
My exception extends AxisFault and doesn't have additional parameters
(attributes): it uses the AxisFault fault string and fault code.
So, here is its schema:

<element name="MySOAPFault">
<complexType>
	<sequence/>
</complexType>
</element>

And here is its WSDL Message:

<wsdl:message name="MySOAPFault">
	<wsdl:part element="tns:MySOAPFault" name="fault"/>
</wsdl:message>

I validated the WSDL with CapeClear SOAEditor, and it seems valid.
However, when I call WSDL2Java, it generates a class called
MySOAPFault_Element, and the sources do not compile,
complaining about a MySOAPFault class missing.
If I remove the schema definition and change the WSDL Message in:

<wsdl:message name="MySOAPFault"/>

All works fine, and WSDL2Java generates a MySOAPFault class.
However, this doesn't follow the specs, because faults must have a
single part element.
What's the problem?
I use Axis 1.2RC2.

Regards,

Sergio B.
-- 
Sergio Bossa
Author and Developer of:
- Montag, Web Services System for XML Database Interaction:
  http://montag.sourceforge.net
- QuickNote:
  http://quicknote.sourceforge.net