camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: [JAXB] Object containing XML
Date Wed, 03 Aug 2011 09:48:32 GMT
On 8/3/11 1:40 PM, ousti wrote:
> Hello,
>
> I have one java object Y containing xml in one of its properties String X.
>
> I want to unmarshal what is contained in X but also preserve the other items
> contained in my object Y.
>
> I know camel has a getIn.setBody(X) property where i can set the body to X
> and then unmarshall it by calling unmarshall(myjaxb).
>
> However by doing this i will loose my object other properties. Is there a
> way to:
> 1. send only X to the unmarshall method
> 2. put this unmarshalled result within a property of my object Y
> 3. put back the object Y as camel message body such as getIn.setBody(Y).
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JAXB-Object-containing-XML-tp4661299p4661299.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

You can put the object Y into message header, and X as the message body. 
Then you can put object Y into the message body and set the property of 
Y with unmarshaed value in your customer processor.


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Mime
View raw message