我试图向SOAP服务发送消息并收到错误:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"http://schemas.xmlsoap.org/wsdl/soap/", the namespace on the "Envelope" element, is not a valid SOAP version.</faultstring></soap:Fault></soap:Body></soap:Envelope>
我的代码:
use 5.014;
use warnings 'FATAL' => 'all';
use SOAP::Lite +trace => 'all';
my %data = (
...
);
my $service = SOAP::Lite->service('file:wsdl.txt');
$service->...(
SOAP::Data->name('userId')->value('...'),
SOAP::Data->name('password')->value('...'),
map( SOAP::Data->name($_)->value($data{$_})->type('string'), sort keys %data )
);
SOAP :: Lite版本是1.09。