You can turn on handleFault on the route, then any exception thrown
will become a fault message.
On Thu, Nov 7, 2013 at 11:26 AM, Delanghe Stefaan
stefaan.delan...@c4j.be wrote:
Hey,
First i am new to Camel. Hope not for long. :)
A question regarding the exception arise for my current
Hey,
First i am new to Camel. Hope not for long. :)
A question regarding the exception arise for my current project.
When I catch a particular exception
onException(SocketTimeOutException.class)
How can I convert this exception to a soapfault?
Kind regards,
Stefaan
You can use try()… catch() to build a SOAP fault like this
.doTry()
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
throw new IllegalStateException();
}
})
.doCatch(IllegalStateException.class).process(new Processor() {
@Override
public void
/faultcode
faultstring$exchange.getExchangeId()/faultstring
/soap:Fault
--
View this message in context:
http://camel.465427.n5.nabble.com/onException-convertions-to-soapFault-tp5742775p5742797.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Thanks for the suggestion.
Is it possible to do this directly in the route (onException) , based on
thrown exception?
Can i avoid using the processor?
thnx
Stefaan
--
View this message in context:
http://camel.465427.n5.nabble.com/onException-convertions-to-soapFault-tp5742775p5742788.html