camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkomulwad <rkomul...@outlook.com>
Subject Body lost after Logging response from REST endpoint
Date Sat, 23 Jan 2016 17:26:09 GMT
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.

Mime
View raw message