Hi guys, I’m having a newbie problem with a webservice returning a list of objects.
This is the code:
public List<ExitService> example(String message) {
List<ExitService> objList = new ArrayList<ExitService>();
ExitService objExitService = new ExitService("text1","text2");
objVector.add(objExitService);
objExitService = new ExitService("text3","text4");
objVector.add(objExitService);
return objList;
}
This is the class:
public class ExitService {
String Texto;
String Texto2;
ExitService(String Texto,String Texto2) { this.Texto = Texto; this.Texto2=Texto2; }
}
And the resulting SOAP message
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soap:Body>
- <exampleResponse xmlns:ns1="http://helloPackage">
- <ns1:out>
<ns1:ExitService />
<ns1:ExitService />
</ns1:out>
</exampleResponse>
</soap:Body>
</soap:Envelope>