camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Freeman Fang <freeman.f...@gmail.com>
Subject Re: using camel to call multiple web services asynchronously
Date Fri, 09 Dec 2011 08:01:07 GMT
Or for using cxf, you can also use JAX-WS asynchronous invocation  
model directly, which allows the client thread to continue after
making a two-way invocation without being blocked while awaiting a
response from the server, you can check jaxws_async example shipped  
with cxf kit to get more details.

Freeman
On 2011-12-9, at 下午12:51, Claus Ibsen wrote:

> On Thu, Dec 8, 2011 at 4:22 PM, fachhoch <fachhoch@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: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/

---------------------------------------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com










Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message