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

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

Expand Messages
  • Duncan Cameron
    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
      >to be array of hashes based on my reading. But it appears to be a
      >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
      >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',
      }, 'TableColumn' ),
      bless( {
      'type' => 'INTEGER',
      }, 'TableColumn' ),
      bless( {
      'type' => 'VARCHAR',
      }, '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";

    • Show all 2 messages in this topic