Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Camel: Set body from resource

Basically, I'm trying to do this (incorrect code!):

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

How would you do this properly?

Cheers!

like image 684
YMA Avatar asked Dec 20 '22 05:12

YMA


1 Answers

You can possible try with

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

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

like image 170
Claus Ibsen Avatar answered Feb 21 '23 04:02

Claus Ibsen