我只是想从@webMethod返回一个String []到ws swing客户端。问题是它没有返回任何东西。当我测试它显示的Web服务时
Method returned
net.java.dev.jaxb.array.StringArray : "net.java.dev.jaxb.array.StringArray@2f741802"
SOAP Request
<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:getEmployeeNames xmlns:ns2="http://employee.bank.com/"/>
</S:Body>
</S:Envelope>
SOAP Response
<?xml version="1.0" encoding="UTF-8"?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<S:Body>
<ns2:getEmployeeNamesResponse xmlns:ns2="http://employee.bank.com/">
<return>
<item>73869</item>
</return>
</ns2:getEmployeeNamesResponse>
</S:Body>
</S:Envelope>
网络服务方法
public String[] getEmployeeNames()
{
String[] nameList = ........;
return nameList;
}