camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <>
Subject Re: Set response by a second route through "direct" routing?
Date Fri, 02 Sep 2011 21:19:38 GMT
Martin, this should work...just make sure you are setting the OUT message on
the exchange (exchange.getOut().setBody("RESPONSE"), etc)...

heinrichheine wrote:
> Hi,
> to make my route nicer i created a splitter in my incoming http route.
> Depending of the content i route the request to different routes via
> direct.
> The thing is, that i have to create the response for the http-request in
> my first route. But i want to create a response from within my directed
> routes. Is this possible?
> Example
> from("jetty://")
>  .choice()
>   .when().xpath(expression1)
>       .to("direct:goodRoute")
>   .when().xpath("expression2)
>       .to("direct:badRoute");
> So, i want to create the response for the http request in goodRoute and
> badRoute. But in real life, the response is just empty if i do so. Do i
> have to add an option to the direct route?
> Thanks
>  martin

Ben O'Day
IT Consultant -

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

View raw message