Splitter[1] + Aggregator[2]. [1]http://camel.apache.org/splitter.html [2]http://camel.apache.org/aggregator2.html
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Wednesday, July 31, 2013 at 3:17 PM, sushil_vsk5 wrote: > Hello, > I have the following use case, > From a route, I want to call a remote service A using CXF which gives me a > list of data. For each data element in the list, I populate a response > object, and then I again have to call service B to get addtional data to > enrich this response object. Finally, I will return a collection of response > objects. How should I implement this in the best way? > For example, > > Response - Collection<X> > X > f1 > f2 > f3 > f4 > > Service A returns Collection<P> > I map from each element of this collection to create a new X with fields f1 > and f2 populated. Then I call Service B which returns object Q with which I > populate fields f3 and f4. Finally I return a collection of X > > What are the best patterns to realize this use case? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-Enrich-in-a-Loop-tp5736543.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).
