camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From McDermott Raymond <>
Subject obtaining message header properties from message body
Date Mon, 08 Feb 2010 14:34:38 GMT

I am new to Camel and am trying to convert a hand-coded bridging router into
the Camel equivalent because - well, we have seen the light ;-)

The router uses a converter and then and exchange pattern.  All working

My next task is to inject some headers to assist the consuming clients to
pick the correct messages from the queue.

My trouble is that I cannot quite my head around the method needed to obtain
the data from the object that has the content body:

This is my code with a comment showing where the magic is needed:


import com.thoughtworks.xstream.XStream;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.dataformat.xstream.XStreamDataFormat;

public class RouteFromTQSToApp extends RouteBuilder {
    public void configure() throws Exception {
        XStreamDataFormat xStreamDataFormat = new XStreamDataFormat();
        xStreamDataFormat.setXStream(new XStream());

// Magic needed here... how do I reference the anonymous 'tqsMessage'
        .setOutHeader(TqsMessage.TQS_META_DATA, tqsMessage.tqsHeader)
// No further need of wizadry (at least not by me!)

I guess it has something to do with beanbinding but I just can't grok how to
activate it in this use case!

Any help will be greatly appreciated.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message