On 21/02/2008, Joachim Geidel <[EMAIL PROTECTED]> wrote:
>
>  A friend and I are new to Camel, and we are trying to figure out how it works
>  and what we can do with it. We ran into a problem when using xstream for
>  marshaling. We start with XML file input, unmarshal it, change the Java
>  object, marshal it, and store it in a destination queue. This looks exactly
>  like one of the Camel test cases, except that the order of marshal/unmarshal
>  is reversed. However, the message body is null after marshaling.
>
>  We have used Camel 1.3.0 from the FUSE download. This is our code, stripped
>  to the essentials:
>
>  ----
>
>  public class WGRUSRouteBuilder extends SpringRouteBuilder {
>
>         @Override
>         public void configure() {
>
>                 from("file:data/input?noop=true")
>                         .unmarshal().xstream()
>                         .process(new Processor() {
>                                 public void process(Exchange exchange)
>  throws Exception {
>                                         System.out.println("Processor: " +
>  exchange.getIn());
>                                 }
>                         })
>                         .marshal().xstream()
>                         .process(new Processor() {
>                                 public void process(Exchange exchange)
>  throws Exception {
>                                         System.out.println("Processor: " +
>  exchange.getIn());
>                                 }
>
>                         })
>                         .to("mock:result");
>         }
>  }
>  ----
>
>  Unmarshaling creates a Java object as expected, but the second println shows
>  that marshaling doesn't set the message body to an XML string as we had
>  expected. Did we miss something, or is it a bug?

Hmm, maybe its a bug. Any chance you could create a JUnit test case
(or modify one thats already there) that shows the message body
becomes null?


-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Reply via email to