Passing associative array(Hashmap) as parameter to xml rpc
I want to XML-RPC from Java,I am facing problem while passing associative array(Hashmap) as parameter.Here is my code.
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL(ServeUrl));
XmlRpcClient client = new XmlRpcC开发者_如何转开发lient();
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);
The HashMap needs to be wrapped in an object array:
Object result = client.execute("method name", new Object [] {map});
精彩评论