File: person_compile.pl

package info (click to toggle)
libsoap-wsdl-perl 3.004-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,600 kB
  • sloc: perl: 8,433; xml: 1,769; java: 19; makefile: 15
file content (22 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl -w
use strict;
use warnings;
use XML::Compile::SOAP11;
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;

my $wsdl = XML::Compile::WSDL11->new('wsdl/Person.wsdl');

# I have to lookup the methods from the WSDL
my $call = $wsdl->compileClient('ListPerson');

# I have to lookup the parameters from the WSDL
my $result = $call->({ in => undef});

die "Error calling soap method" if not defined $result;

# I have to lookup the output parameters from the WSDL - or try Dumper
#use Data::Dumper;
#print Dumper $result;

print "Found ", scalar @{ $result->{ parameters }->{ out }->{ seq_NewElement }->[0]->{ NewElement } } , " persons\n";