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

5972Passing multiple arrays correctly

Expand Messages
  • Vijay Gopalakrishnan
    Jun 20, 2007
    • 0 Attachment
      Hi all,
      I am new to SOAP::Lite and am trying to understand the "correct" way
      of passing multiple array arguements from a client to a server.

      I have the following arrays:
      my @pIf = qw(p1 p2 p3 p4 p5 p6);
      my @bIf = qw(b10 b20 b30);
      my @bAs = ();

      I call the server function print_arr as
      $soap_obj->print_arr(\@pIf, \@bIf, \@bAs);

      On the server side, the function prints the arrays that are passed as
      parameters using Data::Dumper. With SOAP::Lite ver 0.60(a) the output
      on the server side is

      $VAR1 = [
      'p1',
      'p2',
      'p3',
      'p4',
      'p5',
      'p6'
      ];
      $VAR1 = [
      'b10',
      'b20',
      'b30'
      ];
      $VAR1 = [];

      With SOAP::Lite ver > 0.65, however, the output is
      $VAR1 = [
      'p1',
      'p2',
      'p3',
      'p4',
      'p5',
      'p6',
      [
      'b10',
      'b20',
      'b30'
      ],
      []
      ];
      $VAR1 = [
      'b10',
      'b20',
      'b30'
      ];
      $VAR1 = [];

      I would like to understand why there is the difference, what has
      changed, and if I am doing something wrong.

      Thanks,
      Vijay