Попробуйте
cpan BERLE/SOAP-Simple-0.00_03.tar.gz
тогда
#!/usr/bin/perl --
use strict; use warnings;
use Data::Dumper;
use SOAP::Simple;
my $wsdlfile = '...';
my $soap = SOAP::Simple->new($wsdlfile);
print Dumper(
$soap->requestMessage(
item => [
{ foo => 1 },
],
)
);
или посмотрите
http://cpansearch.perl.org/src/MARKOV/XML-Compile-SOAP-2.24/t/53wsdlrpclit.t и скопируйте
http://cpansearch.perl.org/src/MARKOV/XML-Compile-SOAP-2.24/t/examples/rpc-literal/element.pl и используйте
schema2example -s element.wsdl -s type.wsdl -x requestMessage.xml
для генерации% запроса на element.pl, поэтому в итоге вы получите что-то вроде
#!/usr/bin/perl
use warnings;
use strict;
# general debugging of XML::Compile modules
#~ use Log::Report mode => 3;
# Data::Dumper is your friend in understanding the answer
use Data::Dumper;
$Data::Dumper::Indent = 1;
# The features we use
use XML::Compile::WSDL11;
use XML::Compile::SOAP11;
use XML::Compile::Transport::SOAPHTTP; # we fake an HTTP server
#
# During initiation 'compile time'
#
my $wsdl = XML::Compile::WSDL11->new('element.wsdl');
my $call = $wsdl->compileClient('using_element'
#~ , transport_hook => \&fake_server # hook simulates a remote server at test
);
#
# Reuse often at 'run time'
#
my %request =
( item =>
[ { foo => 1}
]
);
my $answer = $call->( requestMessage => \%request);
# Useful for debugging. Also useful to report to syslog
# my ($answer, $trace) = $call->(\%request);
# $trace->printTimings;
# When you do not know how the answer is structured
#print Dumper $answer;
if($answer->{Fault})
{ print "Oops\n";
}
else
{ print "*** RESULT=$answer->{answer_via_element}{result}\n";
}
exit 0;
Как только вы создадите нужный XML, попробуйте его вживую