我在使用SOAP :: Lite最基本的示例時遇到了問題。基本SOAP :: Lite用法
最初,我收到了關於版本不匹配的錯誤,所以我按this question添加了soapversion('1.2')
。
#!/usr/bin/perl -w
use strict;
use SOAP::Lite;
use Data::Dumper;
my $service = SOAP::Lite->service('https://www.w3schools.com/xml/tempconvert.asmx?WSDL');
$service->soapversion('1.2');
$service->serializer->soapversion('1.2');
my $result = $service->FahrenheitToCelsius('212');
print "result = " . Dumper $result;
我不再收到錯誤的版本,而不是我得到:result = $VAR1 = 'Error';