So would it be possible to write a special request handler in the bean´s
transport chain that takes your 
(non-Axis-Fault, means that the container will let it through unchanged)
application exception and wraps it into an appropriately massaged axis fault
such that the name of the original exception will appear in the response
envelope?

Then you can have a client-side stub that reconstructs the exception for you
....

CGJ 

-----Ursprüngliche Nachricht-----
Von: Kevin Conner [mailto:[EMAIL PROTECTED]] 
Gesendet: Donnerstag, 6. Februar 2003 17:59
An: '[EMAIL PROTECTED]'
Betreff: RE: AW: [JBoss-user] How to throw AxisFault in JBoss.net?


Sorry to take so long in responding but I've just been going through this
issue in our code, stand alone axis 1.0 + jboss (not jbossnet).

> This approach is outdated, because the best way, IMHO, is to take the 
> server-generated wsdl and pre-generate client stubs using the 
> wsdl2java toolkit. They should have some exception support there ready
> to remap the
> AxisFault to 
> ordinary java exceptions, shouldn´t they? Classname is there, 
> message is
> there, maybe not the stack trace.

The 1.0 code only adds the exception name if it is a subclass of AxisFault
so only the axis faults can be reproduced on the client side.  All other
exceptions get translated into an AxisFault containing only the message and
stack trace.

I have had to extend the wsdl2java to include my own type mapping hierarchy
and exception handling (the type mapping for some custom DTOs that are not
java beans).  The exception gets serialised into XML on the server side and
placed into the soap fault detail by my own EJB provider.  The new generated
proxy code catches the AxisFault on the client and, if the exception detail
is present, regenerates the original exception and throws it instead.

This has required a very big hack to get it working but it does work. The
changes are very fragile so I would be loathed to change to another version
of Axis without a lot of work.  It is certainly safer to stick with the Axis
implementation but unfortunately that was not an option open to me.

        Kev

Kevin Conner
This is a personal e-mail. Any views or opinions presented are 
solely those of the author and do not necessarily represent those 
of Orchard Information Systems Ltd.


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com _______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.F-Secure.com/


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to