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

4238simple question

Expand Messages
  • Nick Potemkin
    Dec 9, 2004
    • 0 Attachment
      Hello.

      I just started to use SOAP::Lite and i tried to write my test example based on examples in
      distributive.

      ========= test.cgi =============
      #!/usr/bin/perl

      use SOAP::Transport::HTTP;
      use SOAP::Lite +trace;

      SOAP::Transport::HTTP::CGI
      -> dispatch_to('/www/ms.yp.ru/cgi-bin','My::Test')
      -> options({compress_threshold => 10000})
      -> handle
      ;
      ================================
      ========= My::Test =============
      package My::Test;

      sub new {
      my $self = shift;
      my $class = ref($self) || $self;
      bless {_num=>shift} => $class;
      }

      sub test
      {
      $self = shift;
      return "Passed...".$self->{_num}."\n";
      }

      sub test1
      {
      return "Passed... test1\n";
      }

      1;
      ================================
      ========= test.pl ==============
      #!/usr/bin/perl

      use SOAP::Lite +autodispatch =>
      uri => 'http://ms.yp.ru/My/Test',
      proxy => 'http://ms.yp.ru/cgi-bin/test.cgi';

      #use SOAP::Lite +trace;

      $t = My::Test->new(10);
      print "Test: ".$t->test()."\n";
      print "Test1: ".test1();
      ================================

      So, when i tried to execute test.pl:
      $ ./test.pl
      Test:
      Test1: Passed... test1

      And, on error_log of apache:
      ..
      SOAP::Serializer::envelope: Client Failed to locate method (test) in class (My::Test) at /usr/local/share/perl/5.8.4/SOAP/Lite.pm line 2337.
      ..

      What's wrong? SOAP::Lite 0.60 (latest from CPAN), perl 5.8.4

      --
      Nick Potemkin
    • Show all 2 messages in this topic