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

Baffling perl to .NET problem

Expand Messages
  • Matthew
    Until earlier today, my perl client to .NET server worked. After doing some (seemingly) routine code work today, it now gives an error on execution. Hopefully
    Message 1 of 1 , Jul 30, 2004
    • 0 Attachment
      Until earlier today, my perl client to .NET server worked. After doing some (seemingly) routine
      code work today, it now gives an error on execution. Hopefully someone can help me regain sanity.

      Goal: Get dataset contents from .NET server, iterate records in perl client

      perl code:

      #!/usr/bin/perl -w
      use strict;
      use SOAP::Lite +trace => "debug";

      my $soapPoll = SOAP::Lite
      ->uri('http://sigweb.eng.emc.com/WebServices/StoragePoll')
      ->on_action( sub { join '/', 'http://sigweb.eng.emc.com/WebServices/StoragePoll', $_[1] }
      )
      ->proxy('http://sigwebdev/WebServices/StoragePoll.asmx', timeout => 6000
      );

      #Create a new serializer for a dataset
      $soapPoll->deserializer(SOAP::Custom::XML::Deserializer->new);
      my $ds = $soapPoll->GetHosts()->valueof('//NewDataSet');

      #loop through the hosts
      for ($ds->dbo_ReservableHosts) { ... }

      With trace on, the .NET server is returning this dataset:

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
      <GetHostsResponse xmlns="http://sigweb.eng.emc.com/WebServices/StoragePoll">
      <GetHostsResult>
      <xs:schema id="dsHosts" targetNamespace="http://sigweb.eng.emc.com/WebServices/StoragePoll"
      xmlns:mstns="http://sigweb.eng.emc.com/WebServices/StoragePoll"
      xmlns="http://sigweb.eng.emc.com/WebServices/StoragePoll"
      xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
      attributeFormDefault="qualified" elementFormDefault="qualified">
      <xs:element name="dsHosts" msdata:IsDataSet="true">
      <xs:complexType>
      <xs:choice maxOccurs="unbounded">
      <xs:element name="dbo_ReservableHosts">
      <xs:complexType>
      <xs:sequence>
      <xs:element name="HardwareID" msdata:ReadOnly="true" msdata:AutoIncrement="true" type="xs:int" />
      <xs:element name="Name" type="xs:string" />
      <xs:element name="Host_OS" type="xs:string" minOccurs="0" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:choice>
      </xs:complexType>
      </xs:element>
      </xs:schema>
      <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
      xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
      <dsHosts>
      <dbo_ReservableHosts diffgr:id="dbo_ReservableHosts1" msdata:rowOrder="0">
      <HardwareID>15</HardwareID>
      <Name>Lca0098</Name>
      <Host_OS>AIX</Host_OS>
      </dbo_ReservableHosts>
      <dbo_ReservableHosts diffgr:id="dbo_ReservableHosts2" msdata:rowOrder="1">
      <HardwareID>10</HardwareID>
      <Name>Lca0158</Name>
      <Host_OS>AIX</Host_OS>
      </dbo_ReservableHosts>
      </dsHosts>
      </diffgr:diffgram>
      </GetHostsResult>
      </GetHostsResponse>
      </soap:Body>
      </soap:Envelope>

      Perl, however, gives me this error:

      Can't call method "dbo_ReservableHosts" on an undefined value at ./StoragePoll.p
      l line 35.

      line 35 is: for ($ds->dbo_ReservableHosts) { ... }

      Any idea why it's complaining here? This worked without problem for several months until today.

      Thanks, Matthew




      __________________________________
      Do you Yahoo!?
      New and Improved Yahoo! Mail - 100MB free storage!
      http://promotions.yahoo.com/new_mail
    Your message has been successfully submitted and would be delivered to recipients shortly.