Hi,

Please ensure you already take a look at java_first_jaxws example shipped with 
kit, that example demonstrates how to use adapter class to handle Map.
You can adjust that example to meet your requirement, it should be a good start 
for you.

Freeman
-------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-8-14, at 下午10:25, scarlettxu wrote:

> Hi Expert,
> 
> I am new to CXF and met one issue related with HashMap.
> It is not the problem of unmarshal and marshal normal HashMap to normal Java
> objects. I have created the XML adapter to fix this, the problem is below:
> 
> XML
> 
> *             <Transaction>  
>                       <trans>newUpdate</trans>
>                       <fields>
>                               <entries>
>                                <key>completedBy</key>
>                                <value xsi:type="xs:string">icil-cs</value>
>                               </entries>
>                               <entries>
>                                       <key>toDoItemAction</key>
>                                       <value 
> xsi:type="com.icil.cxf.shipment.bean.Transaction">
>                                               <Transaction 
> xsi:type="com.icil.cxf.shipment.bean.Transaction">
>                                                       
> <trans>updateIgnore</trans>
>                                                       <fields>
>                                                               <entries>
>                                                                       
> <key>from</key>
>                                                                       <value 
> xsi:type="xs:string">scarlett</value>
>                                                               </entries>
>                                                       </fields>
>                                               </Transaction>
>                                       </value>
>                               </entries>
>                       </fields>
>               </Transaction>*
> 
> 
> The Transaction maps to my Transaction.java class.
> after convert the inner Transaction is null
> *toDoItemAction=[value: null]*
> 
> I search for a day but have not found any solution, can anyone helps on
> this?
> 
> 
> 
> --
> View this message in context: 
> http://cxf.547215.n5.nabble.com/problem-with-unmarshal-xml-to-Java-object-when-there-is-HashMap-and-Map-contains-another-root-element-tp5712502.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to