0
如下所示。在字符串中所有值時,輸出爲<value>{val}</value>
,而不是<value><string>EXT</string></value>
java xmlrpc格式錯誤的輸出
HashMap parameterMap = new HashMap();
client.setTransportFactory(new CustomXmlRpcCommonsTransportFactory(client));
client.setConfig(config);
parameterMap.put("hostName", "EXT");
parameterMap.put("externalData1", "EXEMPLE");
parameterMap.put("originTimeStamp", new Date());
parameterMap.put("subscriberNumberNAI", 2);
parameterMap.put("subscriberNumber", "278980890");
ArrayList params = new ArrayList();
params.add(parameterMap);
client.executeAsync("Methode", params, callback);
而且還有我的輸出
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>GetBalanceAndDate</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>subscriberNumberNAI</name>
<value>
<i4>2</i4>
</value>
</member>
<member>
<name>hostName</name>
<value>EXT</value>
</member>
<member>
<name>subscriberNumber</name>
<value>278980890</value>
</member>
<name>originTimeStamp</name>
<value>
<dateTime.iso8601>20150912T08:50:04</dateTime.iso8601>
</value>
</member>
<member>
<name>externalData1</name>
<value>EXEMPLE</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
您使用哪些庫? –
我已經格式化了輸出,所以它的可讀性很好,它顯示''在' originTimeStamp '之前丟失了。也不要在任何地方看到' {val} ',那麼你的問題又是什麼? –
Andreas
嗨亞切克,我使用的Apache組織XMLRPC庫 –