Ouch...that's bad news for me...I need to get that exception to flag a problem to the underlying transport...nothing to do with SOAP really...just to be able to say...OOPS..something went wrong...
I tried the getExchange.get(Exception), getExchange().getInFault/OutFaultMesage without success... Any other way we can interject some code into that oneway interceptor? ----- Original Message ---- From: Daniel Kulp <[email protected]> To: [email protected] Cc: Coder One <[email protected]> Sent: Thu, November 18, 2010 10:52:28 AM Subject: Re: OneWay Destination / Original Thread / Exception On Thursday 18 November 2010 1:47:34 pm Coder One wrote: > With CXF 2.2.5, my custom Destination makes use of the USE_ORIGINAL_THREAD > setting > > @Oneway > void f() > { > throw new RuntimeException("ERROR"); > } > > incomingObserver.onMessage(cxincomingmsg); > Exception e = (Exception)cxincomingmsg.getContent(Exception.class); > > e is always null. How can I retrieve the exception in my custom > destination when the function is @Oneway and throws an exception? Honestly, I'm not sure you can. Per spec, oneway operations are not allowed to throw faults or anything so it's likely to be swollowed. It might be on the Exchange (msg.getExchange().get(Exception.class), but I'm not really sure. -- Daniel Kulp [email protected] http://dankulp.com/blog
