camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sparekh <spar...@oneweb.net>
Subject Re: Parse Json inside RecipientList
Date Wed, 28 Sep 2016 16:49:50 GMT
How about a custom processor that parses the JSON string (via GSON) into a
JSON object and sets up the HTTP request and headers. I don't believe you
can use JsonPath to extract values, just choice or filter them.

The custom processor would translate String -> JSON Object, extract the id
from JSON object, set up CONTENT_TYPE, METHOD AND URI Headers, remove non
HTTP headers. If you set the Exchange.HTTP_URI header you can remove the
recipientList and have a to endpoint with a dummy value
(.to("https4://dummy"))

If the jms message is a serialized POJO then you can use the Camel OGNL
expression to grab the idea via body.id

Thanks,
sparekh



--
View this message in context: http://camel.465427.n5.nabble.com/Parse-Json-inside-RecipientList-tp5788162p5788164.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message