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

3984Re: [soaplite] Multiple calls problem

Expand Messages
  • Joseph Hourcle
    Oct 7, 2004
      On Tue, 5 Oct 2004, Artur Brodowski wrote:

      >
      > Hello,
      > I wrote a simple SOAP proxy, but I have a problem accesing different
      > methods from client during one session:

      [trimmed]

      > It seems that server (based on SOAP::Transport::HTTP) uses some kind
      > of cache - when I try to call fun2, it executes fun1 with empty (?)
      > arguments. Is it possible to call different methods from one session,
      > do I need to 'flush' session after every call?

      I've never had such a problem. The following works for me:


      #!/usr/bin/perl --

      use SOAP::Lite;

      my $soap = SOAP::Lite
      -> uri('http://annoying.org/MyTest')
      -> proxy('http://127.0.0.1/cgi-bin/vso/test.cgi')
      -> on_debug(sub{print@_})
      ;

      use Data::Dumper;


      test($_) for ( 1 .. 5, qw( _1 _2 _3 _4 _5 ) );


      sub test {
      my $num = shift;
      print "\n\n-----\nTest $num:\n-----\n\n";

      my $results = eval "\$soap->test$num();";
      if ($results->fault()) {
      print join( "$/\t", "\nERROR : ", $results->faultcode(), $results->faultstring(), $results->faultdetail(),'');
      } else {
      print Dumper($results->result());
      }
      }


      -----
      Joe Hourcle
    • Show all 3 messages in this topic