Hi

See this FAQ
http://camel.apache.org/why-is-my-message-body-empty.html

On Sat, Jan 23, 2016 at 6:26 PM, rkomulwad <[email protected]> wrote:
> Below is the configuration, the output of the second log statement is always
> blank. The first log statement prints the REST response, the second log
> statement always prints a empty body.
>
> <camelContext xmlns="http://camel.apache.org/schema/spring";>
>         <restConfiguration component="jetty" host="localhost" port="8080"
> bindingMode="auto" />
>         <rest path="/say">
>                 <post uri="/hello">
>                         <route>
>                                 <log message="1. Request from REST Service 
> ${in.body}" />
>                                 <log message="2. Request from REST Service 
> ${in.body}" />
>                                 <setHeader headerName="sampleHeader">
>                                         <constant>header value</constant>
>                                 </setHeader>
>                                 <setBody>
>                                         <simple>Hello World</simple>
>                                 </setBody>
>                         </route>
>                 </post>
>         </rest>
> </camelContext>
>
> To test
> curl -H "Content-Type: application/xml" -d
> "<parent><child></child></parent>" -X POST http://localhost:8080/say/hello
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Body-lost-after-Logging-response-from-REST-endpoint-tp5776597.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to