Are you sending your message through JMS?If so, the default behavior is to only keep headers with primitive values and String, Date, BigInteger and primitive wrappers... I don't know if this can be customized...http://camel.apache.org/jms.html
Cheers,Mathieu > From: [email protected] > To: [email protected] > Date: Wed, 26 Oct 2011 17:53:34 -0500 > Subject: Pass Object Through Route > > I have a basic bean object, setters and getters that I want to pass through > back up the Camel route. It implements serializable and has the generated > serialVersionUID. I have tried doing > > message.setHeader("myheader", myBean); > message.getExchange().setProperty("myheader", myBean); > > But on the backend, after calling down the route, the bean doesn't exist. I > can ask > Exchange result = producer.send(exchange); > logger.debug("Stuff A: " + exchange.getProperty("myheader")); > logger.debug("Stuff B: " + exchange.getOut().getHeader("myheader")); > logger.debug("Stuff C: " + exchange.getIn().getHeader("myheader")); > > All three are null, but when I pass a String instead of the myBean, I get the > string out. Is there a way to send an actual Object back from an Endpoint? > > > > > > Thanks, > Zach Calvert >
