Hi Claus, Actually, Current camel-cxf consumer calls the doneUoW, but it is called before sending the message back to the client. I will check if we can do some thing by applying a customer interceptor in CXF side to rethrow the exception out.
-- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On May 16, 2014 at 10:44:20 PM, Claus Ibsen ([email protected]) wrote: > Hi > > Willem if you are listening. Sounds like CXF consumer need to do like > http consumer does in CamelServlet, where the consumer creates the UoW > and do the doneUoW after the response has been written by CXF. > > Then if CXF fails, then we could detect this and have the UoW fail in Camel. > > But that requires CXF can report the failure to Camel somehow. > > > > On Fri, May 9, 2014 at 12:33 PM, ponderMuse wrote: > > I am now able to handle some SoapFaults via the onException() method, but > > not > > necessarily all of them. I am interested in handling a SoapFault which takes > > place during the service's response write process. > > > > The scenario I am testing is where the web service tries to write the > > response back to the client but the client is no longer there (i.e. > > client-server connection lost). In this case, cxf logs a stacktrace of type > > org.apache.cxf.interceptor.Fault: Could not send Message, and I can see in > > the stacktrace that it is intercepted by: MessageSenderInterceptor. But my > > route's onException() method is never called. I have tried onException() for > > the following Exception classes: java.lang.Exception.class, > > java.net.SocketException.class and > > javax.xml.stream.XMLStreamException.class > > (all the ones that are shown in the cxf stacktrace) but yet my onException() > > method is never called. > > > > Does the onException() code need to be placed in a specific section of my > > service's route in this case? At the moment I've placed it just after > > from(uri) and after my final to(ExchangePattern.InOut, mqUri) where mqUri > > has the following form: > > "wmq:REQUEST_Q?replyTo=RESPONSE_Q&replyToType=Exclusive&requestTimeout=45000". > > > > > > Cheers, > > PM. > > > > > > > > -- > > View this message in context: > > http://camel.465427.n5.nabble.com/How-to-Register-a-Default-Soap-Fault-Handler-in-Camel-tp3556065p5750961.html > > > > Sent from the Camel - Users mailing list archive at Nabble.com. > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > Email: [email protected] > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen > hawtio: http://hawt.io/ > fabric8: http://fabric8.io/ >
