How to Pass HastMap kind of Data as a argument/retrun type of a CXF WebService
Issue
- I want to develop a WebService which can pass the HashMap<String,Object> implementation data as a Return type & argument of the WebService Operation.
- How to achieve the same so that the following kind of SOAP Message can be processed:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:myMap xmlns:ns2="http://test.org">
<myHashMap>
<entry>
<key>AAA</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:dateTime">2012-10-11T19:30:21.052+05:30</value>
</entry>
<entry>
<key>BBB</key>
<value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:dateTime">2012-10-11T19:30:21.052+05:30</value>
</entry>
</myHashMap>
</ns2:myMap>
</soap:Body>
</soap:Envelope>
Environment
- JBoss Enterprise Application Platform (EAP)
- 6.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.