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

Inconsistency in function output

Expand Messages
  • ramankris
    Hi I have made my mod_perl/SOAP to work. I have the following server code package Apache::Modules::QueryServer; use strict; sub new { my($self) = shift; my
    Message 1 of 1 , Jan 20, 2005
    • 0 Attachment
      Hi
      I have made my mod_perl/SOAP to work. I have the following server code

      package Apache::Modules::QueryServer;
      use strict;
      sub new
      {
      my($self) = shift;
      my $class = ref($self) || $self;
      my($server,$port) = @_;
      return bless {_ip=>$server,_port =>$port},$class;
      }

      sub printme
      {
      my($self) = @_;
      return "Testing";
      }

      1;

      Use the following client code.

      use SOAP::Lite +autodispatch =>
      uri =>
      'http://localhost/Apache/Modules/QueryServer',proxy=>'http://localhost/soap_query';
      use strict;
      my $obj = Apache::Modules::QueryServer->new("localhost","80");
      print "$obj\n";
      my $sz = $obj->printme() ;

      print "The value is $sz\n";

      The issue is, the function works once and the next call it gives me
      the following error message.
      Can't call method "printme" on an undefined value at testsoap.pm line 6

      The error is consistent and it occurs in every alternate call.
      Any help is appreciated.

      Thanks
      Kris
    Your message has been successfully submitted and would be delivered to recipients shortly.