camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pascal Fenkam <pas...@fenkam.name>
Subject Re: Calling Processor in Spring DSL
Date Mon, 14 Apr 2014 09:58:54 GMT
That's unfortunate. My workaround is to do this. A better/cleaner
solution would be appreciated.

<setHeader headerName="process">
    <groovy>Exchange exchange -> println (exchange.in.body)
</groovy>
</setHeader>

println was just an example. logging is not really what I want to do
in the groovy processor.

Max.

On Sun, Apr 13, 2014 at 10:45 PM, Willem Jiang <willem.jiang@gmail.com> wrote:
> No, Spring DSL don’t support that , but you can use simple language which is supported
by log to print the message body if you like.
>
> <log message="${body}” />
>
> BTW, the Java DSL you should is wrote in groovy.
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (English)
> http://jnn.iteye.com (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
> On April 14, 2014 at 2:39:26 AM, Max Bridgewater (max.bridgewater@gmail.com) 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:
>>
>>
>> Exchange exchange -> println (exchange.in.body)
>>
>>
>> Thoughts?
>> Max
>>
>

Mime
View raw message