You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jaishankar <ja...@wipro.com> on 2014/07/24 08:32:38 UTC

How to restart the route if no response is returned from the web service call

There are three routes, in each route a web service operation are called
using CXF endpoint.
 In each route there is CXF endpoint to call web service.
 1st route Begin
 2nd route Modify
 3rd route Commit
 
 If fault is returned from the web service call then stop the route.
 Lets take a scenario if no response from the web service call at commit
stage(3rd route Commit) then we've to wait for 6 seconds and retry from the
begin 1st route Begin for 15minutes.
 Even after that if no reply then stop the route.
 I'm able to do this with success scenario but if no response there I get
stuck. I don't know how to restart the route and retry whole process for
15minutes
 My question are:
 Does any one have solution to the above problem?



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-restart-the-route-if-no-response-is-returned-from-the-web-service-call-tp5754330.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to restart the route if no response is returned from the web service call

Posted by Jaishankar <ja...@wipro.com>.
Hi Claus,

If I use Producer Template we cannot handle *SOAPfault *or *SocketTimeOut
*Exceptions?
Is there any alternative solution for the problem?

ProducerTemplate producerTemplate =
exchange.getContext().createProducerTemplate();
Exchange exchangenew = producerTemplate.send("cxf:bean:TransactionBegin",
exchange);
producerTemplate.stop();.

If SOAP fault exception occurs the *exchangenew * Exchange becomes null.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-restart-the-route-if-no-response-is-returned-from-the-web-service-call-tp5754330p5754641.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to restart the route if no response is returned from the web service call

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I would write a java bean that controls the retry and whatnot as it
seems you have a special need.

And from the java bean you can use Camel's ProducerTemplate to easily
call a Camel route / send a message to an endpoint.

Then you can control the retry logic from java code which gives you
the power to start from where you want, and wait as long you need etc.

On Thu, Jul 24, 2014 at 10:46 AM, Jaishankar <ja...@wipro.com> wrote:
> This is my code.. This is properly executing but if no response then need to
> retry.
> Need some help Please
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-restart-the-route-if-no-response-is-returned-from-the-web-service-call-tp5754330p5754346.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: How to restart the route if no response is returned from the web service call

Posted by Jaishankar <ja...@wipro.com>.
This is my code.. This is properly executing but if no response then need to
retry.
Need some help Please



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-restart-the-route-if-no-response-is-returned-from-the-web-service-call-tp5754330p5754346.html
Sent from the Camel - Users mailing list archive at Nabble.com.