开发者

Remote function call using SOAP::Lite

I'm trying to write a client application in Perl using SOAP::Lite. I am trying to call a specific function, but I cannot seem to get the parameters right. I keep getting a response back saying "Found more elements in the soap envelope than required b开发者_运维百科y the WSDL", but no more information beyond that.

Is there any way in SOAP::Lite to directly find out the parameters needed for the remote procedure call?

Thank you.


I navigated by a combination of reading the WSDL and dumping out SOAP::Lite objects as I could manufacture them.

Below is the way that I was able to pick through the returns from SOAP::Lite. Keep in mind that I'm working around some of the bugs in SOAP::Lite by avoiding the SOAP::Schema::load call, and avoiding SL's dislike of more than one defined service in a WSDL, where it kindly croaks on you.

use strict;
use warnings;
use Data::Dumper qw<Dumper>;
use SOAP::Lite; #  trace => 'all'; # <- trace can help

my $schema   = SOAP::Schema->new( schema_url => $destination_URL )->parse();
my $services = $schema->services();
my $defintion;
foreach my $service ( values %$services ) { 
    $definition = $service->{$method_name};
}

print Dumper( $definition );

Most of variables that are not defined above are things that you would have to supply.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜