我收到错误 "在/usr/lib/perl5/site_perl/5.10.0/SOAP/MIME.pm第435行修改了不可创建的数组值,下标-1。"
如果我删除'使用SOAP :: MIME',则没有错误。请建议我解决这个问题的方法。
此程序的意图:我正在尝试阅读包含附件(.txt文件)的Web服务的响应。
文件指定如下:
#!/usr/bin/perl
use SOAP::Lite;
use SOAP::MIME;
use strict;
use warnings;
my $NS = 'http://ipaddress:10497/SampleHellow/services/Hello';
my $host = 'http://ipaddress:10497/SampleHellow/services/Hello?wsdl';
my $soap = SOAP::Lite
->readable(1)
->uri($NS)
->proxy($host);
my $som = $soap->hellowName('aaa')->result;
print "\n$som\n";
foreach my $cid (keys %{$som->attachments}) {
print "Attachment content-id: " . $cid . "\n";
foreach my $foo (@{$som->attachments->{$cid}}) {
print " Array elem: $foo\n";
}
}
exit;