Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Using restlet as post - how to use the body?

$
0
0
Just so you know, I'm a newbie. A

This is my Context:

<camelContext trace="false" id="pg_rest_demo"
xmlns="http://camel.apache.org/schema/blueprint">
<route customId="true" id="RouteRestDemo">
<from
uri="restlet:http://localhost:9000/demo?restletMethods=GET,POST"/>
<setHeader headerName="aa">
<simple>${in.body}</simple>
</setHeader>
<log message="Payload: ${header.aa}"/>
<to uri="direct:toQueue"/>
<transform>
<simple>Thanks for your ${header.CamelHttpMethod} message, have
a nice day! ${in.header.aa} The End</simple>
</transform>
</route>
<route customId="true" id="RouteToQueue" >
<from uri="direct:toQueue"/>
<log message="Payload in RouteToQueue ${header.aa}"/>
<to uri="mock:theend"/>
</route>
</camelContext>

The problem is that the payload are shown in the first log, but not in the
respose message and not in the second log output from the route
"RouteToQueue".

Best regards
Öystein Andersen

Viewing all articles
Browse latest Browse all 5648

Trending Articles