开发者

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});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜