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

How to get access to the array paramter ate the server side, code sample

Expand Messages
  • Andrei Ivanov
    Client side: my @d; $i = 0; while ( ) { chomp; @d[$i] = SOAP::Data- name( appointment )- type( appointment )- value( [
    Message 1 of 1 , Jan 29, 2008
    View Source
    • 0 Attachment
      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?

      --
      Best regards,
      Andrei Ivanov

      phone tel:+7 (901) 924 0456
      e-mail mailto:andrei.i.ivanov@...
      web page: http://commandus.com/
      VoIP: sip:50000@...
      G-Talk: jid:andrei.i.ivanov
    Your message has been successfully submitted and would be delivered to recipients shortly.