You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ramnar <ra...@gmail.com> on 2012/03/23 12:25:53 UTC

Message Transformation issue

Hi Folks
I have a very simple scenario where I have to append a text to the message
in a route.

Iam using the following code
new RouteDefinition().transform().simple("${in.body} appendedtext");

I wanted to generate the spring xml counter part of the above code.My jaxb
model generates the following xml
 <camel:transform>
                <camel:expressionDefinition/>
            </camel:transform>

which is incorrect.Can anyone guide me where Iam wrong


--
View this message in context: http://camel.465427.n5.nabble.com/Message-Transformation-issue-tp5589180p5589180.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Message Transformation issue

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Try upgrading the Camel version as there was a bug in older release in
terms of outputting as XML with expressions.

On Fri, Mar 23, 2012 at 12:25 PM, ramnar <ra...@gmail.com> wrote:
> Hi Folks
> I have a very simple scenario where I have to append a text to the message
> in a route.
>
> Iam using the following code
> new RouteDefinition().transform().simple("${in.body} appendedtext");
>
> I wanted to generate the spring xml counter part of the above code.My jaxb
> model generates the following xml
>  <camel:transform>
>                <camel:expressionDefinition/>
>            </camel:transform>
>
> which is incorrect.Can anyone guide me where Iam wrong
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Message-Transformation-issue-tp5589180p5589180.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Message Transformation issue

Posted by Reuben Garrett <re...@gmail.com>.
ramnar,

i believe something like this should work:
http://camel.apache.org/message-translator.html

<camelContext xmlns="http://camel.apache.org/schema/spring">
 <route>
   <from uri="direct:start"/>
   <transform>
     <simple>${in.body} extra data!</simple>
   </transform>
   <to uri="mock:end"/>
 </route>
</camelContext>

also, from what i've heard, the route models will have a much richer
semantic representation in camel 3.0 - so the java<->XML route translation
should be easier in the future.

~ Reuben

On Friday, March 23, 2012, ramnar <ra...@gmail.com> wrote:
> I have a very simple scenario where I have to append a text to the
message in a route.