On Thursday, December 08, 2011 10:47:53 AM fachhoch wrote:
> I have two different  cxf client     and for a user action I have to call
> the two services and combine the response  and show to user , I am planning
> to call each service  in a  thread   so that both service calls are made
> asynchronously, please  advice is  there a better way to do , what do you
> suggest to call multiple webservices  in a  servlet and combine the result
> and create the response (both the services are independent  of each other),
> please advice me.

Are you generating the clients with wsdl2java?    If so, and using a recent 
version of CXF, you should add the -asyncMethods flag to the wsdl2java command 
to have it generate some extra methods onto the clients that would help with 
this.   You can call the async versions of the methods you want passing in a 
callback and CXF will call back onto that when the response arrives.   Thus, 
you can go on doing whatever you need to do.  

Dan

> 
> 
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/calling-multiple-services-at-the-same-time-
> tp5059743p5059743.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to