I'm now using perl 5.8.8 under RHEL5U3 with SOAP::Lite v0.710.08.
It's been running well until today when I planned to follow the XML-RPC introspection http://scripts.incutio.com/xmlrpc/introspection.html to add the reserved methods to my server:
for simply describing this bug, I've written a very simple server script, as below:
server.pl
#!/usr/bin/perl
use strict;
use warnings;
use XMLRPC::Transport::HTTP;
my $server = XMLRPC::Transport::HTTP::Daemon
-> new(LocalPort => 7077, LocalAddr => '127.0.0.1', ReuseAddr => 1)
-> dispatch_to('/path/to/somewhere');
-> handle;
and under /path/to/somewhere, I placed the following module:
system.pl
#!/usr/bin/perl
use strict;
use warnings;
package system;
sub listMethods {
return [1,2,3];
}
1;
then invoke:
[root@backup SOAP]# XMLRPCsh.pl http://localhost:7077 system.listMethods
Usage: method[(parameters)]
> --- XMLRPC FAULT ---
Client
Failed to access class (system): Perl v65280.0.0 required (did you mean v65280.000?)--this is only v5.8.8, stopped at (eval 93) line 1.
I simply copied the system.pm to system1.pm as well as replacing the 'package system;' line to 'package system1;'
then invoke:
[root@backup SOAP]# XMLRPCsh.pl http://localhost:7077 system1.listMethods
Usage: method[(parameters)]
> --- XMLRPC RESULT ---
[
'1',
'2',
'3'
]
things goes well. That's to say, I can't dispatch to system.pm, but can make it to system1.pm, and they're almost identical-_-
I've also tested the server script below, which haven't this problem:
#!/usr/bin/perl
use strict;
use warnings;
use XMLRPC::Transport::HTTP;
my $server = XMLRPC::Transport::HTTP::Daemon
-> new(LocalPort => 7077, LocalAddr => '127.0.0.1', ReuseAddr => 1)
-> dispatch_to('system')
-> handle;
package system;
sub listMethods {
return [1,2,3];
}
invoke:
[root@backup SOAP]# XMLRPCsh.pl http://localhost:7077 system.listMethods
Usage: method[(parameters)]
> --- XMLRPC RESULT ---
[
'1',
'2',
'3'
]
my working environment is based on Apache::XMLRPC::Lite and mod_perl 2.04 which also has this problem and furthermore, I can't dispatch 'inside' by using Apache::XMLRPC::Lite, it seems, IMHO.
I hope there'll be a fix or workaround because I'd like to use the 'dispatch outside' mode and must follow the XMLRPC introspection.
Thanks. I'll be very glad for any comments.
I tried to modify the SOAP/Lite.pm line 2671:
eval 'local $^W; ' . "require $class";
to:
eval 'local $^W: ' . "use $class";
then my problem is resolved, I don't know whether there'll be side effects.