You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Pasquale Imbemba <p....@gmail.com> on 2007/06/22 15:22:07 UTC

[Beginner] Deserializing array between Java and C#

Hello,

I am new to AXIS but quite enthusiast from what I've seen so far. I run it
on a Tomcat server. For now I am testing deployment with JWS.
I have two classes for testing purposes, one Address.java and Person.java.
Address has just five fields (street, town, zip, phone, and nation).
Person.java contains, among name and surname, also an array of Address.
What I did was: compiled the Address.java and place the Address.class into
the \WEB-INF\classes folder. I placed the Person.jws into the \webapps\axis
folder. I add a webreference to a C# project. I create a new Address and a
new Person and set the Person's address. Complier is happy, but at runtime,
I get a the following error (a being the name of the Address array variable)
"Message="org.xml.sax.SAXException: Deserializing parameter 'a':  could not
find deserializer for type {http://DefaultNamespace}Address"".

What do I need to do in order to correct this?

Thanks in advance
Pasquale

I enclose the WSDL file (sorry for the noise):
<wsdl:definitions targetNamespace="http://localhost:8080/axis/Person.jws">
-
    <!--
WSDL created by Apache Axis version: 1.4
Built on Oct 20, 2006 (09:30:31 GMT+00:00)
-->
-
    <wsdl:types>
-
    <schema targetNamespace="http://DefaultNamespace">
<import namespace="http://localhost:8080/axis/Person.jws"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
    <complexType name="Address">
-
    <sequence>
<element name="nation" nillable="true" type="xsd:string"/>
<element name="phone" nillable="true" type="xsd:string"/>
<element name="street" nillable="true" type="xsd:string"/>
<element name="town" nillable="true" type="xsd:string"/>
<element name="zip" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
-
    <complexType name="Person">
-
    <sequence>
<element name="address" nillable="true" type="impl:ArrayOf_tns1_Address"/>
<element name="age" nillable="true" type="xsd:string"/>
<element name="dateOfBirth" nillable="true" type="xsd:dateTime"/>
<element name="name" nillable="true" type="xsd:string"/>
<element name="surname" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</schema>
-
    <schema targetNamespace="http://localhost:8080/axis/Person.jws">
<import namespace="http://DefaultNamespace"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
    <complexType name="ArrayOf_tns1_Address">
-
    <complexContent>
-
    <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Address[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
-
    <wsdl:message name="getAddressResponse">
<wsdl:part name="getAddressReturn" type="impl:ArrayOf_tns1_Address"/>
</wsdl:message>
<wsdl:message name="getAddressRequest">

   </wsdl:message>
-
    <wsdl:message name="setNameRequest">
<wsdl:part name="name" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="createPersonRequest">
<wsdl:part name="surname" type="xsd:string"/>
<wsdl:part name="name" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="setSurnameResponse">

   </wsdl:message>
<wsdl:message name="setDateOfBirthResponse">

   </wsdl:message>
-
    <wsdl:message name="getNameResponse">
<wsdl:part name="getNameReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getAgeRequest">

   </wsdl:message>
-
    <wsdl:message name="setSurnameRequest">
<wsdl:part name="surname" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="createPersonResponse">
<wsdl:part name="createPersonReturn" type="tns1:Person"/>
</wsdl:message>
-
    <wsdl:message name="getSurnameResponse">
<wsdl:part name="getSurnameReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getSurnameRequest">

   </wsdl:message>
<wsdl:message name="setAddressResponse">

   </wsdl:message>
-
    <wsdl:message name="getDateOfBirthResponse">
<wsdl:part name="getDateOfBirthReturn" type="xsd:dateTime"/>
</wsdl:message>
-
    <wsdl:message name="setDateOfBirthRequest">
<wsdl:part name="dateOfBirth" type="xsd:dateTime"/>
</wsdl:message>
-
    <wsdl:message name="getAgeResponse">
<wsdl:part name="getAgeReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getNameRequest">

   </wsdl:message>
-
    <wsdl:message name="setAddressRequest">
<wsdl:part name="a" type="tns1:Address"/>
</wsdl:message>
<wsdl:message name="setNameResponse">

   </wsdl:message>
<wsdl:message name="getDateOfBirthRequest">

   </wsdl:message>
-
    <wsdl:portType name="Person">
-
    <wsdl:operation name="getAddress">
<wsdl:input message="impl:getAddressRequest" name="getAddressRequest"/>
<wsdl:output message="impl:getAddressResponse" name="getAddressResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="getName">
<wsdl:input message="impl:getNameRequest" name="getNameRequest"/>
<wsdl:output message="impl:getNameResponse" name="getNameResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="setName" parameterOrder="name">
<wsdl:input message="impl:setNameRequest" name="setNameRequest"/>
<wsdl:output message="impl:setNameResponse" name="setNameResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="setAddress" parameterOrder="a">
<wsdl:input message="impl:setAddressRequest" name="setAddressRequest"/>
<wsdl:output message="impl:setAddressResponse" name="setAddressResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="getSurname">
<wsdl:input message="impl:getSurnameRequest" name="getSurnameRequest"/>
<wsdl:output message="impl:getSurnameResponse" name="getSurnameResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="getDateOfBirth">
<wsdl:input message="impl:getDateOfBirthRequest"
name="getDateOfBirthRequest"/>
<wsdl:output message="impl:getDateOfBirthResponse"
name="getDateOfBirthResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="setDateOfBirth" parameterOrder="dateOfBirth">
<wsdl:input message="impl:setDateOfBirthRequest"
name="setDateOfBirthRequest"/>
<wsdl:output message="impl:setDateOfBirthResponse"
name="setDateOfBirthResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="setSurname" parameterOrder="surname">
<wsdl:input message="impl:setSurnameRequest" name="setSurnameRequest"/>
<wsdl:output message="impl:setSurnameResponse" name="setSurnameResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="getAge">
<wsdl:input message="impl:getAgeRequest" name="getAgeRequest"/>
<wsdl:output message="impl:getAgeResponse" name="getAgeResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="createPerson" parameterOrder="surname name">
<wsdl:input message="impl:createPersonRequest" name="createPersonRequest"/>
<wsdl:output message="impl:createPersonResponse"
name="createPersonResponse"/>
</wsdl:operation>
</wsdl:portType>
-
    <wsdl:binding name="PersonSoapBinding" type="impl:Person">
<wsdlsoap:binding style="rpc" transport="
http://schemas.xmlsoap.org/soap/http"/>
-
    <wsdl:operation name="getAddress">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getAddressRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getAddressResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getName">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getNameRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getNameResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setName">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setNameRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setNameResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setAddress">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setAddressRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setAddressResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getSurname">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getSurnameRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getSurnameResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getDateOfBirth">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getDateOfBirthRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getDateOfBirthResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setDateOfBirth">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setDateOfBirthRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setDateOfBirthResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setSurname">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setSurnameRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setSurnameResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getAge">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getAgeRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getAgeResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="createPerson">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="createPersonRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="createPersonResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
-
    <wsdl:service name="PersonService">
-
    <wsdl:port binding="impl:PersonSoapBinding" name="Person">
<wsdlsoap:address location="http://localhost:8080/axis/Person.jws"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Re: [Beginner] Deserializing array between Java and C#

Posted by Pasquale Imbemba <p....@gmail.com>.
I added Serialziable imports and implements to both classes.
Still got "org.xml.sax.SAXException: Deserializing parameter 'a':  could not
find deserializer for type {http://DefaultNamespace}Address"

Bye
p

On 22/06/07, Raghupathy, Gurumoorthy <Gu...@nielsen.com>
wrote:
>
>  All of your JWS classes should be "serializable"
>
>
>
> Try that and let me know
>
>
>  ------------------------------
>
> *From:* Pasquale Imbemba [mailto:p.imbemba@gmail.com]
> *Sent:* 22 June 2007 14:22
> *To:* axis-user@ws.apache.org
> *Subject:* [Beginner] Deserializing array between Java and C#
>
>
>
> Hello,
>
> I am new to AXIS but quite enthusiast from what I've seen so far. I run it
> on a Tomcat server. For now I am testing deployment with JWS.
> I have two classes for testing purposes, one Address.java and Person.java. Address has just five fields (street, town, zip, phone, and nation).
> Person.java contains, among name and surname, also an array of Address.
> What I did was: compiled the Address.java and place the Address.class into
> the \WEB-INF\classes folder. I placed the Person.jws into the
> \webapps\axis folder. I add a webreference to a C# project. I create a new
> Address and a new Person and set the Person's address. Complier is happy,
> but at runtime, I get a the following error (a being the name of the Address
> array variable) "Message=" org.xml.sax.SAXException: Deserializing
> parameter 'a':  could not find deserializer for type {
> http://DefaultNamespace}Address <http://DefaultNamespace%7dAddress>"".
>
> What do I need to do in order to correct this?
>
> Thanks in advance
> Pasquale
>
> I enclose the WSDL file (sorry for the noise):
> <wsdl:definitions targetNamespace="http://localhost:8080/axis/Person.jws
> ">
> -
>     <!--
> WSDL created by Apache Axis version: 1.4
> Built on Oct 20, 2006 (09:30:31 GMT+00:00)
> -->
> -
>     <wsdl:types>
> -
>     <schema targetNamespace=" http://DefaultNamespace">
> <import namespace="http://localhost:8080/axis/Person.jws"/>
> <import namespace=" http://schemas.xmlsoap.org/soap/encoding/"/>
> -
>     <complexType name="Address">
> -
>     <sequence>
> <element name="nation" nillable="true" type="xsd:string"/>
> <element name="phone" nillable="true" type="xsd:string"/>
> <element name="street" nillable="true" type="xsd:string"/>
> <element name="town" nillable="true" type="xsd:string"/>
> <element name="zip" nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
> -
>     <complexType name="Person">
> -
>     <sequence>
> <element name="address" nillable="true" type="impl:ArrayOf_tns1_Address"/>
> <element name="age" nillable="true" type="xsd:string"/>
> <element name="dateOfBirth" nillable="true" type="xsd:dateTime"/>
> <element name="name" nillable="true" type="xsd:string"/>
> <element name="surname" nillable="true" type="xsd:string"/>
> </sequence>
> </complexType>
> </schema>
> -
>     <schema targetNamespace="http://localhost:8080/axis/Person.jws">
> <import namespace=" http://DefaultNamespace"/>
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> -
>     <complexType name="ArrayOf_tns1_Address">
> -
>     <complexContent>
> -
>     <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Address[]"/>
> </restriction>
> </complexContent>
> </complexType>
> </schema>
> </wsdl:types>
> -
>     <wsdl:message name="getAddressResponse">
> <wsdl:part name="getAddressReturn" type="impl:ArrayOf_tns1_Address"/>
> </wsdl:message>
> <wsdl:message name="getAddressRequest">
>
>    </wsdl:message>
> -
>     <wsdl:message name="setNameRequest">
> <wsdl:part name="name" type="xsd:string"/>
> </wsdl:message>
> -
>     <wsdl:message name="createPersonRequest">
> <wsdl:part name="surname" type="xsd:string"/>
> <wsdl:part name="name" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="setSurnameResponse">
>
>    </wsdl:message>
> <wsdl:message name="setDateOfBirthResponse">
>
>    </wsdl:message>
> -
>     <wsdl:message name="getNameResponse">
> <wsdl:part name="getNameReturn" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="getAgeRequest">
>
>    </wsdl:message>
> -
>     <wsdl:message name="setSurnameRequest">
> <wsdl:part name="surname" type="xsd:string"/>
> </wsdl:message>
> -
>     <wsdl:message name="createPersonResponse">
> <wsdl:part name="createPersonReturn" type="tns1:Person"/>
> </wsdl:message>
> -
>     <wsdl:message name="getSurnameResponse">
> <wsdl:part name="getSurnameReturn" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="getSurnameRequest">
>
>    </wsdl:message>
> <wsdl:message name="setAddressResponse">
>
>    </wsdl:message>
> -
>     <wsdl:message name="getDateOfBirthResponse">
> <wsdl:part name="getDateOfBirthReturn" type="xsd:dateTime"/>
> </wsdl:message>
> -
>     <wsdl:message name="setDateOfBirthRequest">
> <wsdl:part name="dateOfBirth" type="xsd:dateTime"/>
> </wsdl:message>
> -
>     <wsdl:message name="getAgeResponse">
> <wsdl:part name="getAgeReturn" type="xsd:string"/>
> </wsdl:message>
> <wsdl:message name="getNameRequest">
>
>    </wsdl:message>
> -
>     <wsdl:message name="setAddressRequest">
> <wsdl:part name="a" type="tns1:Address"/>
> </wsdl:message>
> <wsdl:message name="setNameResponse">
>
>    </wsdl:message>
> <wsdl:message name="getDateOfBirthRequest">
>
>    </wsdl:message>
> -
>     <wsdl:portType name="Person">
> -
>     <wsdl:operation name="getAddress">
> <wsdl:input message="impl:getAddressRequest" name="getAddressRequest"/>
> <wsdl:output message="impl:getAddressResponse" name="getAddressResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="getName">
> <wsdl:input message="impl:getNameRequest" name="getNameRequest"/>
> <wsdl:output message="impl:getNameResponse" name="getNameResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="setName" parameterOrder="name">
> <wsdl:input message="impl:setNameRequest" name="setNameRequest"/>
> <wsdl:output message="impl:setNameResponse" name="setNameResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="setAddress" parameterOrder="a">
> <wsdl:input message="impl:setAddressRequest" name="setAddressRequest"/>
> <wsdl:output message="impl:setAddressResponse" name="setAddressResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="getSurname">
> <wsdl:input message="impl:getSurnameRequest" name="getSurnameRequest"/>
> <wsdl:output message="impl:getSurnameResponse" name="getSurnameResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="getDateOfBirth">
> <wsdl:input message="impl:getDateOfBirthRequest"
> name="getDateOfBirthRequest"/>
> <wsdl:output message="impl:getDateOfBirthResponse"
> name="getDateOfBirthResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="setDateOfBirth" parameterOrder="dateOfBirth">
> <wsdl:input message="impl:setDateOfBirthRequest"
> name="setDateOfBirthRequest"/>
> <wsdl:output message="impl:setDateOfBirthResponse"
> name="setDateOfBirthResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="setSurname" parameterOrder="surname">
> <wsdl:input message="impl:setSurnameRequest" name="setSurnameRequest"/>
> <wsdl:output message="impl:setSurnameResponse" name="setSurnameResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="getAge">
> <wsdl:input message="impl:getAgeRequest" name="getAgeRequest"/>
> <wsdl:output message="impl:getAgeResponse" name="getAgeResponse"/>
> </wsdl:operation>
> -
>     <wsdl:operation name="createPerson" parameterOrder="surname name">
> <wsdl:input message="impl:createPersonRequest"
> name="createPersonRequest"/>
> <wsdl:output message="impl:createPersonResponse"
> name="createPersonResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> -
>     <wsdl:binding name="PersonSoapBinding" type="impl:Person">
> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http
> "/>
> -
>     <wsdl:operation name="getAddress">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="getAddressRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://DefaultNamespace " use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="getAddressResponse">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="getName">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="getNameRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://DefaultNamespace" use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="getNameResponse">
> <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="setName">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="setNameRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://DefaultNamespace " use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="setNameResponse">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="setAddress">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="setAddressRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://DefaultNamespace" use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="setAddressResponse">
> <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="getSurname">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="getSurnameRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://DefaultNamespace " use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="getSurnameResponse">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="getDateOfBirth">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="getDateOfBirthRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://DefaultNamespace" use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="getDateOfBirthResponse">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/Person.jws " use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="setDateOfBirth">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="setDateOfBirthRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace=" http://DefaultNamespace" use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="setDateOfBirthResponse">
> <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="setSurname">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="setSurnameRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://DefaultNamespace " use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="setSurnameResponse">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="getAge">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="getAgeRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ "
> namespace="http://DefaultNamespace" use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="getAgeResponse">
> <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> -
>     <wsdl:operation name="createPerson">
> <wsdlsoap:operation soapAction=""/>
> -
>     <wsdl:input name="createPersonRequest">
> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://DefaultNamespace " use="encoded"/>
> </wsdl:input>
> -
>     <wsdl:output name="createPersonResponse">
> <wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> -
>     <wsdl:service name="PersonService">
> -
>     <wsdl:port binding="impl:PersonSoapBinding" name="Person">
> <wsdlsoap:address location=" http://localhost:8080/axis/Person.jws"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>

RE: [Beginner] Deserializing array between Java and C#

Posted by "Raghupathy, Gurumoorthy" <Gu...@nielsen.com>.
All of your JWS classes should be "serializable" 

 

Try that and let me know 

 

________________________________

From: Pasquale Imbemba [mailto:p.imbemba@gmail.com] 
Sent: 22 June 2007 14:22
To: axis-user@ws.apache.org
Subject: [Beginner] Deserializing array between Java and C#

 

Hello,

I am new to AXIS but quite enthusiast from what I've seen so far. I run
it on a Tomcat server. For now I am testing deployment with JWS.
I have two classes for testing purposes, one Address.java and
Person.java . Address has just five fields (street, town, zip, phone,
and nation). Person.java contains, among name and surname, also an array
of Address.
What I did was: compiled the Address.java and place the Address.class
into the \WEB-INF\classes folder. I placed the Person.jws into the
\webapps\axis folder. I add a webreference to a C# project. I create a
new Address and a new Person and set the Person's address. Complier is
happy, but at runtime, I get a the following error (a being the name of
the Address array variable) "Message=" org.xml.sax.SAXException:
Deserializing parameter 'a':  could not find deserializer for type
{http://DefaultNamespace}Address <http://DefaultNamespace%7dAddress> "".

What do I need to do in order to correct this? 

Thanks in advance
Pasquale

I enclose the WSDL file (sorry for the noise):
<wsdl:definitions targetNamespace="http://localhost:8080/axis/Person.jws
">
-
    <!--
WSDL created by Apache Axis version: 1.4
Built on Oct 20, 2006 (09:30:31 GMT+00:00)
-->
-
    <wsdl:types>
-
    <schema targetNamespace=" http://DefaultNamespace
<http://DefaultNamespace> ">
<import namespace="http://localhost:8080/axis/Person.jws"/>
<import namespace=" http://schemas.xmlsoap.org/soap/encoding/
<http://schemas.xmlsoap.org/soap/encoding/> "/>
-
    <complexType name="Address">
-
    <sequence>
<element name="nation" nillable="true" type="xsd:string"/> 
<element name="phone" nillable="true" type="xsd:string"/>
<element name="street" nillable="true" type="xsd:string"/>
<element name="town" nillable="true" type="xsd:string"/> 
<element name="zip" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
-
    <complexType name="Person">
-
    <sequence> 
<element name="address" nillable="true"
type="impl:ArrayOf_tns1_Address"/>
<element name="age" nillable="true" type="xsd:string"/>
<element name="dateOfBirth" nillable="true" type="xsd:dateTime"/> 
<element name="name" nillable="true" type="xsd:string"/>
<element name="surname" nillable="true" type="xsd:string"/>
</sequence>
</complexType> 
</schema>
-
    <schema targetNamespace="http://localhost:8080/axis/Person.jws">
<import namespace=" http://DefaultNamespace <http://DefaultNamespace>
"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
    <complexType name="ArrayOf_tns1_Address"> 
-
    <complexContent>
-
    <restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="tns1:Address[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
-
    <wsdl:message name="getAddressResponse">
<wsdl:part name="getAddressReturn" type="impl:ArrayOf_tns1_Address"/> 
</wsdl:message>
<wsdl:message name="getAddressRequest">

   </wsdl:message>
-
    <wsdl:message name="setNameRequest">
<wsdl:part name="name" type="xsd:string"/> 
</wsdl:message>
-
    <wsdl:message name="createPersonRequest">
<wsdl:part name="surname" type="xsd:string"/>
<wsdl:part name="name" type="xsd:string"/> 
</wsdl:message>
<wsdl:message name="setSurnameResponse">

   </wsdl:message>
<wsdl:message name="setDateOfBirthResponse">

   </wsdl:message>
-
    <wsdl:message name="getNameResponse">
<wsdl:part name="getNameReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getAgeRequest">

   </wsdl:message>
-
    <wsdl:message name="setSurnameRequest">
<wsdl:part name="surname" type="xsd:string"/>
</wsdl:message>
-
    <wsdl:message name="createPersonResponse"> 
<wsdl:part name="createPersonReturn" type="tns1:Person"/>
</wsdl:message>
-
    <wsdl:message name="getSurnameResponse">
<wsdl:part name="getSurnameReturn" type="xsd:string"/> 
</wsdl:message>
<wsdl:message name="getSurnameRequest">

   </wsdl:message>
<wsdl:message name="setAddressResponse">

   </wsdl:message>
-
    <wsdl:message name="getDateOfBirthResponse"> 
<wsdl:part name="getDateOfBirthReturn" type="xsd:dateTime"/>
</wsdl:message>
-
    <wsdl:message name="setDateOfBirthRequest">
<wsdl:part name="dateOfBirth" type="xsd:dateTime"/> 
</wsdl:message>
-
    <wsdl:message name="getAgeResponse">
<wsdl:part name="getAgeReturn" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getNameRequest"> 

   </wsdl:message>
-
    <wsdl:message name="setAddressRequest">
<wsdl:part name="a" type="tns1:Address"/>
</wsdl:message>
<wsdl:message name="setNameResponse"> 

   </wsdl:message>
<wsdl:message name="getDateOfBirthRequest">

   </wsdl:message>
-
    <wsdl:portType name="Person">
-
    <wsdl:operation name="getAddress"> 
<wsdl:input message="impl:getAddressRequest" name="getAddressRequest"/>
<wsdl:output message="impl:getAddressResponse"
name="getAddressResponse"/>
</wsdl:operation> 
-
    <wsdl:operation name="getName">
<wsdl:input message="impl:getNameRequest" name="getNameRequest"/>
<wsdl:output message="impl:getNameResponse" name="getNameResponse"/> 
</wsdl:operation>
-
    <wsdl:operation name="setName" parameterOrder="name">
<wsdl:input message="impl:setNameRequest" name="setNameRequest"/>
<wsdl:output message="impl:setNameResponse" name="setNameResponse"/> 
</wsdl:operation>
-
    <wsdl:operation name="setAddress" parameterOrder="a">
<wsdl:input message="impl:setAddressRequest" name="setAddressRequest"/>
<wsdl:output message="impl:setAddressResponse"
name="setAddressResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="getSurname">
<wsdl:input message="impl:getSurnameRequest" name="getSurnameRequest"/> 
<wsdl:output message="impl:getSurnameResponse"
name="getSurnameResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="getDateOfBirth">
<wsdl:input message="impl:getDateOfBirthRequest"
name="getDateOfBirthRequest"/> 
<wsdl:output message="impl:getDateOfBirthResponse"
name="getDateOfBirthResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="setDateOfBirth" parameterOrder="dateOfBirth"> 
<wsdl:input message="impl:setDateOfBirthRequest"
name="setDateOfBirthRequest"/>
<wsdl:output message="impl:setDateOfBirthResponse"
name="setDateOfBirthResponse"/> 
</wsdl:operation>
-
    <wsdl:operation name="setSurname" parameterOrder="surname">
<wsdl:input message="impl:setSurnameRequest" name="setSurnameRequest"/> 
<wsdl:output message="impl:setSurnameResponse"
name="setSurnameResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="getAge">
<wsdl:input message="impl:getAgeRequest" name="getAgeRequest"/> 
<wsdl:output message="impl:getAgeResponse" name="getAgeResponse"/>
</wsdl:operation>
-
    <wsdl:operation name="createPerson" parameterOrder="surname name"> 
<wsdl:input message="impl:createPersonRequest"
name="createPersonRequest"/>
<wsdl:output message="impl:createPersonResponse"
name="createPersonResponse"/>
</wsdl:operation> 
</wsdl:portType>
-
    <wsdl:binding name="PersonSoapBinding" type="impl:Person">
<wsdlsoap:binding style="rpc" transport="
http://schemas.xmlsoap.org/soap/http
<http://schemas.xmlsoap.org/soap/http> "/>
-
    <wsdl:operation name="getAddress">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getAddressRequest"> 
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace " use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getAddressResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getName"> 
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getNameRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getNameResponse">
<wsdlsoap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/> 
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setName">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setNameRequest"> 
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace " use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setNameResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setAddress"> 
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setAddressRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setAddressResponse">
<wsdlsoap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/> 
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getSurname">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getSurnameRequest"> 
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace " use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getSurnameResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getDateOfBirth"> 
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getDateOfBirthRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getDateOfBirthResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws " use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setDateOfBirth">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setDateOfBirthRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace=" http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setDateOfBirthResponse">
<wsdlsoap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/> 
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="setSurname">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="setSurnameRequest"> 
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace " use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="setSurnameResponse">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="getAge"> 
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getAgeRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
" namespace="http://DefaultNamespace" use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="getAgeResponse">
<wsdlsoap:body encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/> 
</wsdl:output>
</wsdl:operation>
-
    <wsdl:operation name="createPerson">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="createPersonRequest"> 
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://DefaultNamespace " use="encoded"/>
</wsdl:input>
-
    <wsdl:output name="createPersonResponse">
<wsdlsoap:body encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/
<http://schemas.xmlsoap.org/soap/encoding/> "
namespace="http://localhost:8080/axis/Person.jws" use="encoded"/>
</wsdl:output>
</wsdl:operation> 
</wsdl:binding>
-
    <wsdl:service name="PersonService">
-
    <wsdl:port binding="impl:PersonSoapBinding" name="Person">
<wsdlsoap:address location=" http://localhost:8080/axis/Person.jws"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>