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

4405Array Problem

Expand Messages
  • Diego Andres Asenjo G.
    Feb 9, 2005
      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!!


      Diego Andrés Asenjo Gonzalez
      Coordinador General Grupo GNU/Linux
      Estudiante de Ingeniería Electrónica y Telecomunicaciones
      Universidad del Cauca