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

Array Problem

Expand Messages
  • Diego Andres Asenjo G.
    Hi, how are you? I hope to not disturb. I have another question. I have a problem with a method that returns an array. The module exposed as a WS has the
    Message 1 of 1 , Feb 9, 2005
    • 0 Attachment
      Hi, how are you?

      I hope to not disturb. I have another question.

      I have a problem with a method that returns an array. The module exposed
      as a WS has the following lines:

      sub getItems {
      my $self = shift;
      return @{$self->{ITEMS}};
      }

      A line of the constructor:

      sub new {
      ...
      $self->{ITEMS} = []; # $self->{ITEMS} is an array.
      ...
      }

      Again, after adding some "items" to the array, the local code works.

      for my $it ($col->getItems()){
      print $it->getName()."\n";
      }

      But the remote code does not.

      my $soap_col = SOAP::Lite
      -> uri('http://localhost:8070/datos/pys/ColeccionSector')
      -> proxy('http://localhost:8070/');
      my $col = $soap_col->call(new => '')->result;
      ...
      my @items = $soap_col->getItems($col)->result;
      for my $it (@items){
      print $it->getName()."\n";
      }

      Thanks for your reply!!

      Bye!

      --
      Diego Andrés Asenjo Gonzalez
      -------------------------------------------------------------------------------
      Coordinador General Grupo GNU/Linux
      Estudiante de Ingeniería Electrónica y Telecomunicaciones
      Universidad del Cauca
    Your message has been successfully submitted and would be delivered to recipients shortly.