camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoomanb <>
Subject Camel cxfrs proxy response
Date Mon, 07 Dec 2015 07:31:17 GMT

I have exposed a cxfrs endpoint as my proxy rest service, once getting the
request I'm calling two soap web services and getting the respond back from
those service, in this process I'm using camel aggregator to aggregate the
response results coming back from the soap calls, now up to here everything
works as expected, the issue I'm facing is I have problem returning the
response back to the rest client, so here's my route config: 

<cxf:rsServer id="rsServer" address="http://localhost:9002/route"
		loggingFeatureEnabled="true" loggingSizeLimit="20">
			<bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider" />

<bean id="requestProcessing" class="com.RequestProcessing" />

<camelContext trace="true" xmlns="">
         <routeBuilder ref="requestProcessing" />

Here's com.MyController: 

	public List<MyObjectList> getMyObject(@PathParam("objectId") String
objectId) {
		return null;


and here's the RequestProcessing class: 

		.log("Entering the route...")
		.process(new EndpointProcessorManager())


		.aggregate(constant(true), new GroupedExchangeAggregationStrategy())
		.process(new FinalTestProcessor())                                                     
		.bean(new ProcessJsonResponse(), "processBody")                                        
		.marshal(new JsonDataFormat(JsonLibrary.Jackson));

so in line [1] FinalTestProcessor processes the results from the web service
calls to extract the desired result as a list of objects say for example:
exchange.getIn().setBody(MyObjectList) . 
in line [2] I'm basically returning this result list as follows: 

return Response.status(Status.OK).entity(MyObjectList).build();

With this config all the calls and everything works but I can't seem to get
the json respond that I need back to the REST caller. 

Any help would be appreciated on this. 

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message