The Artima Developer Community
Sponsored Link

Web Services Forum
Do I need to extend any of classes from AXIS to return multiple values?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Rajesh G

Posts: 2
Nickname: v4u2chat
Registered: Mar, 2007

Do I need to extend any of classes from AXIS to return multiple values? Posted: Mar 7, 2007 10:38 PM
Reply to this message Reply
Advertisement
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 in following way...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>
- <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>

Topic: code for windows calculator using vb.net Previous Topic   Next Topic Topic: AXIS webservice to return multiple values

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use