mardi 30 décembre 2014

Problems with returning String[] from Java Web Service to Swing client

I am just trying to return a String[] from a @webMethod to the ws swing client. The problem is that it is not returning anything. When I test the web service it shows



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>


the web service method is



public String[] getEmployeeNames()
{
String[] nameList = ........;
return nameList;
}




Aucun commentaire:

Enregistrer un commentaire