Thanks Sergey, 

I did further digging into this and it turns out that using aggregate to
aggregate all the results creates a new exchange, so that's why the result
of the response was null, so I modified the route and pretty much used the
GroupedExchangeAggregationStrategy logic so the route becomes like the
following: 

from(Constants.REST_ENDPOINT) 
                .routeId(getClass().getName()) 
                .log("Entering the route...") 
                .removeHeaders("CamelHttp*") 
                .to(Constants.DIRECT_ENDPOINT_ONE) 
                .to(Constants.DIRECT_ENDPOINT_TWO); 

from(Constants.DIRECT_ENDPOINT_ONE).process(new
AddingOperationNameAndOperationNameSpace_FIRST_ENDPOINT()).to(FIRST_SOAP_ENDPOINT)
.process(new FirstResultHolder()).to(Constants.DIRECT_AGGREGATE_ENDPOINT);

from(Constants.DIRECT_ENDPOINT_TWO).process(new
AddingOperationNameAndOperationNameSpace_SECOND_ENDPOINT())
.process(new SecondResultHolder()).to(Constants.DIRECT_AGGREGATE_ENDPOINT);

from(Constants.DIRECT_AGGREGATE_ENDPOINT) 
.process(new ResultExtractorProcessor())
.bean(new ProcessJsonResponse(), "processBody");

and the key is FirstResultHolder and ResultExtractorProcessor where I hold
the exchange result coming from the web services as an Exchange property and
process the result as a Json. 

This seems to work however there's a bit of latency involves as it does not
use the parallel processing. 



   



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-cxfrs-proxy-response-tp5774775p5775303.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to