I am not finding any way to get the desired exception handling mechanism with throwExceptionOnFailure =false option in my http URL as explained below. I decided to live with throwExceptionOnFailure=true option and "getting HttpOperationFailedException" on any soap fault for now. The question I have is, is there any way I can grab "soapfault" message from "HttpOerationFailedException" inside my onException clause.
Thanks & regards Gita -----Original Message----- From: gnanda [mailto:[email protected]] Sent: Wednesday, June 09, 2010 3:00 PM To: [email protected] Subject: Re: camel 2.2 exception handling :not routing to errorQ Am I all alone on this. Could someone suggest please gnanda wrote: > > Hi All, > I am using servicemix 4.2 with camel 2.2. > I have a camel http component that calls an external service. In case of > any soap fault it raises HTTpOpertaionFailedException. I am setting > throwExceptionOnFailure=false to disable the auto throw of exception and > catching all the response code. Then I parse exception and throw > customized exception > > I have onexception clause defined in the camel configure() method as > below. > > onException(com.pf.simpleconsumer.camelrouter.HttpValidationException.class).maximumRedeliveries(1).handled(false).process(new > DefaultErrorHandler()).to( this.errorQ); > > What I am trying here is on HttpValidationException, it should retry the > http call to the external web service and if it still failed drops the > message in errorQ (not DLQ) > > > My route is transacted and has delivery policy attached to redeliver it > once. When there is an exception it retries 2 (1+1) times as expected, but > it is not going to errorQ, instead it is is going to DLQ. > > If I set handled(true) then it retries 1 time and dropping the message in > errorQ. The issue with this retry is, it does not retry http call to the > external service, it is just re-executing my soapfault parser where I > parse the incoming soap fault and throw exception. > I think it is because it takes the soap-call to external service as > success. > > if I set handled(false) then it retries the whole camel route. As a part > of this retry it retries the call to the external web service, but at the > end the message drops in DLQ instead of errorQ > > How would I achieve doing the retry of http call to the external service > and at the end of the retry dropping the message in the errorQ instead of > DLQ? > > > my route is as below > from(this.inputQ).transacted("PROPAGATION_REQUIRED").bean(processorBean, > "setLocationUrI") > .to("http://localhost/orderapp/OrderProcess?throwExceptionOnFailure=false").bean(resProcessorBean,"handleResponse"); > > Thanks & Regards > Gita > > -- View this message in context: http://old.nabble.com/camel-2.2--exception-handling-%3Anot-routing-to-errorQ-tp28822605p28834545.html Sent from the ServiceMix - User mailing list archive at Nabble.com.
