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

Re: Re: [soaplite] SOAP woes..

Expand Messages
  • Duncan Cameron
    Michael Can you see whether the following is substantially different to your code? This code produces the expected results: C: My
    Message 1 of 5 , Feb 28, 2001
    • 0 Attachment
      Michael

      Can you see whether the following is substantially different to your code? This code produces the expected results:

      C:\My Documents\Perl\SOAP\Lite>perl -w poe.t
      a => 1
      b => 2
      c => 3
      a => 1
      b => 2
      c => 3

      I'm using W98, SOAP-Lite 0.47, Perl 5.005_03.

      Regards

      Duncan Cameron

      poe.t
      =====

      use SOAP::Lite + autodispatch =>
      uri => 'http://localhost/EG/POE',
      proxy => 'http://localhost/cgi-bin/soap.cgi',
      on_fault=> sub { my($soap,$res)= @_;
      die ref $res ? $res->faultdetail : $soap->transport->status, "\n";
      }
      ;

      my $poe = new EG::POE;
      @site_urls = ('http://www.ibm.com');

      $poe->SOAP::start_poe_session(@site_urls);

      my $new_results = $poe->SOAP::retrieve_results;

      my %results = %$new_results;

      foreach my $key (keys %results) {
      print "$key => $results{$key}\n";
      }
      %results = $poe->SOAP::retrieve_results2;

      foreach my $key (keys %results) {
      print "$key => $results{$key}\n";
      }

      POE.pm
      ======
      package EG::POE;

      %hash = (a => 1, b=> 2, c =>3);

      sub retrieve_results {
      my($class)=@_;

      return \%hash;
      }
      sub start_poe_session() {
      print join ' ', @_;
      }

      sub new() {
      my ($class) = @_;
      bless {}, $class;
      }

      sub retrieve_results2 {
      my($class)=@_;

      return %hash;
      }
      1;
    Your message has been successfully submitted and would be delivered to recipients shortly.