Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set exchange body to null

I am trying to set null into the body of the exchange in xml definiton like this:

<camel:setBody>
    <camel:constant>null</camel:constant>
</camel:setBody>

or like this:

<camel:setBody>
    <camel:simple>null</camel:simple>
</camel:setBody>

they all give string "null" in the end.

Any idea about What the right form is?

like image 750
Neron Avatar asked Nov 18 '25 07:11

Neron


1 Answers

I'm working with Talend ESB (camel 2.17). I done it in javaDSL. This worked good to me :

.setBody().simple("${null}")
like image 122
viBerlemont Avatar answered Nov 21 '25 04:11

viBerlemont