1
我想從Java的XML-RPC傳遞關聯數組(Hashmap)作爲參數時遇到問題。這裏是我的代碼。將關聯數組(Hashmap)作爲參數傳遞給xml rpc
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);
我也有這個問題如在xmlrpcClient.execute它未服用對象陣列。只允許參數是矢量。也許我正在使用一些不同版本的lib。我該怎麼辦 ? (plzzz不建議改變庫,因爲我已經實現了大部分代碼) –