Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > BOOK: Professional XML Development with Apache Tools
|
BOOK: Professional XML Development with Apache Tools
This is the forum to discuss the Wrox book Professional XML Development with Apache Tools: Xerces, Xalan, FOP, Cocoon, Axis, Xindice by Theodore W. Leung; ISBN: 9780764543555
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional XML Development with Apache Tools section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 8th, 2007, 02:51 AM
Registered User
 
Join Date: Mar 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Do I need to extend any of classes from AXIS to r

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

Code:
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 .......

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>





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extend classes hafizmuhammadmushtaq Java Basics 1 April 8th, 2008 02:45 AM
Extend a border nloding CSS Cascading Style Sheets 1 September 1st, 2006 08:43 PM
Extend Autosuggest control [email protected] BOOK: Professional Ajax ISBN: 978-0-471-77778-6 0 May 27th, 2006 03:08 AM
Cannot implement or extend Rusk Apache Tomcat 1 June 16th, 2004 06:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.