Reputation: 1578
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?
Upvotes: 3
Views: 8741
Reputation: 3140
In Camel 2.15.x I was doing this that way (and it worked):
<camel:setBody>
<camel:simple resultType="java.lang.String">null</camel:simple>
</camel:setBody>
In recent versions of Camel it might be changed
Upvotes: 0
Reputation: 31
I'm working with Talend ESB (camel 2.17). I done it in javaDSL. This worked good to me :
.setBody().simple("${null}")
Upvotes: 3
Reputation: 7067
How about this?
<camel:setBody>
<camel:simple>${bodyAs(null)}</camel:simple>
</camel:setBody>
Upvotes: 0
Reputation: 715
Please try this
<camel:setBody>
<camel:simple>${null}</camel:simple>
</camel:setBody>
Upvotes: 0