Hey, I've been reading the chapter on Error handling over and over but I'm still failing miserably..
My scenario: a cxf proxy route which modifies the soapheaders, I want all soapfaults to be returned as-is to the caller, except when the soapfault contains a certain string. In that case I want to modify the soapheader of the original message again and redeliver. Modify/redeliver up to x times, then just return the soapfault to the caller. Given the power of the error handling in Camel this would seem easy. This is my route without error handling: from("cxf:bean:brokerOrderLimit?dataFormat=PAYLOAD") .process(soapHeadersEnricher) // modfies the soapheader .to("cxf:bean:backendOrderLimit?dataFormat=PAYLOAD") I have: getContext().setHandleFault(true); so SOAPFault gets recognized as an exception. If I use the doTry()..doCatch(SOAPFault.class).process(//examine fault).doEnd(), I succeed in recognized the special case I want to handle. But I have no idea how to control the route flow from that point. I want to change the soapheader and redeliver to the endpoint which returned the soapfault. Right now the caller just gets back an empty soap envelope when I do this. I also tried with from("cxf:bean:brokerOrderLimit?dataFormat=PAYLOAD") .process(soapHeadersEnricher) .to("cxf:bean:thalerOrderLimit?dataFormat=PAYLOAD") .onException(SoapFault.class) .onWhen(//filter the special case) .handled(true); // true or false doesn't seem to make a difference, also tried with continued But in this case the predicate is never even called (so the exception isn't caught), and the caller just receives the soapfault back. Not sure how to handle this problem, any ideas?