Don't use the setBody inside setProperty as its not allowed. You should do
like this:

<setProperty propertyName="data"> 
     <simple>${body}</simple> 
</setProperty> 

If you use Camel 2.3 or better you can convert the body to the type you
wanted
http://camel.apache.org/simple


<setProperty propertyName="data"> 
     <simple>${bodyAs(String)}</simple> 
</setProperty> 

Instead of simple you can use any of the scripting languages if you need
more power
http://camel.apache.org/languages.html

But then you need to add more JARs to your classpath.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Need-to-use-Spring-DSL-instead-of-Java-DSL-for-a-specific-use-case-tp3376657p3377088.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to