One way to solve this (successfully tested) would be using a bean
encapsulating all the logic (http request, unmarshalling, testing for
errors):
<code>
//So we are probably better just building a bean that invokes the http
service, analyze the response and throws Exception if error 
        .setHeader("url",
constant("http://localhost:8088/cmd=ls%20/tmp/unlock";)).bean(ShellBeanService.class)
</code>

I believe a nice feature would be to allow to go to a particular point in
the case of a failure. I am unsure how to achieve that though.

I would appreciate any feedback on this. 

--
View this message in context: 
http://camel.465427.n5.nabble.com/Best-practice-to-parse-JSON-response-and-retry-if-error-tp5711530p5713181.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to