0
我是一个Java newbye。 我正在开发一个肥皂服务并尝试使用Soapui进行测试。使用Soap的Java Arraylist问题
除了返回一个数据列表,我得到空白以外,一切正常。
@WebMethod(operationName = "getOutputs", action = "getOutputs")
public ArrayList<String> getOutputs() {
_log.info(">> getOutputs");
ArrayList<String> stat = new ArrayList<>();
try {
stat.add("prova");
_log.info("<< getOutputs. Adding prova. len is " + stat.size());
} catch (Exception e) {
_log.error("getOutputs Error");
}
return stat;
}
当我运行SOAPUI即使在调试统计cointains一个元素我没有得到的值。日志文件也表示它拥有一个元素。 我该如何解决这个问题?
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getOutputsResponse xmlns:ns2="http://xxxx.com/">
<return/>
</ns2:getOutputsResponse>
</S:Body>
</S:Envelope>