OK, cool. Glad that worked for you. I usually use a header simply because
it passes from route to route while the properties do not.
But in this case, the use of the properties is probably better since you
don't need the property to go anywhere else. But glad you got it working.
On Thu, Sep 29, 2
OK got it.. I added it as a property on exchange.
Ranx wrote
> There are a number of ways but perhaps the simplest would be something
> like:
>
> .setHeader("customerId","${body.id}")
>
> right before the marshaling. Then in the http statement where the ID goes
> you can fish it out of the he
There are a number of ways but perhaps the simplest would be something like:
.setHeader("customerId","${body.id}")
right before the marshaling. Then in the http statement where the ID goes
you can fish it out of the header with something like ${header.customerId}.
I wrote all that free hand jus
sparekh wrote
> If the jms message is a serialized POJO then you can use the Camel OGNL
> expression to grab the id via body.id before marshalling it to JSON.
>
> Thanks,
> sparekh
Message is a serialized pojo. If i extract the id before marshalling, how
can i hand it over to the next stage?
-
To amplify on sparekh's answer I think with a POJO you could simply use:
"https4://x/api/customer/${body.id}"
On Wed, Sep 28, 2016 at 11:49 AM, sparekh wrote:
> How about a custom processor that parses the JSON string (via GSON) into a
> JSON object and sets up the HTTP request and headers.
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