Do I need to extend any of classes from AXIS to return multiple values? I'm exposing the following method as web service through AXIS to return multiple values.
public ContactAddress testService()
{
ContactAddress cAddr = new ContactAddress();
cAddr.setAddresses1("AAAAAAAAAAAAA");
cAddr.setAddresses2("BBBBBBBBBBBBB");
cAddr.setAddresses3("CCCCCCCCCCCCC");
return cAddr;
}
and the code for ContactAddress is
public class ContactAddress {
// member variables
private String addresses1;
private String addresses2;
private String addresses3;
public String getAddresses1() {
return addresses1;
}
public void setAddresses1(String addresses1) {
this.addresses1 = addresses1;
}
public String getAddresses2() {
return addresses2;
}
public void setAddresses2(String addresses2) {
this.addresses2 = addresses2;
}
public String getAddresses3() {
return addresses3;
}
public void setAddresses3(String addresses3) {
this.addresses3 = addresses3;
}
}
when I'm exposing the method as webservice...I'm gettting this error.
org.xml.sax.SAXParseException: Premature end of file.
The wsdl for this is .......
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://v:9090/services/Test" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://v:9090/services/Test" xmlns:intf="http://v:9090/services/Test" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)
-->
- <wsdl:types>
- <schema targetNamespace="http://v:9090/services/Test" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="ContactAddress">
- <sequence>
<element name="addresses1" nillable="true" type="soapenc:string" />
<element name="addresses2" nillable="true" type="soapenc:string" />
<element name="addresses3" nillable="true" type="soapenc:string" />
</sequence>
</complexType>
</schema>
</wsdl:types>
- <wsdl:message name="addRequest">
<wsdl:part name="x" type="soapenc:string" />
</wsdl:message>