Apache Camel: set body from resource

Basically, I am trying to do this (wrong code!):

<camel:setBody> <camel:simple>resource:classpath:/myfiles/file.xml</camel:simple> </camel:setBody> 

How do you do it right?

Hooray!

+4
source share
1 answer

You can try with

 <to uri="language:constant:resource:classpath:/myfiles/file.xml"/> 

To use the language component: http://camel.apache.org/language.html Downloading content.

+10
source

Source: https://habr.com/ru/post/1483330/


All Articles