I am trying to run a Perl SOAP server, it starts up alright, but when a method is called remotely I get the following message:
SOAP::Serializer::envelope: Client Failed to access class (HELLO):
Can’t locate HELLO.pm in @INC (@INC contains:) at (eval 127) line 3.
Now I assume this is because @INC does not specify where my HELLO.pm file resides? Although where abouts can I define this? I have tried adding the following to my script and placing the class (Hello.pm) there but no luck:
BEGIN {
push(@INC, '/etc/perl/');
};
My code is as follows (soapserver.pl):
BEGIN {
push(@INC, '/etc/perl/');
};
#- SoapHttpServerTrace.pl
#- Copyright (c) 2002 by Dr. Herong Yang
use SOAP::Lite +trace;
use SOAP::Transport::HTTP;
my $daemon = SOAP::Transport::HTTP::Daemon
-> new (LocalAddr => 'XX.XX.XX.XX', LocalPort => 8001, listen => 5);
$daemon -> dispatch_to('Hello::hello');
print "Contact SOAP server at ", $daemon->url, "\n";
$daemon->handle();
You said your file is named Hello.pm, but the error message indicates an attempt to load HELLO.pm. Fix whichever of these is wrong.