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

Yet Another "Denied Access to Method (hello) in Class..." post?

Expand Messages
  • One4k4 <one4k4@yahoo.com>
    Maybe this is becoming a FAQ, but I couldn t quite find a message here that fit my needs, so here goes. I m using Apache and mod_perl on FreeBSD My Location
    Message 1 of 1 , Jan 9, 2003
      Maybe this is becoming a FAQ, but I couldn't quite find a message
      here that fit my needs, so here goes.

      I'm using Apache and mod_perl on FreeBSD

      My Location tag looks like this:

      <Location /smud>
      SetHandler perl-script
      PerlHandler SMUD::Dispatch
      </Location>

      (FYI: "smud" happens to be a project I'm working on, I'm just too
      lazy to replace it with something else atm, also don't want to
      accidentally change anything..)

      /usr/local/lib/perl5/site_perl/5.8.0/SMUD/Dispatch.pm is quite simple:

      ################################
      package SMUD::Dispatch;

      use SOAP::Transport::HTTP;

      my $server = SOAP::Transport::HTTP::Apache
      -> dispatch_to('/home/one4k4/src/smud/Interfaces');

      sub handler { $server->handler(@_) }

      1;
      ################################

      Within the directory /home/one4k4/src/smud/Interfaces I have a file
      called "SOAP.pm", looking like this:

      ################################
      package SOAP;

      sub hello {
      my $self = shift;

      return ("Foo");
      }

      1;


      When I run a simple script such as the one below:

      ################################
      #!/usr/bin/perl -w

      use SOAP::Lite;

      my $soap = SOAP::Lite
      -> uri('SOAP')
      -> proxy('http://10.0.0.4/smud');

      my $cmd = SOAP::Data->type('string')->name('name')->value
      ("one4k4");
      my $result = $soap->hello($cmd);

      unless ($result->fault) {
      print $result->result()."\n";
      } else {
      print join ', ',
      $result->faultcode,
      $result->faultstring;

      I get the error I speak of:

      shi# perl test_msg.pl
      SOAP-ENV:Client, Denied access to method (hello) in class (SOAP)
      at /usr/local/lib/perl5/site_perl/5.8.0/SOAP/Lite.pm line 2128.

      I've even gone so far as to make sure permissions are all set
      in /home/one4k4/src/smud.... (755, FYI)

      What could the issue be? I've always been confused with the concept
      of what -> uri('XXX') should say, SOAP here, because of
      ~/Interfaces/SOAP.pm doing the dirty work..

      I'm not even thinking about @INC, which probably won't come over with
      dynamic dispatch.

      Should SMUD::Dispatch be like below?

      ################################
      package SMUD::Dispatch;

      use SOAP::Transport::HTTP;
      use lib "/home/one4k4/src/smud";

      my $server = SOAP::Transport::HTTP::Apache
      -> dispatch_to('Interfaces::SOAP');

      sub handler { $server->handler(@_) }

      1;

      I'm out of ideas. Any thoughts, guys and girls? I can pick and
      pick, but it's getting late here, and I'm curious if anybody has come
      across a similar issue.

      Thanks so much in advance,

      -Tom
      webmaster@...
    Your message has been successfully submitted and would be delivered to recipients shortly.