On Thu, Dec 8, 2011 at 4:22 PM, fachhoch <fachh...@gmail.com> wrote:
> I call  a webservice for my application for a user action, I have spring,cxf
> client , I use this client to call the webservice, now our requirement added
> new webservice call , so I have to call two webservices , the old one and
> the new one, my initial plan  is in a method I will call  each  webservice,
> club the result return the result, this will take more time as I have to
> wait  for   first  webservice to  return result then call second webservice
> , other way is to call each webservice in a thread  asynchronously this way
> both webservices are called at the same time , an overall time is
> reduced,does camel has anything inbuilt for calling multiple webservices
> asynchronously ?
>

The ProducerTemplate have API for invoking async with either a Future
as return value, or a callback.
Then you can use that API from a Java bean and invoke the 2 web
services async, and assemble the replies using the Java API.

Some details here
http://camel.apache.org/async

As well the JavaDoc of the ProducerTemplate


>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/using-camel-to-call-multiple-web-services-asynchronously-tp5059120p5059120.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to