axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sagara Gunathunga (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5064) Support HashMap type in the web service.
Date Mon, 25 Jul 2011 09:25:09 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070386#comment-13070386
] 

Sagara Gunathunga  commented on AXIS2-5064:
-------------------------------------------

Hi Paul, 

This is already supported , I just tried for your service as follows. 

1.) Server side 

public Map<String, Object> echoMap(Map<String, Object> testMap) {
        Set<Entry<String, Object>> entrySet = testMap.entrySet();
        for (Entry<String, Object> entry : entrySet) {
            System.out.println(entry.getKey() + " : " + entry.getValue()
                    + " : " + entry.getValue().getClass());
        }
        return testMap;
    }


2. code generation 

axis2-1.7.0-SNAPSHOT/bin/wsdl2java.sh -uw -u -uri http://localhost:8080/services/SimpleService?wsdl



3. Client side 

         org.apache.ws.namespaces.axis2.map.Map1 req = new org.apache.ws.namespaces.axis2.map.Map1();
         org.apache.ws.namespaces.axis2.map.Entry1 e1 = new org.apache.ws.namespaces.axis2.map.Entry1();
         e1.setKey("key1");
         e1.setValue("value1");
         org.apache.ws.namespaces.axis2.map.Entry1[] param = { e1};
         req.setEntry(param);

         org.apache.ws.namespaces.axis2.map.Map2 res = stub.echoMap(req);
         System.out.println(res.getEntry()[0].getKey());
         System.out.println(res.getEntry()[0].getValue());
 

I got expected results. 

Please test this again with latest Axis2 trunk build . If you will get this issue again please
attach your project here ( server /clients and configuration ) 

> Support HashMap type in the web service.
> ----------------------------------------
>
>                 Key: AXIS2-5064
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5064
>             Project: Axis2
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.5.4, 1.6.0
>            Reporter: Muhammed Shariq
>            Assignee: Sagara Gunathunga 
>             Fix For: 1.7.0
>
>
> Support HashMap type in the web service.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message