import SOAP-WSDL 2.00_27 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_27
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_27.tar.gz
This commit is contained in:
Martin Kutter
2009-12-12 19:48:14 -08:00
committed by Michael G. Schwern
parent 3cfeebae54
commit eb096ad88e
67 changed files with 1147 additions and 277 deletions
+8 -4
View File
@@ -4,18 +4,22 @@ use warnings;
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;
# I need access to the WSDL around - or use Data::Dumper::Streamer
# for serializing the generated closures into (big) perl files
my $wsdl = XML::Compile::WSDL11->new('wsdl/11_helloworld.wsdl');
# I have to lookup the methods from the WSDL
# I compile a interface method for a single SOAP method from the WSDL
# I have to lookup the method names from the WSDL
my $call = $wsdl->compileClient('sayHello');
# I have to lookup the parameters from the WSDL
# I have to lookup the parameters from the WSDL - can be quite tricky
my $result = $call->(
name => $ARGV[1] || '"Your name"',
givenName => $ARGV[0] || '"Your given name"',
);
# XML::Compile::SOAP's client just returns undef in case of failure
die "Error calling soap method" if not defined $result;
# I have to lookup the output parameters from the WSDL - or try Dumper
print $result->{ parameters }->{ sayHelloResult }, "\n";
# I have to lookup the output parameters from the WSDL - or try Data::Dumper
print $result->{ parameters }->{ sayHelloResult }, "\n";