exceptions handling with Webservices

2008-09-25 Thread uglything

Hie.

Here is my problem :

I have a webservice defined in an OpenEJB server (embedded CXF and JAXB-WS)

This webservice declares a method that throws a checked exception that
is declared as a @WebFault.

When the client calls the server and when the webmethod sends an
exception, the client receives a generic SoapFaultException with an
ApplicationException inside.
I expected my client to receive my business checked exception...

After having investigated a little bit, it appears that the
WebFaultOutInterceptor class in the bundled CXF version works as
follow :

When a fault is generated, it gets the cause. If the cause (or one of
it's parents) is annotated as a WebFault, a SOAP Fault containing the
correct webfault is formatted and sent and the client receives the
correct checked exception type as a result.

If not, it formats a default SOAP Fault with the message of the exception.
So the client receives a generic SOAPFaultException.

If I use CXF as a standalone server without OpenEJB, my exception is
correctly catched in the WebFaultOutInterceptor and as it is @WebFault
anotated, formats the corresponding soap fault.

In OpenEJB, when the exception appears on the server, the Stateless
container catches it, processes it  and chains it to the transaction
manager which in the end throws a new ApplicationException with my
exception as a cause.
But what the WebFaultOutInterceptor receives in this case is an
ApplicationException, which is NOT a @WebFault. So the interceptor
proceses this exception as a generic non-checked exception. Hence the
non typed exception on the client side...

Having realized that I tried to skip the new ApplicationException generation
by

1- marking my stateless webservice as nontransactional

@Stateless
@WebService(...)
@TransactionManagement(TransactionManagementType.BEAN)
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
class MyClass ...

2 - marking my exception as @ApplicationException

as it was my understanding of the specifications that
@ApplicationException should be re-thrown by the container as-is...

both actions where desperately useless...

So what can I do to have my server sending checked types ?

Thanks anyway for the time you will spend on that problem.
-- 
View this message in context: 
http://www.nabble.com/exceptions-handling-with-Webservices-tp19668275p19668275.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Fwd: Application Period Opens for Travel Assistance to ApacheCon US 2008

2008-09-25 Thread David Blevins



Begin forwarded message:


Resent-From: [EMAIL PROTECTED]
From: Gavin [EMAIL PROTECTED]
Date: September 25, 2008 8:36:44 AM CDT
To: [EMAIL PROTECTED]
Subject: Application Period Opens for Travel Assistance to ApacheCon  
US 2008

Reply-To: [EMAIL PROTECTED]

Dear PMCs,

Please could you forward the below message to your user@ and dev@  
mailing

lists, thanks in advance.

-

The Travel Assistance Committee is taking in applications for those  
wanting
to attend ApacheCon US 2008 between the 3rd and 7th November 2008 in  
New

Orleans.

The Travel Assistance Committee is looking for people who would like  
to be
able to attend ApacheCon US 2008 who need some financial support in  
order to
get there. There are VERY few places available and the criteria is  
high,
that aside applications are open to all open source developers who  
feel that
their attendance would benefit themselves, their project(s), the ASF  
and

open source in general.

Financial assistance is available for flights, accomodation and  
entrance
fees either in full or in part, depending on circumstances. It is  
intended
that all our ApacheCon events are covered, so it may be prudent for  
those in
Europe and or Asia to wait until an event closer to them comes up -  
you are

all welcome to apply for ApacheCon US of course, but there must be
compelling reasons for you to attend an event further away that your  
home
location for your application to be considered above those closer to  
the

event location.

More information can be found on the main Apache website at
http://www.apache.org/travel/index.html - where you will also find a  
link to

the application form and details for submitting.

Time is very tight for this event, so applications are open now and  
will end
on the 2nd October 2008 - to give enough time for travel  
arrangements to be

made.

Good luck to all those that will apply.

Regards,

The Travel Assistance Committee