Loading ...
Sorry, an error occurred while loading the content.

2203Iterating hash result in VB/COM client

Expand Messages
  • gusti64 <gusti.seregeg@piotech.com.au>
    Dec 21, 2002
      In an attempt to give my customers a flexibility to access my Web
      Services, I tried to use COM object (with Lite.dll) so that they can
      write their own client app in VB/C#/C++ etc.

      The Web Services returns a complex data type (nested hashes) so I
      need to be able to iterate them. For example, below is a piece of
      code taken from hashecho.vbs VB sample file.

      Set soaplite = CreateObject("SOAP.Lite")
      Set subhash = soaplite.hash("key_c", "Value C")
      Set hash = soaplite.hash("key_a", "Value A", "key_b", subhash)
      hash.key_b.key_d = "Value D"

      How do I iterate all the keys in variable 'hash'?

      Essentially, what I want to do is similar to what Perl code below is

      foreach $val ( keys %$hash )
      print $val . "\n";


      Gusti Seregeg.