java将关联数组(Hashmap)作为参数传递给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);
# 1 楼答案
HashMap需要包装在对象数组中: