camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: How do I access the message class name from Simple?
Date Tue, 27 Sep 2011 09:00:14 GMT

Ah the Simple language omits methods on java.lang.Object.
We should likely permit to access the class to get the details from
it, or introduce a function that can grab the type.

Fell free to create a JIRA ticket.

On Mon, Sep 26, 2011 at 7:53 PM, djakubiec <> wrote:
> Hi,
> I have JMS topic where I publish a few different types of POJOs.
> I'm trying to create a log message that prints out the class of each POJO
> along with the toString() representation.  I got the toString() printing,
> but can't figure out how to get the class name via the Simple syntax.
> This presently works to print out the toString:
> <route>
>  <from uri="activemq:topic:mytopic"/>
>  <log logName="bus.messages" message="Got msg = [${body}]"/>
> </route>
> I *think* I want to do something like this:
>  <log logName="bus.messages" message="Got msg = ${body.class.getSimpleName}
> [${body}]"/>
> But when I do that I get various exceptions about class not being found.
> Can someone help point me in the right direction?
> Thanks!
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message