I am trying to convert my RPC/Encoded Axis 1.1Final web service to a 
Wrapped/Literal Axis 1.2RC2 web service.  

To make things easier to debug I decided to create a RPC/Encoded and 
Wrapped/Literal version of a simple service...

public int[] getCustomer(int[] in0) throws java.rmi.RemoteException;
public TestDTO getUser(int[] in0) throws java.rmi.RemoteException; 

where

public class TestDTO 
{
        
        private String name;
        private int age;

        /**
         * Constructor for TestDTO.
         */
        public TestDTO() {
                super();
        }

        /**
         * Returns the age.
         * @return int
         */
        public int getAge() {
                return age;
        }

        /**
         * Returns the name.
         * @return String
         */
        public String getName() {
                return name;
        }

        
        /**
         * Sets the age.
         * @param age The age to set
         */
        public void setAge(int age) {
                this.age = age;
        }

        /**
         * Sets the name.
         * @param name The name to set
         */
        public void setName(String name) {
                this.name = name;
        }

}

Both were generated in the same fasion:

1. Create Java interface with methods
2. generated the deploy.wsdd using org.apache.axis.wsdl.WSDL2Java 
3.   deployed the web service to my server
4.  Added a web reference to my .NET client
5. Called the web service from my .Net client 

The .NET client is not serializing the response correctly for the 
Wrapped/Literal call as it is just initialising the object and I am getting 
default values, e.g., name is empty string.

It works fine for the RPC/Encoded version, e.g., name is Mary.

Help would be appreciated.


The WSDL for the RPC/Encoded is

 <?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions targetNamespace="urn:TestRPC" 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="urn:TestRPC" 
xmlns:intf="urn:TestRPC" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
xmlns:tns1="http://webservice.gpb.rbc.com"; 
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.2RC2
Built on Nov 16, 2004 (12:19:44 EST)

  --> 
- <wsdl:types>
- <schema targetNamespace="urn:TestRPC" 
xmlns="http://www.w3.org/2001/XMLSchema";>
  <import namespace="http://webservice.gpb.rbc.com"; /> 
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"; /> 
- <complexType name="ArrayOf_xsd_int">
- <complexContent>
- <restriction base="soapenc:Array">
  <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]" /> 
  </restriction>
  </complexContent>
  </complexType>
  </schema>
- <schema targetNamespace="http://webservice.gpb.rbc.com"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
  <import namespace="urn:TestRPC" /> 
  <import namespace="http://schemas.xmlsoap.org/soap/encoding/"; /> 
- <complexType name="TestDTO">
- <sequence>
  <element name="age" type="xsd:int" /> 
  <element name="name" nillable="true" type="soapenc:string" /> 
  </sequence>
  </complexType>
  </schema>
  </wsdl:types>
- <wsdl:message name="getCustomerResponse">
  <wsdl:part name="getCustomerReturn" type="intf:ArrayOf_xsd_int" /> 
  </wsdl:message>
- <wsdl:message name="getCustomerRequest">
  <wsdl:part name="in0" type="intf:ArrayOf_xsd_int" /> 
  </wsdl:message>
- <wsdl:message name="getUserRequest">
  <wsdl:part name="in0" type="intf:ArrayOf_xsd_int" /> 
  </wsdl:message>
- <wsdl:message name="getUserResponse">
  <wsdl:part name="getUserReturn" type="tns1:TestDTO" /> 
  </wsdl:message>
- <wsdl:portType name="TestRPC">
- <wsdl:operation name="getUser" parameterOrder="in0">
  <wsdl:input message="intf:getUserRequest" name="getUserRequest" /> 
  <wsdl:output message="intf:getUserResponse" name="getUserResponse" /> 
  </wsdl:operation>
- <wsdl:operation name="getCustomer" parameterOrder="in0">
  <wsdl:input message="intf:getCustomerRequest" name="getCustomerRequest" /> 
  <wsdl:output message="intf:getCustomerResponse" name="getCustomerResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="TestRPCSoapBinding" type="intf:TestRPC">
  <wsdlsoap:binding style="rpc" 
transport="http://schemas.xmlsoap.org/soap/http"; /> 
- <wsdl:operation name="getUser">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="getUserRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:TestRPC" use="encoded" /> 
  </wsdl:input>
- <wsdl:output name="getUserResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:TestRPC" use="encoded" /> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getCustomer">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="getCustomerRequest">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:TestRPC" use="encoded" /> 
  </wsdl:input>
- <wsdl:output name="getCustomerResponse">
  <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
namespace="urn:TestRPC" use="encoded" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="TestRPCService">
- <wsdl:port binding="intf:TestRPCSoapBinding" name="TestRPC">
  <wsdlsoap:address 
location="http://localhost:9080/InquiryWeb/services/ChannelIsland/TestRPC"; /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

The WSDL for the Wrapped/Literal is 
 <?xml version="1.0" encoding="UTF-8" ?> 
- <wsdl:definitions targetNamespace="urn:Test" 
xmlns:apachesoap="http://xml.apache.org/xml-soap"; xmlns:impl="urn:Test" 
xmlns:intf="urn:Test" xmlns:tns1="http://webservice.gpb.rbc.com"; 
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.2RC2
Built on Nov 16, 2004 (12:19:44 EST)

  --> 
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="urn:Test" 
xmlns="http://www.w3.org/2001/XMLSchema";>
  <import namespace="http://webservice.gpb.rbc.com"; /> 
- <element name="getUser">
- <complexType>
- <sequence>
  <element maxOccurs="unbounded" name="in0" type="xsd:int" /> 
  </sequence>
  </complexType>
  </element>
- <element name="getUserResponse">
- <complexType>
- <sequence>
  <element name="getUserReturn" type="tns1:TestDTO" /> 
  </sequence>
  </complexType>
  </element>
- <element name="getCustomer">
- <complexType>
- <sequence>
  <element maxOccurs="unbounded" name="in0" type="xsd:int" /> 
  </sequence>
  </complexType>
  </element>
- <element name="getCustomerResponse">
- <complexType>
- <sequence>
  <element maxOccurs="unbounded" name="getCustomerReturn" type="xsd:int" /> 
  </sequence>
  </complexType>
  </element>
  </schema>
- <schema elementFormDefault="qualified" 
targetNamespace="http://webservice.gpb.rbc.com"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
- <complexType name="TestDTO">
- <sequence>
  <element name="age" type="xsd:int" /> 
  <element name="name" nillable="true" type="xsd:string" /> 
  </sequence>
  </complexType>
  </schema>
  </wsdl:types>
- <wsdl:message name="getCustomerRequest">
  <wsdl:part element="intf:getCustomer" name="parameters" /> 
  </wsdl:message>
- <wsdl:message name="getUserRequest">
  <wsdl:part element="intf:getUser" name="parameters" /> 
  </wsdl:message>
- <wsdl:message name="getCustomerResponse">
  <wsdl:part element="intf:getCustomerResponse" name="parameters" /> 
  </wsdl:message>
- <wsdl:message name="getUserResponse">
  <wsdl:part element="intf:getUserResponse" name="parameters" /> 
  </wsdl:message>
- <wsdl:portType name="Test">
- <wsdl:operation name="getUser">
  <wsdl:input message="intf:getUserRequest" name="getUserRequest" /> 
  <wsdl:output message="intf:getUserResponse" name="getUserResponse" /> 
  </wsdl:operation>
- <wsdl:operation name="getCustomer">
  <wsdl:input message="intf:getCustomerRequest" name="getCustomerRequest" /> 
  <wsdl:output message="intf:getCustomerResponse" name="getCustomerResponse" /> 
  </wsdl:operation>
  </wsdl:portType>
- <wsdl:binding name="TestSoapBinding" type="intf:Test">
  <wsdlsoap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"; /> 
- <wsdl:operation name="getUser">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="getUserRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output name="getUserResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
- <wsdl:operation name="getCustomer">
  <wsdlsoap:operation soapAction="" /> 
- <wsdl:input name="getCustomerRequest">
  <wsdlsoap:body use="literal" /> 
  </wsdl:input>
- <wsdl:output name="getCustomerResponse">
  <wsdlsoap:body use="literal" /> 
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
- <wsdl:service name="TestService">
- <wsdl:port binding="intf:TestSoapBinding" name="Test">
  <wsdlsoap:address 
location="http://localhost:9080/InquiryWeb/services/ChannelIsland/Test"; /> 
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>



------------------------------------------------------------

This e-mail may be privileged and/or confidential, and the sender does not 
waive any related rights and obligations. Any distribution, use or copying of 
this e-mail or the information it contains by other than an intended recipient 
is unauthorized. If you received this e-mail in error, please advise me (by 
return e-mail or otherwise) immediately. 

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce 
pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation 
ou copie de ce message ou des renseignements qu'il contient par une personne 
autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce 
courrier électronique par erreur, veuillez m'en aviser immédiatement, par 
retour de courrier électronique ou par un autre moyen.

============================================================

<<winmail.dat>>

Reply via email to