We have a problem getting Hashtable parameters getting passed properly
in a webservice request, for instance I created a test method like:

        @WebMethod(operationName="doSomething")
        Hashtable<String, String> doSomething(
                        @WebParam(name="action") String action,
                        @WebParam(name="extraFields") Hashtable<String, String> 
extraFields);


And then try to call this from a client with:

                Hashtable<String, String> extraFields = new Hashtable<String, 
String>();
                extraFields.put("profileId", "42");
                Hashtable<String, String> result = link.doSomething("GO", 
extraFields);
                System.err.println("result[text]= " + result.get("text"));

And a test server implementation:

                System.err.println("action = " + action + " profileId = " +
extraFields.get("profileId"));
                
                Hashtable<String, String> result = new Hashtable<String, 
String>();
                result.put("text", "TEST");
                return result;


But the printouts just become:
(server) action = GO profileId = null
(client) result[text]= null

And the actual data sent in the request is just:
<soap:Envelope 
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Body><ns2:doSomething
xmlns:ns2="http://ersifextlink.interfaces.ers.seamless.com/";><action>GO</action><extraFields/></ns2:doSomething></soap:Body></soap:Envelope>

The funny thing is that if we wrap the parameter in our own class
CONTAINING a java.util.Hashtable, then it seems to WORK?!?

Any hints? are we missing some information in the annotations? or is
this a CXF specific issue?

Reply via email to