camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Block <andy.bl...@gmail.com>
Subject Re: How to set body part with using of XML DSL
Date Sat, 12 Sep 2015 21:55:42 GMT
Just realized that the $ were incorrectly placed within the simple tag. It should read ${body.context.requestId}
= ${property.requestId}</simple>. 

-- 
Andrew Block


On September 12, 2015 at 1:58:28 PM, Andrew Block (andy.block@gmail.com) wrote:

You can you the simple language to set the body within a camel message using the setBody tag.
An example of this for your scenario would be as follows

<to uri="switchyard://SomeService"/> 
<setBody>
<simple>{$body.context.requestId} = {$property.requestId}</simple> 
</setBody>

It is my assumption that your code sample was a snippet that is part a larger code sample
since there is a trailing </when> tag that I did not account for.

Thanks,
Andy



-- 
Andrew Block
On September 12, 2015 at 9:17:48 AM, horyna (phofficial@centrum.cz) wrote:

Hi,

need set part of body - code below. Pls. how to do it? First <simple>
element is not alowed after <to>. Second the code below dont work :)

thx.

<to uri="switchyard://SomeService"/>
<simple>{$body.context.requestId} = {$property.requestId}</simple>
</when>



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-body-part-with-using-of-XML-DSL-tp5771461.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message