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

Result array problem (SOAP:Lite client and .Net Server)

Expand Messages
  • operationsresearch
    Hello, I am stuck up since a long time on this issue. I am new to SOAP:Lite and Perl. The .Net service returns an array of objects to the Perl client. However,
    Message 1 of 1 , Nov 9, 2003
    View Source
    • 0 Attachment
      Hello,

      I am stuck up since a long time on this issue. I am new to SOAP:Lite
      and Perl.

      The .Net service returns an array of objects to the Perl client.
      However, the result data contains out only one item (instead of the
      entire array).

      I read in the archives that we can use Data::Dumper to view the
      result XML. Can anyone provide me with sample code on how to
      use Data::Dumper ? Do I need to write a custom deserializer ?

      My knowledge of Perl is also very bad, so I wonder whether I
      have screwed something else in my code.

      Thanks in advance,
      Ajay

      The code I have written is as follows:


      my ($loginId, $password, $userId) = @_;

      my $soap = SOAP::Lite
      -> uri('http://localhost')
      -> on_action( sub { sprintf '%s/%s', @_ })
      -> proxy
      ('http://localhost:8081/SchedulerWebService/PersonScheduleService.asmx
      ');

      my $method = SOAP::Data->name('getTodaySchedule')
      ->attr({xmlns => 'http://scheduler.xxx.yyy.zzz'});

      my @params = (SOAP::Data->name(loginId => $loginId)->type('string'),
      SOAP::Data->name(password => $password)->type('string'),
      SOAP::Data->name(ownerId => $userId)->type('string')
      );

      $schedule_data = $soap->call($method => @params)->result;

      foreach my $schedule_item (@$schedule_data) {
      print $schedule_item;
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.