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

RE: [soaplite] Denied access to method (xxxx) in class (yyyy)

Expand Messages
  • Jim Lancaster
    Dangnabbit. All I had to do is finally post the question and I figured it out. I changed - dispatch_to( /Development/soap/lib ); to -
    Message 1 of 2 , Apr 9, 2004
    • 0 Attachment
      Dangnabbit. All I had to do is finally post the question and I figured
      it out.

      I changed
      -> dispatch_to('/Development/soap/lib');
      to
      -> dispatch_to('C:\\Development\\soap\\lib');

      and now it appears to be working.

      Hope this helps someone else.

      JIm



      > -----Original Message-----
      > From: Jim Lancaster [mailto:jlancaster@...]
      > Sent: Friday, April 09, 2004 1:11 PM
      > To: soaplite@yahoogroups.com
      > Subject: [soaplite] Denied access to method (xxxx) in class (yyyy)
      >
      > I've created a soap client & server and it works when the
      > server is a local daemon. However, I am having trouble
      > moving the server to Win32-Apache 1.3/mod_perl 1. When I try
      > to run the agent against the Apache server, I get:
      >
      > ************************************
      > A fault (SOAP-ENV:Client) occurred:
      > Denied access to method (get_device_id) in class (SServer) at
      > C:/Perl/site/lib/S OAP/Lite.pm line 2159.
      >
      > Died at lib/SAgent.pm line 124.
      > ************************************
      >
      > I'm not sure where to start debugging this. Apparently, my
      > initial connection to the server is successful (it doesn't
      > 'die'), but the attempt to use $server->get_device_id fails
      > with the above error message. Here are what I think are the
      > pertinent pieces of information:
      >
      > from Apache httpd.conf:
      > -----------------------------------
      > <Location /soap>
      > SetHandler perl-script
      > PerlHandler Apache::Sagiss
      > </Location>
      >
      > Sagiss.pm is located in C:\Perl\site\lib\Apache:
      > -----------------------------------
      > package Apache::Sagiss;
      > use SOAP::Transport::HTTP;
      > my $server = SOAP::Transport::HTTP::Apache
      > -> dispatch_to('/Development/soap/lib');
      > sub handler { $server->handler(@_) }
      > 1;
      >
      > SSserver.pm is located in C:\Development\soap\lib and contains:
      > -----------------------------------
      > sub get_device_id {
      >
      > my ($self,$reginfo) = @_;
      > ...<more code goes here>...
      >
      > }
      >
      >
      > In SAgent.pm, I connect the the Apache server using:
      > -----------------------------------
      > # Connect to server.
      > my $server = &server_connect($self);
      >
      > # Get the device id. The server will need ClientNum, Hostname
      > & IPAddress.
      > # (Is it possible to get to this point without Hostname &
      > IPAddress?) my $result =
      > $server->get_device_id($self->{'Registration'});
      >
      > # Check for SOAP fault; update DeviceID in cfg.
      > if ($result->fault) {
      > printf "A fault (%s) occurred:\n%s\n",
      > $result->faultcode,$result->faultstring;
      > die;
      > } else {
      > $self->{'Registration'}->{'DeviceID'} = $result->result; }
      >
      > sub server_connect {
      > my ($self) = @_;
      > my $server = SOAP::Lite
      >
      > ->uri("http://$self->{'Registration'}->{'LogServer'}/SServer")
      >
      > ->proxy("http://$self->{'Registration'}->{'LogServer'}/soap");
      > die "$0: Error creating SOAP::Lite client, cannot continue"
      > unless $server;
      > return $server;
      > }
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > ---------------------~--> Buy Ink Cartridges or Refill Kits
      > for your HP, Epson, Canon or Lexmark Printer at MyInks.com.
      > Free s/h on orders $50 or more to the US & Canada.
      > http://www.c1tracking.com/l.asp?cid=5511
      > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/W6uqlB/TM
      > --------------------------------------------------------------
      > -------~->
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.