camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From panto <>
Subject Re: Empty BODY after Aggregation Strategy and convert to String
Date Sat, 01 Aug 2015 09:27:58 GMT
Code correction:

*Code in my inbound route:*

                .method(router, RecipientListRouter.METHOD_NAME) // Routes
to a list of direct internalEndpoints
.end(); /

*Code in my synchronousAggregationStrategy:*

/if (oldExchange == null) { 
        Object *myBody* = CamelHelper.getMessage(newExchange).getBody());
        CamelHelper.getMessage(newExchange).setBody(myBody, String.class)); 
        return newExchange; 
} /

*Code in each of my outbound routes:*

/from("direct:"+ internalEndpoint) 

I get the XML response of my outbound HTTP GET request, I see it with
debugger the *CachedOutputStream.WrappedInputStream* body instance and I
cannot unmarshal it to String to return it to my requestor. Any ideas? 

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

View raw message