Hello,
I have a route that calls a http service. The service sends reply in http
body. Here is the snippet -
/
<setHeader headerName="Exchange.HTTP_QUERY">
   
<simple>ID=${in.header.inputMsg.ID}&userID=${in.header.inputMsg.userID}&service=createUser</simple>
</setHeader>
/
Comment - for some reason 've to set Body as well
/
<setBody>
   
<simple>ID=${in.header.inputMsg.ID}&userID=${in.header.inputMsg.userID}&service=createUser</simple>
</setBody>
<to uri="http://somehost.com/controlServlet"/>
/
Comment - This returns Inputstream so convert to string
/
<convertBodyTo type="java.lang.String"/>
/
The reply body is something like
/outputClassName=com.OutDTO&resultCode=1000001&resultMsg=DataAccess+update%28%29%3A++Cannot+update+record+id&id=0&serverStamp=1407391022041&/

I 've set streamCache="true" for this route and also storing this reply in
header (<setHeader headerName="replyMsg">) so that i can use it later in the
route.
 
I want to access the values for resultCode, id to build additional logic.
How can I access these values from http reply body or replyMsg stored in
header? 

Thanks for your help.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Accessing-variables-from-http-reply-body-tp5754899.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to