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

How to get access to the array parameter at the server side, please help!

Expand Messages
  • Andrei Ivanov
    Getting array at the client side is no problem with Soap::SOM, but how I can get passed array at the server side? I can not get SOM methods at the server. This
    Message 1 of 1 , Jan 29, 2008
    • 0 Attachment
      Getting array at the client side is no problem with Soap::SOM, but
      how I can get passed array at the server side?

      I can not get SOM methods at the server.

      This an example:

      Client side:
      my @d;
      $i = 0;
      while (<STDIN>) {
      chomp;
      @d[$i] = SOAP::Data->name('appointment')->type('appointment')-
      >value(
      [
      SOAP::Data->name('status')->type('int')->value($status),
      ...
      SOAP::Data->name('flags')->type('int')-
      >value($flags)
      ]);
      $i++;
      }
      close(FID);
      $query = new CGI;
      $service = SOAP::Lite -> uri('meetup#getappointments')
      -> proxy('http://' . $host . $p);
      $som = $service -> getappointments(9, $pre_zonenum, $tu, $u,
      $starts, $ends, $pwd,
      SOAP::Data->name("appointments" => [@d])->type("appointment")-
      >type("appointments"));


      Server side:
      package meetup;
      use SOAP::Data;
      use SOAP::SOM;
      use vars qw(@ISA);
      @ISA = qw(SOAP::Server::Parameters);

      ...

      sub getappointments {
      shift;
      my $ttl = shift;
      ...
      my $password = shift;
      my @appointments = shift;
      my $envelope = pop;

      dolog("appointments: " . @appointments); # return 1, how to get
      access to the array?

      my @parameters = pop->dataof(SOAP::SOM::paramsin); # it causes
      error "Can't locate object method "dataof" via package "appointments"

      How I can get access to passed array?

      I see there is an array, but how I can get access?

      Please help!
    Your message has been successfully submitted and would be delivered to recipients shortly.