Michael,
Create a WSDL type with the structure you want.
Run wsdl2java on this.  Use this java class on the client side.
On the server side, use a different class, use your serializer
 and the Bean Deserializer  for this.
Now you should be able to return your data to the client,
which will be able to serialize to (probably not use)  and deserialize from the network from a java class.
On the server side you should should be able to serialize to the network from
your database connection and deserialize it from the network (if you desire, otherwise
you will never be using this feature).

Hope this helps.

Regards,
- kiru



Michael Schuerig <[EMAIL PROTECTED]>

10/24/2004 10:27 AM

Please respond to
[EMAIL PROTECTED]

To
[EMAIL PROTECTED]
cc
Subject
Deserialization






I'm obviously trying to do something that's beyond my current
understanding of the technologies involved. It's not really fun to get
stuck all the time, but at least I'm only wasting my own time.

I have two applications, server and client, that ought to communicate by
way of a web service. The server does little more than a database
lookup and I already have a Serializer that can mangle the retrieved
ResultSet so that I get a SOAP response like this

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
   <getLookupResponse
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <getLookupReturn href="" />
   </getLookupResponse>

   <multiRef id="id0" soapenc:root="0"
    soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xsi:type="ns1:myreturnvalue"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:ns1="http://example.com/myservice">
     <info>abcde</info>
     <list1>
       <elem1>
         <elem11>abc</elem11>
         <elem12>def</elem12>
         <list2>
           <elem2>
             <elem21>pqr</elem3>
             <elem22>xyz</elem4>
           </elem2>
           <elem2>
             <elem21>pqr</elem3>
             <elem22>xyz</elem4>
           </elem2>
           <elem2>
            ...

         </list2>
       </elem1>
       <elem1>
         ...

     </list1>
   </multiRef>

 </soapenv:Body>
</soapenv:Envelope>

The Serializer does generate WSDL/types (writeSchema), but I still don't
have that right. What I'm trying to achieve is to have wsdl2java
generate client-side classes that can deserialize the returned XML
*without* the help of a custom deserializer. Unfortunately, my early
ignorant optimism has disappeared and I'm doubtful if that is possible
at all.

Michael

--
Michael Schuerig                              Life is just as deadly
mailto:[EMAIL PROTECTED]                               As it looks
http://www.schuerig.de/michael/          --Richard Thompson, Sibella

Reply via email to