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 Scott Webber <sc...@theprairie.com> on 2003/05/01 16:18:52 UTC

Re: Deserialization problem

Sorry to take so long to reply;  we have a limited schedule to work on this
project.  Anyway, your suggestion was basically correct.  We found out how
to set the namespace with the Mac client, but then also noticed that the
namespace in our beanMapping was incorrect.  Now we can send the object.
Now we're going to tackle arrays of complex types :)

Thanks alot for your help,
Scott

----- Original Message -----
From: "Kroll, Stephanie" <SK...@gers.com>
To: <ax...@ws.apache.org>
Sent: Friday, April 25, 2003 1:56 PM
Subject: RE: Deserialization problem


> It might be that the Mac client is not setting the namespace for testType.
> It needs to get mapped to your http://theprairie.com namespace.
>
> Stephanie
>
> -----Original Message-----
> From: Scott Webber [mailto:scott_webber@theprairie.com]
> Sent: Friday, April 25, 2003 10:49 AM
> To: axis-user@ws.apache.org
> Subject: Deserialization problem
>
>
> Hi,
>
> I'm trying to pass a custom type back and forth to both .NET clients and
an
> Apple client based on the new Web Services API, but I can't get Axis to
> recognize the objects returned from the Mac app.
>
> Here's my type:
>
>
> public class testType
> {
>     String theString;
>     int theInt;
>
>     public testType() { theString = ""; theInt = 0; }
>     public testType(String s, int i)
>     {
>         theString = s;
>         theInt = i;
>     }
>
>     public int getTheInt() { return theInt; }
>     public String getTheString() { return theString; }
>
>     public void setTheInt(int theInt) { this.theInt = theInt; }
>     public void setTheString(String theString) { this.theString =
> theString; }
> }
>
>
> Here's my services:
>
>
> public testType testCustomGet(String s, int i)
> {
>     testType t = new testType(s, i);
>     return t;
> }
>
> public String testCustomSet(testType t)
> {
>     if (t == null)
>         return "";
>     String s = "The String: " + t.getTheString() + "\tThe Int: " +
> t.getTheInt();
>     return s;
> }
>
> I also have the bean mapping defined in the wsdd:
>
> <beanMapping qname="tns1:testType" xmlns:tns1="http://theprairie.com"
>     languageSpecificType="java:com.theprairie.testType"/>
>
>
> The testCustomGet() function works fine, but the testCustomSet() only
works
> with the .NET client.  When the mac client makes the call, axis returns a
> SOAP fault:
>
> org.xml.sax.SAXException: Deserializing parameter 't':  could not find
> deserializer for type testType
>
>
> Here's the SOAP that is sent by the mac client:
>
> <SOAP-ENV:Body>
>   <m:testCustomSet
> xmlns:m="http://theprairie.com/Test/services/dps_services">
>     <t xsi:type="testType">
>        <theString xsi:type="xsd:string">Yo</theString>
>        <theInt xsi:type="xsd:int">5</theInt>
>     </t>
>   </m:testCustomSet>
> </SOAP-ENV:Body>
>
>
> Here's the SOAP from the .NET client.  This one works:
>
> <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>   <tns:testCustomSet>
>     <t href="#id1" />
>   </tns:testCustomSet>
>   <q1:testType id="id1" xsi:type="q1:testType"
> xmlns:q1="http://theprairie.com">
>      <theInt xsi:type="xsd:int">5</theInt>
>      <theString xsi:type="xsd:string">Yo</theString>
>   </q1:testType>
> </soap:Body>
>
>
> Is there something wrong with the mac generated SOAP?  Any help would be
> greatly appreciated.
>
> Thanks,
> Scott