You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Scott Nichol <sn...@scottnichol.com> on 2002/05/03 15:47:38 UTC

Re: VB SOAP Client (Collection, array)

You must write code to create the collection or array from the XML that is
Reader.RPCResult.  If you grab the source code for the VB address book client I
wrote (http://www.scottnichol.com/AddressBookClient.zip), you will see examples
of how to write such code.  This example is based on a framework of code that
works somewhat like Apache SOAP client code.  First, look at RPCCall.Invoke to
see how I parse the SOAP response for a return value and output parameters.
Non-trivial types must implement the XMLDeserializableFactory interface, which
is used to get a deserializer (something that implements XMLDeserializable).
The XMLDeserializer code then deserializes the object using the
XMLDeserializable interface.  If you look at the Address class, you will see an
example of a class that can deserialize itself.  Basically, the deserializer
feeds the class each XML element, which Address uses to populate.  The
LoadArrayFromXMLElement and LoadObjectArrayFromXMLElement methods of
XMLDeserializer should give you ideas about how to work with a Vector.

Scott

----- Original Message -----
From: "pop m" <po...@regens.hu>
To: <so...@xml.apache.org>
Sent: Friday, May 03, 2002 10:15 AM
Subject: VB SOAP Client (Collection, array)


Hi !

I am using Tomcat where I have a web app. hwo is capable to communicate via
SOAP.

I also have a java bean class and one of its methods returns a Vector.

I've written a VB client who invokes this method and it works.

My problem is that the result I've got is something like this:

********************
    Set Reader = New SoapReader
    Reader.Load Connector.OutputStream

    If Not Reader.Fault Is Nothing Then
        MsgBox Reader.faultstring.Text, vbExclamation
    Else
        ' here is my result and it works
        MsgBox Reader.RPCResult.Text
   End if
********************

and I want to catch this result into a VB Collection or Array, but I didn't
enjoy !

I want to do something like this:

   'ThisWorkbook.ActiveSheet.Cells.Clear
   'ThisWorkbook.ActiveSheet.Range("Bi") = myresult(1)
   'ThisWorkbook.ActiveSheet.Range("Cj") = myresult(2)
      ...............................................................
     ...............................................................
but I can't because the only result I could get is a String and I need an array
or collection.


Could  anyone of you help me ?

Thanks in advance !

Pop Marius L.