camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: write servlet response body in subsequent route
Date Fri, 08 Nov 2013 09:06:55 GMT
Hi

That is possible. The servlet component writes the response message
from what the message contains, when the routing is done.

But mind about using getOut. See this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html



On Thu, Nov 7, 2013 at 2:15 PM, Christian Schaefer <syrious3000@yahoo.de> wrote:
> Hi there,
>
> I built a route with a servlet-Consumer-Endpoint.
> from(servlet)....to(direct:a)
>
> Now I need to write a servlet response in a second route.
> from(direct:a).process(...).exchange.getOut().setBody("abc")
>
> However the caller does't receive the response body after calling the servlet route.
> (Btw. it works when everything is put in a single route. However that doesn't fulfil
my requirements.)
>
> Any ideas how to achieve that?
>
> regards
> Chris



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message