我已经尝试了两周在Perl(with WSDL::Generator)中创建一个Web服务,并用Perl编写的客户端调用它.
现在我尝试使用专门用于WSDL的库提供的示例:Soap::Lite
但是我得到一个不断出现的错误
404 file not found at c.PL at line 7.
Run Code Online (Sandbox Code Playgroud)
你能帮我解决一下吗?
这是我的代码:
WorldFunctions.pm (C:\ Perl\SOAP-Lite\WorldFunctions.pm):该类
package WorldFunctions;
sub new { bless {}, shift; }
sub Hello { my ($s, $name) = @_;
return 'Hello, ' . $name . "\n";
}
sub GoodBye { my ($s, $name) = @_;
return 'Goodbye, ' . $name . "\n";
}
Run Code Online (Sandbox Code Playgroud)
a.pl (C:\ Perl\SOAP-Lite\a.pl):创建WorldFunctions.pm类的WSDL文件
#!/usr/bin/perl
use WSDL::Generator;
my $init = {
'schema_namesp' => 'http://localhost/world/WorldFunctions.xsd',
'services' => 'WorldFunctions',
'service_name' => 'WorldFunctions', …Run Code Online (Sandbox Code Playgroud)