将关联数组(Hashmap)作为参数传递给xml rpc

Alt*_*taf 2 java xml xml-rpc

我想从Java XML-RPC,我在传递关联数组(Hashmap)作为参数时面临问题.这是我的代码.

 XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
        config.setServerURL(new URL(ServeUrl));
        XmlRpcClient client = new XmlRpcClient();
        client.setConfig(config);
        Map map = new HashMap();
        map.put(Parameter Name, Parameter Value);
        map.put(Parameter Name , Parameter Value);
        Object result = client.execute("method name", map);
Run Code Online (Sandbox Code Playgroud)

Reg*_*gis 5

HashMap需要包装在一个对象数组中:

Object result = client.execute("method name", new Object [] {map});
Run Code Online (Sandbox Code Playgroud)