jeffthewookiee has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to allow SOAP access to a Logger class I've written, using SOAP::Lite. I've installed and configured SOAP::Lite in mod_perl. Here's my entry in an apache conf file:
<Location /soap> SetHandler perl-script PerlHandler Apache2::SOAP PerlSetVar dispatch_to "OO::Logger" </Location>
I want to access new(), debug(), info(), warn(), and error() in an autodispatch, OO-manner. Here's my client(domain names changed to protect the innocent):
use SOAP::Lite +autodispatch => uri => 'http://super_secret.com/OO/Logger', proxy => 'http://super_secret.com/soap', on_fault => \&handle_error; my $logger = OO::Logger -> new("","","NO argument"); $logger -> debug("This is a debugggg...\n"); sub handle_error { print "SOAP error:\n"; my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status, +"\n"; }
Running the client results in a SOAP error:
Failed to locate method (debug) in class (OO::Logger) at /usr/lib/per +l5/site_perl/5.8.8/SOAP/Lite.pm line 2586.
This is especially curious to me as the call to new() succeeds and Data::Dumper reveals it is in fact an initialized Logger object. Why can't it locate the rest of the class's methods?

Replies are listed 'Best First'.
Re: SOAP::Lite and mod_perl
by shmem (Chancellor) on Dec 10, 2007 at 23:28 UTC
    Why does the SOAP error mention Exploreos::Logger when you've instantiated a OO::Logger object? Confused codebase? ;-)

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      Another interesting side-node, if I start apache in single user mode (httpd -X) the code works perfectly.