SOAP::Lite Frustrations

jonasbn on 2006-01-26T22:08:35

I am currently attempting to set up a webservice in a mod_perl based environment for a client. The environment is based on Linux and perl 5.6.1 - I do not have root access on the machine, but I have my own virtualhost and CPAN installation so I am somewhat in control of what is going on.

After going back and forth for many hours, I turned on my own laptop and implemented a similar setup, in OSX (Tiger, running perl 5.8.6) though, this took 10 minutes and worked out of the box - so I copied this solution back to the Linux environment and it does not work??

I am getting really frustrated with this - it is not the first time I see weird a problem with Perl 5.6.1 on Linux, so I am afraid that I might be suspecting a problem with the Perl version, but then I would very much like to locate the problem in order to report it (or at least find out what it is). So if anybody has knowledge of where SOAP::Lite initializes modules, please point me to that part of the SOAP::Lite distribution - I have not been able to find this particular functionality and it seems as if this is the area I would like to dig into.

I have signed up to one of the SOAP::Lite mailinglists (perhaps I should join the developer list instead of the user/support) and I addressed the issue there.

This is a brief description of the setup:

httpd.conf:

PerlRequire /Users/jonasbn/Desktop/soap/startup.pl SetHandler perl-script PerlHandler MySOAP PerlSetVar options "compress_threshold => 10000"


startup.pl:
use lib qw(/Users/jonasbn/Desktop/soap);

use MySOAP; use HelloWorld;

1;


MySOAP.pm:
package MySOAP;

use Data::Dumper; use SOAP::Transport::HTTP;

my $server = SOAP::Transport::HTTP::Apache -> dispatch_to('/Users/jonasbn/Desktop/soap', 'HelloWorld');

sub handler { print STDERR "We have reached the dispatcher\n";

print STDERR Dumper $server;

$server->handler(@_); }

1;


HelloWorld.pm:
package HelloWorld;

sub helloworld { print STDERR "We have reached the endpoint\n"; return "Hello World!\n"; }

1;


I never reach the endpoint in the Linux environment, since the server does not know it, I can see it gets the parameters (dispatch_to) from MySOAP.pm, but the handling module never seems to be initialized and I therefor get an error 500 :-/