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;
        }

}[/code]

when I'm exposing the method as webservice...I'm gettting this error.

[b]org.xml.sax.SAXParseException: Premature end of file.[/b]


The wsdl for this is .......

[code] 
  <?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>
- <wsdl:message name="testServiceResponse">
  <wsdl:part name="testServiceReturn" type="impl:ContactAddress" /> 
  </wsdl:message>
- <wsdl:message name="addResponse">
  <wsdl:part name="addReturn" type="soapenc:string" /> 
  </wsdl:message>
  <wsdl:message name="testServiceRequest" /> 
- <wsdl:portType name="TestService">
- <wsdl:operation name="testService">
  <wsdl:input message="impl:testServiceRequest" name="testServiceRequest" /> 
  <wsdl:output message="impl:testServiceResponse" name="testServiceResponse"
/> 
  </wsdl:operation>
- <wsdl:operation name="add" parameterOrder="x">
  <wsdl:input message="impl:addRequest" name="addRequest" /> 
  <wsdl:output message="impl:addResponse" name="addResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="TestSoapBinding" type="impl:TestService">
  <wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"; /> 
- <wsdl:operation name="testService">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="testServiceRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://services.avon.com"; use="encoded" /> 
  </wsdl:input>
- <wsdl:output name="testServiceResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://v:9090/services/Test"; use="encoded" /> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="add">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="addRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://services.avon.com"; use="encoded" /> 
  </wsdl:input>
- <wsdl:output name="addResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
namespace="http://v:9090/services/Test"; use="encoded" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="TestServiceService">
- <wsdl:port binding="impl:TestSoapBinding" name="Test">
  <wsdlsoap:address location="http://v:9090/services/Test"; /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>
[/code]
-- 
View this message in context: 
http://www.nabble.com/Do-I-need-to-extend-any-of-classes-from-AXIS--to-return-multiple-values--tf3367581.html#a9369498
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to