users@jax-ws.java.net

How to avoid nested java types in generated exception classes (WSDL to Java)?

From: <breadfan_at_gmx.de>
Date: Fri, 08 Sep 2006 14:35:04 +0200

Hi!

We generate java classes from a given wsdl with wsimport.
The service operations return faults with complex content (error description + error code).
Unfortunately jaxws always generates an exception class referencing a (generated) java class containing the error description and the error code.

Is there a way (e.g. jaxws or jaxb customization) to "flatten" this structure, so that the generated exception directly contains the error code and the description?

I've attached a test wsdl and schema for demonstration purposes. Jaxws generates a class "ExtestFault" (derived from Exception) which is referencing the generated MyTypeException class which contains the descripton and the error code.

Thanks in advance,
Chris

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer