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.

Reply via email to