Willem
I am not trying to unmarshal the whole HashMap
I need to unmarshal only one of the item in the Hashmap
I do know the key,
So I am looking for something like below
from(INB_Q_URI)
.routeId(ROUTE_ID_INB_RID)
.log( " START -----------------------------------------")
.unmarshal(jaxb("${body.myHashMap.get(OBJ_FOR_UNMARSHAL)}))
-thanks
-----Original Message-----
From: Willem jiang [mailto:[email protected]]
Sent: Tuesday, June 04, 2013 10:23 PM
To: [email protected]
Subject: Re: how to pass an XML string to the unmarshal in the route definition
If you are using JAXB to do the unmarshal work, you need to define a adapter in
the map class[1], as JAXB doesn't support the map directly.
Once you finished your map class, you can set it into your JAXB data format
context and your route should work as expected.
[1]http://javaevangelist.blogspot.com/2011/12/java-tip-of-day-generic-jaxb-map-v.html
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
(English)
http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On Wednesday, June 5, 2013 at 2:03 AM, Vegi, Vamsi (MAN-Corporate-CON) wrote:
> Hello
>
> I have the exchange body as a hashmap
>
> The hashmap has several <key, value> pairs, of which one needs to be
> unmarshalled.
>
> How can I pass that particular value (which is XML String) to the unmarshal
> In the following route
>
> from(INB_Q_URI)
> .routeId(ROUTE_ID_INB_RID)
> .log( " START -----------------------------------------")
> .unmarshal(jaxb)
>
>
>
> -thank you