Thanks for the idea, but if add urn: to the beanMapping and use the urn:
namespace on the client it still throws the same error.  Has anyone else had
any luck or experience with returning a bean that has an array of beans
inside it?  Does axis need to be told that one class holds members of
another class, or should axis just deserialize bean objects as it finds them
no matter what?

Thanks for any ideas/help/thoughts, and especially answers.



-----Original Message-----
From: Olivier Gauwin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 2:03 AM
To: [EMAIL PROTECTED]
Subject: Re: deserializing a bean wrapped array of beans


Hi David,

I'm not sure your namespaces are well-formed.
Try to add "urn:" at the beginning of your namespaces
("urn:ProductDbHelper" instead of "ProductDbHelper", etc).

HTH,
Olivier


David Gilbert wrote:

>I have seen postings about deserializing arrays from last
>January, but didn't find an answer to my problem.  I am
>trying to pass an object from my service back to the client
>and am getting a "no deserializer defined for array type
>{regisproject.util}Product" error.  The object being passed
>back is a bean (catalog) that contains an array of bean
>objects (products).  Using TCPMon I see that the message
>sent to the client has the right data -
>
> <soapenv:Body>
>  <ns1:getCatalogResponse
>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xmlns:ns1="ProductDbHelper">
>   <getCatalogReturn href="#id0"/>
>  </ns1:getCatalogResponse>
>  <multiRef id="id0" soapenc:root="0"
>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xsi:type="ns2:Catalog"
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>xmlns:ns2="regisproject.util">
>   <products xsi:type="soapenc:Array"
>soapenc:arrayType="ns2:Product[5]">
>    <item href="#id1"/>
>    <item href="#id2"/>
>    <item href="#id3"/>
>    <item href="#id4"/>
>    <item href="#id5"/>
>   </products>
>  </multiRef>
>  <multiRef id="id4" soapenc:root="0"
>soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>xsi:type="ns3:Product" xmlns:ns3="regisproject.util"
>xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
>   <description xsi:type="xsd:string" xsi:nil="true"/>
>   <id xsi:type="xsd:string">4         </id>
>   <inventory xsi:type="xsd:double">55.0</inventory>
>   <name xsi:type="xsd:string">Test Product 456</name>
>   <nextShipDate
>xsi:type="xsd:dateTime">2003-01-01T07:00:00.000Z</nextShipDate>
>   <nextShipQty xsi:type="xsd:double">100.0</nextShipQty>
>   <price xsi:type="xsd:double">1234.56</price>
>   <status xsi:type="xsd:string">not active</status>
>   <vendorId xsi:type="xsd:string">3         </vendorId>
>   <vendorName
>xsi:type="xsd:string">Parts-R-Us</vendorName>
>  </multiRef>
> ...
>
>In my deploy.wsdd I have bean mappings for Product and
>Catalog -
>
><deployment xmlns="http://xml.apache.org/axis/wsdd/";
>            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
> <service name="ProductDbHelper" provider="java:RPC">
>  <parameter name="className"
>value="regisproject.database.ProductDbHelper"/>
>  <parameter name="allowedMethods"
>value="test,getProduct,getCatalog"/>
>  <beanMapping qname="myNS:Product"
>            xmlns:myNS="regisproject.util"
>languageSpecificType="java:regisproject.util.Product"/>
>  <beanMapping qname="myNS:Catalog"
>            xmlns:myNS="regisproject.util"
>languageSpecificType="java:regisproject.util.Catalog"/>
> </service>
></deployment>
>
>Do I need to add something for the array to the .wsdd?  Any
>ideas as to what else is needed?
>
>Note:  I have another service that returns a single product
>and it deserializes without any problem.
>
>Thanks for any help you can provide.
>
>
>
>



Reply via email to