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

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

Expand Messages
  • operationsresearch
    Nov 9, 2003

      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,

      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

      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;