Hi You can use the language component http://camel.apache.org/language
And make sure to set transform=false. Then you can essentially call a groovy script. But remember XML is not a programming language, so writing code in XML is not ideal. You would need to use CDATA blocks or have to escape > and & signs and whatnot. On Sun, Apr 13, 2014 at 11:38 AM, Max Bridgewater <[email protected]> wrote: > Hi, > > Does Spring DSL support Groovy in the processor construct? With Java DSL, I > can do this: > > from("direct:test") > .process { Exchange exchange -> println (exchange.in.body) } > .process { println (it.in.body) } > > > What about Spring DSL? > > I was hoping something like this would work: > > <process> > <groovy>Exchange exchange -> println (exchange.in.body) > </groovy><process> > > Thoughts? > Max -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
