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

Re: [soaplite] So fustrated returning hash that does not match XML results???

Expand Messages
  • Duncan Cameron
    ... I take it that you are not using S::L 0.65, where this issue has been addressed. This is how Data::Dumper shows the element $VAR1
    Message 1 of 2 , Mar 6, 2005
    • 0 Attachment
      On 2005-03-06 at 05:42:36 dustintodd wrote:

      >I am trying to accessing the XML results below. I expected the
      >results
      >to be array of hashes based on my reading. But it appears to be a
      >hash
      >of hashes. I have include the raw XML results, a portion of the code
      >I use to access it and the program run results. I have tried a
      >number
      >of different approaches and example code without getting the results
      >want. Can anyone see what I am doing wrong?
      >
      >- Dustin -
      I take it that you are not using S::L 0.65, where this issue has been
      addressed. This is how Data::Dumper shows the
      <getTableMetadataReturn> element

      $VAR1 = bless( {
      'columns' => [
      bless( {
      'type' => 'INTEGER',
      'name' => 'CWVLWLANNUCASTKEYINDEX'
      }, 'TableColumn' ),
      bless( {
      'type' => 'INTEGER',
      'name' => 'CWVLWLANNUCASTKEYLEN'
      }, 'TableColumn' ),
      bless( {
      'type' => 'VARCHAR',
      'name' => 'CWVLWLANNUCASTKEYVALUE'
      }, 'TableColumn' ),
      bless( {
      'type' => 'INTEGER',
      'name' => 'VLANID'
      }, 'TableColumn' )
      ]
      }, 'TableMetadata' );

      If you cannot upgrade to 0.65 then you will need to use an approach
      like this:

      my $som = $soap->getTableMetadata($tlisting);
      my @columns = $som->match('//columns')->valueof;
      for my $column (@columns) {
      print "$column->{name} $column->{type}\n";
      }


      Duncan
    Your message has been successfully submitted and would be delivered to recipients shortly.