I create a new class that simply prints out the contents of the message. I am
finding the println command is changing the contents of the body.

As this code demonstrates, 
<1> STEP1 prints out the body as string. 
<2> STEP2 contains no output, the body is gone.

Why is the body empty in STEP2?
Is there a better way to printout the body?

public class ConsumerScreen implements Consumer {

        public void process(Exchange exchange) throws Exception {
// STEP1 - GOOD - HAS  CONTENT
                System.out.println(lineSep + 
exchange.getIn().getBody(String.class));
// STEP2 - BAD - HAS NO CONTENT
                System.out.println(lineSep + 
exchange.getIn().getBody(String.class));

        }
}

Thanks,
Michael

--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-printing-In-message-body-tp5469798p5469798.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to