SOAP-WSDL-2.00.10/ 0000755 0001750 0001750 00000000000 11203370730 012525 5 ustar martin martin SOAP-WSDL-2.00.10/benchmark/ 0000755 0001750 0001750 00000000000 11203370730 014457 5 ustar martin martin SOAP-WSDL-2.00.10/benchmark/person.pl 0000444 0001750 0001750 00000014033 11203370730 016321 0 ustar martin martin use lib '../lib';
use lib '../example/lib';
use lib '../../Class-Std-Fast/lib';
use lib '../../SOAP-Lite-0.71/lib';
use lib '../../SOAP-WSDL_XS/blib/lib';
use lib '../../SOAP-WSDL_XS/blib/arch';
use strict;
use Benchmark qw(cmpthese);
use XML::Compile::SOAP11;
use XML::Compile::Transport::SOAPHTTP();
use XML::Compile::Util;
use XML::Compile::WSDL11;
use XML::Simple;
use SOAP::Lite;
use MyInterfaces::TestService::TestPort;
#use SOAP::WSDL::Deserializer::XSD_XS;
use SOAP::WSDL::Factory::Deserializer;
#
# register SOAP::WSDL's transport as default for SOAP::WSDL and SOAP::WSDL_XS
# - they use SOAP::Lite's SOAP::Transport::* if available
#
use SOAP::WSDL::Transport::HTTP;
use SOAP::WSDL::Factory::Transport;
SOAP::WSDL::Factory::Transport->register('http', 'SOAP::WSDL::Transport::HTTP');
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
my $person = {
PersonID => { # MyTypes::PersonID
ID => 1, # int
},
Salutation => 'Salutation0', # string
Name => 'Name0', # string
GivenName => 'Martin', # string
DateOfBirth => '1970-01-01', # date
HomeAddress => { # MyTypes::Address
Street => 'Street 0', # string
ZIP => '00000', # string
City => 'City0', # string
Country => 'Country0', # string
PhoneNumber => '++499131123456', # PhoneNumber
MobilePhoneNumber => '++49150123456', # PhoneNumber
},
WorkAddress => { # MyTypes::Address
Street => 'Somestreet 23', # string
ZIP => '12345', # string
City => 'SomeCity', # string
Country => 'Germany', # string
PhoneNumber => '++499131123456', # PhoneNumber
MobilePhoneNumber => '++49150123456', # PhoneNumber
},
Contracts => { # MyTypes::ArrayOfContract
Contract => [
{ # MyTypes::Contract
ContractID => 100000, # long
ContractName => 'SomeContract0', # string
},
{ # MyTypes::Contract
ContractID => 100001, # long
ContractName => 'SomeContract1', # string
},
{ # MyTypes::Contract
ContractID => 100002, # long
ContractName => 'SomeContract2', # string
},
{ # MyTypes::Contract
ContractID => 100003, # long
ContractName => 'SomeContract3', # string
},
],
},
}
;
#
# compile XML::Compile client with the options suggested by Mark Overmeer
# for maximum speedup
#
my $compile = XML::Compile::WSDL11->new('../example/wsdl/Person.wsdl',
sloppy_integers => 1,
check_values => 0,
validation => 0,
ignore_facets => 1,
);
#
# Call all variants once to allow their first-time tasks to be done
#
my $call = $compile->compileClient('ListPerson');
$call->({ in => undef});
# Initialize SOAP::WSDL interface
my $soap = MyInterfaces::TestService::TestPort->new();
# Load all classes - XML::Compile has created everything before, too
$soap->ListPerson({});
my $lite = SOAP::Lite->new()->default_ns('http://www.example.org/benchmark/')
->proxy('http://localhost:81/soap-wsdl-test/person.pl');
$lite->on_action( sub { 'http://www.example.org/benchmark/ListPerson' } );
$lite->ListPerson();
my $lite_xml = SOAP::Lite->new()->default_ns('http://www.example.org/benchmark/')
->proxy('http://localhost:81/soap-wsdl-test/person.pl');
$lite_xml->on_action( sub { 'http://www.example.org/benchmark/ListPerson' } );
$lite_xml->outputxml(1);
$lite_xml->ListPerson();
# # register for SOAP 1.1
#SOAP::WSDL::Factory::Deserializer->register('1.1' => 'SOAP::WSDL::Deserializer::XSD_XS' );
#my $wsdl_xs = MyInterfaces::TestService::TestPort->new();
my $count = 70;
my @data = ();
my $n = 0;
print "Benchmark conducted with
SOAP::Lite - $SOAP::Lite::VERSION
SOAP::WSDL - $SOAP::WSDL::Client::VERSION
SOAP::WSDL_XS - $SOAP::WSDL::Deserializer::XSD_XS::VERSION;
XML::Compile::SOAP - $XML::Compile::SOAP::VERSION
XML::Simple - $XML::Simple::VERSION
XML::Simple uses XML::Parser as backend and SOAP::Lite with
outputxml(1) set as SOAP client.
XML::Parser - $XML::Parser::VERSION
XML::Simple is not benchmarked in run 3ff, as it is expected
do deliver the same result.
Benchmark $n: Store result in private variable and destroy it
";
$n++;
cmpthese $count, {
'SOAP::Lite' => sub { my $som = $lite->call('ListPerson') },
'SOAP::WSDL' => sub { my $result = $soap->ListPerson({}) },
# 'SOAP::WSDL_XS' => sub { my $result = $wsdl_xs->ListPerson({}) },
'XML::Compile' => sub { my $result = $call->() },
'XML::Simple' => sub { my $result = XMLin( $lite_xml->call('ListPerson')) },
};
print "\nBenchmark $n: Push result on list\n";
$n++;
cmpthese $count, {
'SOAP::Lite' => sub { push @data, $lite->call('ListPerson') },
'SOAP::WSDL' => sub { push @data, $soap->ListPerson({}) },
# 'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({}) },
'XML::Compile' => sub { push @data, $call->() },
'XML::Simple' => sub { push @data, XMLin( $lite_xml->call('ListPerson')) },
};
@data = ();
print "\nBenchmark $n: Play it, please play it again, Sam\n";
$n++;
cmpthese $count, {
'SOAP::WSDL' => sub { push @data, $soap->ListPerson({}) },
# 'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({}) },
# 'XML::Compile' => sub { push @data, $call->() },
# 'SOAP::Lite' => sub { push @data, $lite->call('ListPerson') },
};
print "\nBenchmark $n: ca. 1kB request - result destroyed immediately\n";
$n++;
cmpthese $count, {
'SOAP::WSDL' => sub { my $result = $soap->ListPerson({ in => $person }) },
# 'SOAP::WSDL_XS' => sub { my $result = $wsdl_xs->ListPerson({ in => $person }) },
'XML::Compile' => sub { my $result = $call->({ in => $person }) },
};
print "\nBenchmark $n: ca. 1kB request - push result on list\n";
$n++;
cmpthese $count, {
'SOAP::WSDL' => sub { push @data, $soap->ListPerson({ in => $person }) },
# 'SOAP::WSDL_XS' => sub { push @data, $wsdl_xs->ListPerson({ in => $person }) },
'XML::Compile' => sub { push @data, $call->({ in => $person }) },
};
SOAP-WSDL-2.00.10/benchmark/XSD/ 0000755 0001750 0001750 00000000000 11203370730 015115 5 ustar martin martin SOAP-WSDL-2.00.10/benchmark/XSD/01_anyType.t 0000444 0001750 0001750 00000000414 11203370730 017230 0 ustar martin martin use strict;
use warnings;
use Benchmark;
use lib '../../lib';
use SOAP::WSDL::XSD::Typelib::Builtin::anyType;
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anyType->new();
timethese 10000, {
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anyType->new() },
};
SOAP-WSDL-2.00.10/benchmark/XSD/strftime.pl 0000444 0001750 0001750 00000001760 11203370730 017311 0 ustar martin martin use Benchmark qw(cmpthese timethis timethese);
use POSIX ();
use Date::Format ();
my @time_from = localtime;
#use lib '../../lib';
use SOAP::WSDL::XSD::Typelib::Builtin::dateTime;
my $date = SOAP::WSDL::XSD::Typelib::Builtin::dateTime->new();
timethese 10000, {
'sprintf' => sub { $date->set_value('Dec 24 2004 CET'); }
};
__END__
print "Comparing POSIX::strftime and Date::Format::strftime '%Y-%m-%dT%H:%M:%S%z'\n\n";
print 'POSIX: ', POSIX::strftime('%Y-%m-%dT%H:%M:%S%z', @time_from), "\n";
print 'Date::Format: ', Date::Format::strftime('%Y-%m-%dT%H:%M:%S%z', @time_from), "\n";
cmpthese 100000, {
POSIX => sub { POSIX::strftime('%Y-%m-%dT%H:%M:%S%z', @time_from) },
'Date::Format' => sub { Date::Format::strftime('%Y-%m-%dT%H:%M:%S%z', @time_from) },
};
__END__
results with perl-5.8.8 on Ubuntu 8.04 on a Thinkpad T42 (1.7GHz Dothan):
Rate Date::Format POSIX
Date::Format 10684/s -- -93%
POSIX 153846/s 1340% --
SOAP-WSDL-2.00.10/benchmark/XSD/03_string.t 0000444 0001750 0001750 00000004165 11203370730 017116 0 ustar martin martin use strict;
use warnings;
use Benchmark;
use lib '../../lib';
use lib '../../../Class-Std-Fast/lib';
use SOAP::WSDL::XSD::Typelib::Builtin::string;
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::string->new();
timethese 20000, {
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new() },
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::string->new({
value => 'Teststring',
})
},
};
$obj->set_value('Foobar');
timethese 20000, {
serialize => sub { $obj->serialize() }
};
my $data;
timethese 1000000, {
'set_FOO' => sub { $obj->set_value('Test') },
'get_FOO' => sub { $data = $obj->get_value() },
};
__END__
Benchmark: timing 20000 iterations of new, new + params...
new: 1 wallclock secs ( 0.41 usr + 0.00 sys = 0.41 CPU) @ 48780.49/s (n=20000)
new + params: 1 wallclock secs ( 0.53 usr + 0.01 sys = 0.54 CPU) @ 37037.04/s (n=20000)
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
get_FOO: 2 wallclock secs ( 1.43 usr + 0.01 sys = 1.44 CPU) @ 694444.44/s (n=1000000)
set_FOO: 0 wallclock secs ( 1.43 usr + 0.01 sys = 1.44 CPU) @ 694444.44/s (n=1000000)
::Fast
---
Benchmark: timing 20000 iterations of new, new + params...
new: 0 wallclock secs ( 0.44 usr + 0.01 sys = 0.45 CPU) @ 44444.44/s (n=20000)
new + params: 1 wallclock secs ( 0.55 usr + 0.00 sys = 0.55 CPU) @ 36363.64/s (n=20000)
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
get_FOO: 0 wallclock secs ( 0.81 usr + 0.00 sys = 0.81 CPU) @ 1234567.90/s (n=1000000)
set_FOO: 2 wallclock secs ( 0.87 usr + 0.01 sys = 0.88 CPU) @ 1136363.64/s (n=1000000)
::Fast with inlined ID
Benchmark: timing 20000 iterations of new, new + params...
new: 0 wallclock secs ( 0.41 usr + 0.00 sys = 0.41 CPU) @ 48780.49/s (n=20000)
new + params: 1 wallclock secs ( 0.52 usr + 0.00 sys = 0.52 CPU) @ 38461.54/s (n=20000)
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
get_FOO: 2 wallclock secs ( 0.80 usr + 0.00 sys = 0.80 CPU) @ 1250000.00/s (n=1000000)
set_FOO: 2 wallclock secs ( 0.89 usr + -0.01 sys = 0.88 CPU) @ 1136363.64/s (n=1000000) SOAP-WSDL-2.00.10/benchmark/XSD/02_anySimpleType.t 0000444 0001750 0001750 00000005264 11203370730 020413 0 ustar martin martin use strict;
use warnings;
use Benchmark;
use lib '../../lib';
use lib '../../../Class-Std-Fast/lib';
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
my $obj = SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new();
timethese 10000, {
'new' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new() },
'new + params' => sub { SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType->new({
value => 'Teststring',
}) },
'set_FOO' => sub { $obj->set_value('Test') },
};
my $data;
timethese 1000000, {
'set_FOO' => sub { $obj->set_value('Test') },
'get_FOO' => sub { $data = $obj->get_value() },
};
__END__
Benchmark: timing 10000 iterations of new, new + params, set_FOO...
new: 0 wallclock secs ( 0.83 usr + 0.00 sys = 0.83 CPU) @ 12048.19/s (n=10000)
new + params: 1 wallclock secs ( 0.58 usr + 0.00 sys = 0.58 CPU) @ 17241.38/s (n=10000)
set_FOO: 0 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU) @ 1000000.00/s (n=10000)
(warning: too few iterations for a reliable count)
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
get_FOO: 1 wallclock secs ( 1.79 usr + 0.01 sys = 1.80 CPU) @ 555555.56/s (n=1000000)
set_FOO: 2 wallclock secs ( 1.44 usr + 0.03 sys = 1.47 CPU) @ 680272.11/s (n=1000000)
## Fast:
Benchmark: timing 10000 iterations of new, new + params, set_FOO...
new: 1 wallclock secs ( 0.67 usr + 0.01 sys = 0.68 CPU) @ 14705.88/s (n=10000)
new + params: 1 wallclock secs ( 0.54 usr + 0.00 sys = 0.54 CPU) @ 18518.52/s (n=10000)
set_FOO: 0 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU) @ 1000000.00/s (n=10000)
(warning: too few iterations for a reliable count)
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
get_FOO: 2 wallclock secs ( 1.11 usr + 0.00 sys = 1.11 CPU) @ 900900.90/s (n=1000000)
set_FOO: 2 wallclock secs ( 0.80 usr + 0.00 sys = 0.80 CPU) @ 1250000.00/s (n=1000000)
## Fast qw(2);
Benchmark: timing 10000 iterations of new, new + params, set_FOO...
new: 1 wallclock secs ( 0.17 usr + 0.00 sys = 0.17 CPU) @ 58823.53/s (n=10000)
(warning: too few iterations for a reliable count)
new + params: 0 wallclock secs ( 0.19 usr + 0.00 sys = 0.19 CPU) @ 52631.58/s (n=10000)
(warning: too few iterations for a reliable count)
set_FOO: 0 wallclock secs ( 0.01 usr + 0.00 sys = 0.01 CPU) @ 1000000.00/s (n=10000)
(warning: too few iterations for a reliable count)
Benchmark: timing 1000000 iterations of get_FOO, set_FOO...
get_FOO: 1 wallclock secs ( 1.12 usr + 0.00 sys = 1.12 CPU) @ 892857.14/s (n=1000000)
set_FOO: 0 wallclock secs ( 0.80 usr + 0.01 sys = 0.81 CPU) @ 1234567.90/s (n=1000000)
SOAP-WSDL-2.00.10/benchmark/MEMORY_FOOTPRINT 0000444 0001750 0001750 00000006335 11203370730 017063 0 ustar martin martin Memory footprints for example/ scripts comparing SOAP::WSDL, SOAP::Lite and
XML::Compile::SOAP
Results with perl-5.8.8 on Ubuntu 8.04 (x86):
PID %CPU %MEM VSZ RSS COMMAND
10183 12.0 1.1 14292 11492 perl -I../lib hello.pl
10554 7.2 0.9 12636 9828 perl hello_lite.pl
10224 17.5 1.6 20780 17012 perl hello_compile.pl
10287 25.0 1.1 14680 11776 perl -I../lib person.pl
10313 24.0 1.6 21068 17312 perl person_compile.pl
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=linux, osvers=2.6.15.7, archname=i486-linux-gnu-thread-multi
uname='linux palmer 2.6.15.7 #1 smp thu sep 7 19:42:20 utc 2006 i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='4.2.3 20071123 (prerelease) (Ubuntu 4.2.2-3ubuntu4)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.6.1.so, so=so, useshrplib=true, libperl=libperl.so.5.8.8
gnulibc_version='2.6.1'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at Nov 27 2007 10:44:36
@INC:
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
.
SOAP-WSDL-2.00.10/benchmark/person.xml 0000444 0001750 0001750 00000030755 11203370730 016517 0 ustar martin martin
1
Salutation0
Name0
Martin
1970-01-01
Street 0
00000
City0
Country0
++499131123456
++49150123456
Somestreet 23
12345
SomeCity
Germany
++499131123456
++49150123456
100000
SomeContract0
100001
SomeContract1
100002
SomeContract2
100003
SomeContract3
2
Salutation2
Name2
Martin2
1970-01-02
Street 2
00002
City2
Country2
++4900000002
++491700000002
Somestreet 2
222222
SomeCity2
Germany
++4920000002
++4920000002
100002
SomeContract2
100021
SomeContract21
100022
SomeContract22
1000023
SomeContract23
3
Salutation3
Name3
Martin3
1970-01-03
Street 3
00003
City3
Country3
++4900000003
++491700000003
Somestreet 3
333333
SomeCity3
Germany
++4930000003
++4930000003
100003
SomeContract3
100031
SomeContract31
100033
SomeContract33
1000033
SomeContract33
4
Salutation4
Name4
Martin4
1970-01-04
Street 4
00004
City4
Country4
++4900000004
++491700000004
Somestreet 4
444444
SomeCity4
Germany
++4940000004
++4940000004
100004
SomeContract4
100041
SomeContract41
100044
SomeContract44
1000044
SomeContract44
5
Salutation5
Name5
Martin5
1970-01-05
Street 5
00005
City5
Country5
++4900000005
++491700000005
Somestreet 5
555555
SomeCity5
Germany
++4950000005
++4950000005
100005
SomeContract5
100051
SomeContract51
100055
SomeContract55
1000053
SomeContract53
6
Salutation6
Name6
Martin6
1970-01-06
Street 6
00006
City6
Country6
++4900000006
++491700000006
Somestreet 6
666666
SomeCity6
Germany
++4960000006
++4960000006
100006
SomeContract6
100061
SomeContract61
100066
SomeContract66
1000063
SomeContract63
7
Salutation7
Name7
Martin7
1970-01-07
Street 7
00007
City7
Country7
++4900000007
++491700000007
Somestreet 7
777777
SomeCity7
Germany
++4970000007
++4970000007
100007
SomeContract7
100071
SomeContract71
100077
SomeContract77
1000073
SomeContract73
8
Salutation8
Name8
Martin8
1970-01-08
Street 8
00008
City8
Country8
++4900000008
++491700000008
Somestreet 8
888888
SomeCity8
Germany
++4980000008
++4980000008
100008
SomeContract8
100081
SomeContract81
100088
SomeContract88
1000083
SomeContract83
9
Salutation9
Name9
Martin9
1970-01-09
Street 9
00009
City9
Country9
++4900000009
++491700000009
Somestreet 9
999999
SomeCity9
Germany
++4990000009
++4990000009
100009
SomeContract9
100091
SomeContract91
100099
SomeContract99
1000093
SomeContract93
10
Salutation10
Name10
Martin10
1970-01-010
Street 10
000010
City10
Country10
++49000000010
++4917000000010
Somestreet 10
101010101010
SomeCity10
Germany
++491000000010
++491000000010
1000010
SomeContract10
1000101
SomeContract101
10001010
SomeContract1010
10000103
SomeContract103
SOAP-WSDL-2.00.10/benchmark/person_profile.pl 0000444 0001750 0001750 00000001115 11203370730 020036 0 ustar martin martin use lib '../lib';
use lib '../example/lib';
use lib '../../SOAP-WSDL_XS/blib/lib';
use lib '../../SOAP-WSDL_XS/blib/arch';
use strict;
# use Benchmark;
use SOAP::WSDL::Deserializer::XSD_XS;
use SOAP::WSDL::Factory::Deserializer;
# # register for SOAP 1.1
SOAP::WSDL::Factory::Deserializer->register('1.1' => 'SOAP::WSDL::Deserializer::XSD_XS' );
use MyInterfaces::TestService::TestPort;
my $soap = MyInterfaces::TestService::TestPort->new();
# Load all classes - XML::Compile has created everything before, too
if (@ARGV) { print $soap->ListPerson({}) }
else {
$soap->ListPerson({})
}
SOAP-WSDL-2.00.10/benchmark/01_expat.t 0000444 0001750 0001750 00000013670 11203370730 016272 0 ustar martin martin #!/usr/bin/perl -w
use strict;
use warnings;
use lib '../lib';
use lib '../../Class-Std-Fast/lib';
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/lib';
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/arch';
use lib '../t/lib';
# use SOAP::WSDL::SAX::MessageHandler;
use Benchmark qw(cmpthese timethese);
use SOAP::WSDL::Expat::MessageParser;
use SOAP::WSDL::Expat::Message2Hash;
use SOAP::WSDL::Expat::MessageParser_XS;
use SOAP::Lite;
use XML::Simple;
use XML::LibXML;
use MyComplexType;
use MyElement;
use MySimpleType;
my $xml = q{
Test2
Test3
Test4
Test5
Test6
Test7
Test8
Test9
Test10
Test11
Test12
Test13
Test55
Test14
Test15
Test16
Test17
Test18
Test19
Test20
Test21
Test22
Test23
Test24
Test25
Test565
Test27
Test28
Test29
Test30
Test31
Test32
Test33
Test34
Test35
Test36
Test37
Test38
Test55
};
my $parser = SOAP::WSDL::Expat::MessageParser->new({
class_resolver => 'FakeResolver'
});
my $hash_parser = SOAP::WSDL::Expat::Message2Hash->new();
$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
print "xml length: ${ \length $xml } bytes\n";
my $libxml = XML::LibXML->new();
$libxml->keep_blanks(0);
my @data;
my $deserializer = SOAP::Deserializer->new();
my $parser_xs = SOAP::WSDL::Expat::MessageParser_XS->new({
class_resolver => 'FakeResolver'
});
sub libxml_test {
my $dom = $libxml->parse_string( $xml );
push @data, dom2hash( $dom->firstChild );
};
sub dom2hash {
for ($_[0]->childNodes) {
if (exists $_[1]->{ $_->nodeName }) {
if (ref $_[1]->{ $_->nodeName } eq 'ARRAY') {
if ($_->nodeName eq '#text') {
push @{ $_[1] } ,$_->textContent;
}
else {
push @{ $_[1]->{ $_->nodeName } }, dom2hash( $_, {} );
}
}
else {
if ($_->nodeName eq '#text') {
$_[1] = [ $_[1], $_->textContent() ];
}
else {
$_[1]->{ $_->nodeName } = [ $_[1]->{ $_->nodeName } ,
dom2hash( $_, {} ) ];
}
}
}
else {
if ($_->nodeName eq '#text') {
$_[1] = $_->textContent();
}
else {
$_[1]->{ $_->nodeName } = dom2hash( $_, {} );
}
}
}
return $_[1];
}
cmpthese 5000,
{
'SOAP::WSDL (Hash)' => sub { push @data, $hash_parser->parse( $xml ) },
'SOAP::WSDL (XSD)' => sub { push @data, $parser->parse( $xml ) },
'SOAP::WSDL_XS (XSD)' => sub { push @data, $parser_xs->parse_string( $xml ) },
'XML::Simple (Hash)' => sub { push @data, XMLin $xml },
'XML::LibXML (DOM)' => sub { push @data, $libxml->parse_string( $xml ) },
'XML::LibXML (Hash)' => \&libxml_test,
'SOAP::Lite' => sub { push @data, $deserializer->deserialize( $xml ) },
};
# data classes reside in t/lib/Typelib/
BEGIN {
package FakeResolver;
{
my %class_list = (
'MyAtomicComplexTypeElement' => 'MyAtomicComplexTypeElement',
'MyAtomicComplexTypeElement/test' => 'MyAtomicComplexTypeElement',
'MyAtomicComplexTypeElement/test/test2' => 'MyTestElement2',
);
sub get_typemap { return \%class_list; };
sub get_map { return \%class_list };
sub new { return bless {}, 'FakeResolver' };
sub get_class {
my $name = join('/', @{ $_[1] });
return ($class_list{ $name }) ? $class_list{ $name }
: warn "no class found for $name";
};
};
};
__END__
Output on my machine:
xml length: 641 bytes
Rate SOAP::Lite XML::Simple (Hash) SOAP::WSDL (XSD) XML::LibXML (Hash) SOAP::WSDL (Hash) SOAP::WSDL_XS (XSD) XML::LibXML (DOM)
SOAP::Lite 446/s -- -54% -72% -73% -80% -95% -96%
XML::Simple (Hash) 963/s 116% -- -39% -41% -57% -89% -91%
SOAP::WSDL (XSD) 1587/s 256% 65% -- -3% -29% -81% -86%
XML::LibXML (Hash) 1629/s 265% 69% 3% -- -27% -81% -85%
SOAP::WSDL (Hash) 2222/s 398% 131% 40% 36% -- -74% -80%
SOAP::WSDL_XS (XSD) 8475/s 1798% 780% 434% 420% 281% -- -24%
XML::LibXML (DOM) 11111/s 2389% 1053% 600% 582% 400% 31% --
SOAP-WSDL-2.00.10/benchmark/hello.pl 0000444 0001750 0001750 00000004614 11203370730 016122 0 ustar martin martin #!/usr/bin/perl -w
use strict;
use warnings;
use diagnostics;
use lib '../example/lib';
use lib '../../SOAP-Lite-0.71/lib';
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/lib';
use lib '/home/martin/workspace/SOAP-WSDL_XS/blib/arch';
use Data::Dumper;
use SOAP::Lite;
use XML::Compile::SOAP11;
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;
use MyInterfaces::HelloWorld::HelloWorldSoap;
#use SOAP::WSDL::Deserializer::XSD_XS;
use Benchmark qw(cmpthese timethese);
use SOAP::WSDL::Transport::HTTP;
use SOAP::WSDL::Factory::Transport;
SOAP::WSDL::Factory::Transport->register('http', 'SOAP::WSDL::Transport::HTTP');
my $proxy = 'http://localhost:81/soap-wsdl-test/helloworld.pl';
#my $proxy = 'http://localhost:81/soap-wsdl-test/helloworld';
my $lite = SOAP::Lite->new(
proxy => $proxy
);
$lite->on_action( sub { "urn:HelloWorld#sayHello" });
$lite->autotype(0);
my $soap = MyInterfaces::HelloWorld::HelloWorldSoap->new({
proxy => $proxy,
});
my $soap_xs = MyInterfaces::HelloWorld::HelloWorldSoap->new({
proxy => $proxy,
});
#$soap_xs->set_deserializer( SOAP::WSDL::Deserializer::XSD_XS->new() );
my @result = ();;
sub wsdl_bench {
push @result, $soap->sayHello({
name => $ARGV[1] || '"Your name"',
givenName => $ARGV[0] || '"Your given name"',
});
}
sub wsdl_xs_bench {
push @result, $soap_xs->sayHello({
name => $ARGV[1] || '"Your name"',
givenName => $ARGV[0] || '"Your given name"',
});
}
my $wsdl = XML::Compile::WSDL11->new('../example/wsdl/11_helloworld.wsdl');
my $call = $wsdl->compileClient('sayHello',
sloppy_integers => 1,
check_values => 0,
check_values => 0,
validation => 0,
);
sub compile_bench {
push @result, $call->(
name => $ARGV[1] || '"Your name"',
givenName => $ARGV[0] || '"Your given name"',
);
}
sub lite_bench {
push @result, $lite->call(
SOAP::Data->name("sayHello")
->attr({ xmlns => 'urn:HelloWorld' }),
SOAP::Data->name('name')->value( $ARGV[1] || '"Your name"'),
SOAP::Data->name('givenName')->value( $ARGV[0] || '"Your given name"'),
);
}
# give all a chance to perform first-run initializations
compile_bench();
lite_bench();
wsdl_bench();
#wsdl_xs_bench();
timethese 150, {
'SOAP::WSDL' => \&wsdl_bench,
# 'SOAP::WSDL_XS' => \&wsdl_xs_bench,
'XML::Compile' => \&compile_bench,
'SOAP::Lite' => \&lite_bench,
};
SOAP-WSDL-2.00.10/benchmark/person_single.pl 0000444 0001750 0001750 00000026251 11203370730 017667 0 ustar martin martin use lib '../lib';
use lib '../example/lib';
use lib '../../SOAP-WSDL_XS/blib/lib';
use lib '../../SOAP-WSDL_XS/blib/arch';
use strict;
use Benchmark;
use Storable;
use SOAP::WSDL::Deserializer::XSD_XS;
use SOAP::WSDL::Factory::Deserializer;
# # register for SOAP 1.1
SOAP::WSDL::Factory::Deserializer->register('1.1' => 'SOAP::WSDL::Deserializer::XSD_XS' );
SOAP::WSDL::Factory::Transport->register('http' => 'Transport');
use MyInterfaces::TestService::TestPort;
my @data = ();
my $soap = MyInterfaces::TestService::TestPort->new();
# Load all classes - XML::Compile has created everything before, too
timethis 150, sub { $soap->ListPerson({}) };
timethis 300, sub { push @data, $soap->ListPerson({}) };
@data = ();
timethis 300, sub { push @data, $soap->ListPerson({}) };
# for (1..50) { push @data, $soap->ListPerson({}) };
#print $soap->ListPerson({});
my $result = $soap->ListPerson({});
timethis 30 , sub {
my $frozen = Storable::freeze( $result );
my $thawed = Storable::thaw($frozen);
};
# print $thawed;
package Transport;
use Class::Std::Fast;
sub send_receive {
return <<'EOT';
1Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract31Salutation0Name0Martin1970-01-01Street 000000City0Country0++499131123456++49150123456Somestreet 2312345SomeCityGermany++499131123456++49150123456100000SomeContract0100001SomeContract1100002SomeContract2100003SomeContract3};
EOT
}
SOAP-WSDL-2.00.10/benchmark/README 0000444 0001750 0001750 00000005602 11203370730 015340 0 ustar martin martin The benchmark directory includes a bunch of benchmarks. The most notable
ones are listed below.
Comparison benchmarks for SOAP::Lite, SOAP::WSDL, SOAP::WSDL_XS, and
XML::Compile::WSDP need all of these installed for the benchmark to
work (building and adding to the lib path suffices). All comparison benchmarks
only account for the client part of the respective modules - the server part
is not benchmarked.
SOAP::WSDL_XS can be obtained from the project's subversion repository at
https://soap-wsdl.svn.sourceforge.net/svnroot/SOAP-WSDL/SOAP-WSDL_XS/trunk
Some benchmarks expect to find the SOAP servers "cgi-bin/person.pl" and
"cgi-bin/hello.pl" from the examples directory at
http://localhost:81/soap-wsdl-test/person.pl and
http://localhost:81/soap-wsdl-test/hello.pl
If the web services are not set up properly, you're benchmarking error
creation times.
To set up a SOAP server using apache, add the following to your apache config:
# usually in main config
Listen 127.0.0.1:81
# maybe in a
# container
#
ScriptAlias /soap-wsdl-test/ /PATH_TO/SOAP-WSDL/example/cgi-bin/
AllowOverride None
Order allow,deny
Allow from all
Using mod_perl is highly recommended to cut down benchmarking time.
COMPARISON BENCHMARKS
=====================
01_expat.t
----------
Benchmarks XML parsing speed between XML::Simple with XML::Parser as backend,
SOAP::Lite, SOAP::WSDL outputting objects, SOAP::WSDL outputting hash refs,
XML::LibXML with a simple DOM walker outputting hash refs, XML::LibXML
outputting the DOM and SOAP::WSDL_XS.
No web server required.
This benchmark sheds light on how much performance is - in theory - reachable
by each approach: The XML::LibXML (Hash) benchmark converts the DOM into
a nested hash using a recursive function. This is - basically - how
XML::Compile works. XML::Simple uses XML::Parser's streaming
API. SOAP::WSDL uses XML::Parser::Expat, XML::Parser's low-level backend,
to create objects or - in the (Hash) variant - nested hashes similar to
those created by XML::Simple.
SOAP::WSDL_XS uses a libexpat-based XS parser to create perl objects, and
XML::LibXML (DOM) creates a C level libxml2 DOM accessible from perl.
person.pl:
----------
Sends a empty requests and receives a response of ca. 10kB.
Modeled after a common enterprise setup: "Give me a list of person data sets".
For this benchmark, XML parsing speed is important. XML generation speed is
only weighted in the last two runs, and weights around 1/10 of parsing speed.
hello.pl:
---------
Sends a request containing name and given name and politely replies
"Hello ".
An example for very short requests and responses.
For this example, handling and generating small requests/responses, and
transport speed is important. As the XML transmitted is relatively small, the
transport layer's overhead is important.
SOAP-WSDL-2.00.10/MANIFEST 0000444 0001750 0001750 00000043770 11203370730 013667 0 ustar martin martin benchmark/01_expat.t
benchmark/hello.pl
benchmark/MEMORY_FOOTPRINT
benchmark/person.pl
benchmark/person.xml
benchmark/person_profile.pl
benchmark/person_single.pl
benchmark/README
benchmark/XSD/01_anyType.t
benchmark/XSD/02_anySimpleType.t
benchmark/XSD/03_string.t
benchmark/XSD/strftime.pl
bin/wsdl2perl.pl
Build.PL
Changes
example/cgi-bin/helloworld.pl
example/cgi-bin/person.pl
example/fortune.pl
example/genericbarcode.pl
example/hello.pl
example/hello_compile.pl
example/hello_lite.pl
example/java/cxf/.classpath
example/java/cxf/.settings/org.eclipse.jdt.core.prefs
example/java/cxf/.settings/org.maven.ide.eclipse.prefs
example/java/cxf/11_helloworld.wsdl
example/java/cxf/jax-binding.xml
example/java/cxf/pom.xml
example/java/cxf/README
example/java/cxf/src/main/resources/cxf.xml
example/java/cxf/src/test/java/helloworld/HelloWorldTest.java
example/java/cxf/src/test/resources/test-context.xml
example/lib/MyElements/CountCookies.pm
example/lib/MyElements/CountCookiesResponse.pm
example/lib/MyElements/GenerateBarCode.pm
example/lib/MyElements/GenerateBarCodeResponse.pm
example/lib/MyElements/GetCitiesByCountry.pm
example/lib/MyElements/GetCitiesByCountryResponse.pm
example/lib/MyElements/GetFortuneCookie.pm
example/lib/MyElements/GetFortuneCookieResponse.pm
example/lib/MyElements/GetSpecificCookie.pm
example/lib/MyElements/GetSpecificCookieResponse.pm
example/lib/MyElements/GetWeather.pm
example/lib/MyElements/GetWeatherResponse.pm
example/lib/MyElements/int.pm
example/lib/MyElements/ListPerson.pm
example/lib/MyElements/ListPersonResponse.pm
example/lib/MyElements/readNodeCount.pm
example/lib/MyElements/readNodeCountResponse.pm
example/lib/MyElements/sayHello.pm
example/lib/MyElements/sayHelloResponse.pm
example/lib/MyElements/string.pm
example/lib/MyInterfaces/BarCode/BarCodeSoap.pm
example/lib/MyInterfaces/FullerData_x0020_Fortune_x0020_Cookie/FullerData_x0020_Fortune_x0020_CookieSoap.pm
example/lib/MyInterfaces/GlobalWeather/GlobalWeatherSoap.pm
example/lib/MyInterfaces/HelloWorld/HelloWorldSoap.pm
example/lib/MyInterfaces/TestService/TestPort.pm
example/lib/MyServer/HelloWorld/HelloWorldSoap.pm
example/lib/MyServer/TestService/TestPort.pm
example/lib/MyTypemaps/BarCode.pm
example/lib/MyTypemaps/FullerData_x0020_Fortune_x0020_Cookie.pm
example/lib/MyTypemaps/GlobalWeather.pm
example/lib/MyTypemaps/HelloWorld.pm
example/lib/MyTypemaps/TestService.pm
example/lib/MyTypes/Address.pm
example/lib/MyTypes/ArrayOfContract.pm
example/lib/MyTypes/ArrayOfPerson.pm
example/lib/MyTypes/BarCodeData.pm
example/lib/MyTypes/BarcodeOption.pm
example/lib/MyTypes/BarcodeType.pm
example/lib/MyTypes/CheckSumMethod.pm
example/lib/MyTypes/Contract.pm
example/lib/MyTypes/ImageFormats.pm
example/lib/MyTypes/Person.pm
example/lib/MyTypes/PersonID.pm
example/lib/MyTypes/PhoneNumber.pm
example/lib/MyTypes/ShowTextPosition.pm
example/lib/MyTypes/test2.pm
example/lib/MyTypes/testExtended.pm
example/person.pl
example/person_compile.pl
example/server/hello_simple.pl
example/visitor/visitor.pl
example/weather.pl
example/weather_wsdl.pl
example/wsdl/11_helloworld.wsdl
example/wsdl/FortuneCookie.xml
example/wsdl/genericbarcode.xml
example/wsdl/globalweather.xml
example/wsdl/Person.wsdl
example/wsdl/person.xml
HACKING
lib/SOAP/WSDL.pm
lib/SOAP/WSDL/Base.pm
lib/SOAP/WSDL/Binding.pm
lib/SOAP/WSDL/Client.pm
lib/SOAP/WSDL/Client/Base.pm
lib/SOAP/WSDL/Definitions.pm
lib/SOAP/WSDL/Deserializer/Hash.pm
lib/SOAP/WSDL/Deserializer/SOM.pm
lib/SOAP/WSDL/Deserializer/XSD.pm
lib/SOAP/WSDL/Expat/Base.pm
lib/SOAP/WSDL/Expat/Message2Hash.pm
lib/SOAP/WSDL/Expat/MessageParser.pm
lib/SOAP/WSDL/Expat/MessageStreamParser.pm
lib/SOAP/WSDL/Expat/WSDLParser.pm
lib/SOAP/WSDL/Factory/Deserializer.pm
lib/SOAP/WSDL/Factory/Generator.pm
lib/SOAP/WSDL/Factory/Serializer.pm
lib/SOAP/WSDL/Factory/Transport.pm
lib/SOAP/WSDL/Generator/Iterator/WSDL11.pm
lib/SOAP/WSDL/Generator/PrefixResolver.pm
lib/SOAP/WSDL/Generator/Template.pm
lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm
lib/SOAP/WSDL/Generator/Template/XSD.pm
lib/SOAP/WSDL/Generator/Template/XSD/attribute.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/all.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/atomicTypes.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/attributeSet.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/complexContent.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/contentModel.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/extension.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/all.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/attributeSet.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/choice.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/complexContent.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/content_model.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/restriction.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/simpleContent.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/simpleContent/extension.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/simpleContent/restriction.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/structure.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/structure/restriction.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/POD/structure/simpleContent.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/restriction.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/simpleContent.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/simpleContent/extension.tt
lib/SOAP/WSDL/Generator/Template/XSD/complexType/variety.tt
lib/SOAP/WSDL/Generator/Template/XSD/element.tt
lib/SOAP/WSDL/Generator/Template/XSD/element/POD/contentModel.tt
lib/SOAP/WSDL/Generator/Template/XSD/element/POD/structure.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Body.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Header.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/Operation.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Element.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Message.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/method_info.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Operation.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Part.tt
lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Type.tt
lib/SOAP/WSDL/Generator/Template/XSD/POD/annotation.tt
lib/SOAP/WSDL/Generator/Template/XSD/Server.tt
lib/SOAP/WSDL/Generator/Template/XSD/Server/POD/Message.tt
lib/SOAP/WSDL/Generator/Template/XSD/Server/POD/method_info.tt
lib/SOAP/WSDL/Generator/Template/XSD/Server/POD/Operation.tt
lib/SOAP/WSDL/Generator/Template/XSD/Server/POD/OutPart.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/atomicType.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/contentModel.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/list.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/contentModel.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/list.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/restriction.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/structure.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/POD/union.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/restriction.tt
lib/SOAP/WSDL/Generator/Template/XSD/simpleType/union.tt
lib/SOAP/WSDL/Generator/Template/XSD/Typemap.tt
lib/SOAP/WSDL/Generator/Visitor.pm
lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
lib/SOAP/WSDL/Manual.pod
lib/SOAP/WSDL/Manual/CodeFirst.pod
lib/SOAP/WSDL/Manual/Cookbook.pod
lib/SOAP/WSDL/Manual/Deserializer.pod
lib/SOAP/WSDL/Manual/FAQ.pod
lib/SOAP/WSDL/Manual/Glossary.pod
lib/SOAP/WSDL/Manual/Parser.pod
lib/SOAP/WSDL/Manual/Serializer.pod
lib/SOAP/WSDL/Manual/WS_I.pod
lib/SOAP/WSDL/Manual/XSD.pod
lib/SOAP/WSDL/Message.pm
lib/SOAP/WSDL/Operation.pm
lib/SOAP/WSDL/OpMessage.pm
lib/SOAP/WSDL/Part.pm
lib/SOAP/WSDL/Port.pm
lib/SOAP/WSDL/PortType.pm
lib/SOAP/WSDL/Serializer/XSD.pm
lib/SOAP/WSDL/Server.pm
lib/SOAP/WSDL/Server/CGI.pm
lib/SOAP/WSDL/Server/Mod_Perl2.pm
lib/SOAP/WSDL/Server/Simple.pm
lib/SOAP/WSDL/Service.pm
lib/SOAP/WSDL/SOAP/Address.pm
lib/SOAP/WSDL/SOAP/Body.pm
lib/SOAP/WSDL/SOAP/Header.pm
lib/SOAP/WSDL/SOAP/HeaderFault.pm
lib/SOAP/WSDL/SOAP/Operation.pm
lib/SOAP/WSDL/SOAP/Typelib/Fault.pm
lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
lib/SOAP/WSDL/Transport/HTTP.pm
lib/SOAP/WSDL/Transport/Loopback.pm
lib/SOAP/WSDL/Transport/Test.pm
lib/SOAP/WSDL/TypeLookup.pm
lib/SOAP/WSDL/Types.pm
lib/SOAP/WSDL/XSD/Annotation.pm
lib/SOAP/WSDL/XSD/Attribute.pm
lib/SOAP/WSDL/XSD/AttributeGroup.pm
lib/SOAP/WSDL/XSD/Builtin.pm
lib/SOAP/WSDL/XSD/ComplexType.pm
lib/SOAP/WSDL/XSD/Element.pm
lib/SOAP/WSDL/XSD/Enumeration.pm
lib/SOAP/WSDL/XSD/FractionDigits.pm
lib/SOAP/WSDL/XSD/Group.pm
lib/SOAP/WSDL/XSD/Length.pm
lib/SOAP/WSDL/XSD/MaxExclusive.pm
lib/SOAP/WSDL/XSD/MaxInclusive.pm
lib/SOAP/WSDL/XSD/MaxLength.pm
lib/SOAP/WSDL/XSD/MinExclusive.pm
lib/SOAP/WSDL/XSD/MinInclusive.pm
lib/SOAP/WSDL/XSD/MinLength.pm
lib/SOAP/WSDL/XSD/Pattern.pm
lib/SOAP/WSDL/XSD/Schema.pm
lib/SOAP/WSDL/XSD/Schema/Builtin.pm
lib/SOAP/WSDL/XSD/SimpleType.pm
lib/SOAP/WSDL/XSD/TotalDigits.pm
lib/SOAP/WSDL/XSD/Typelib/Attribute.pm
lib/SOAP/WSDL/XSD/Typelib/AttributeSet.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
lib/SOAP/WSDL/XSD/Typelib/Element.pm
lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
lib/SOAP/WSDL/XSD/WhiteSpace.pm
LICENSE
Makefile.PL
MANIFEST This list of files
META.yml
MIGRATING
README
t/002_parse_wsdl.t
t/003_wsdl_based_serializer.t
t/006_client.t
t/008_client_wsdl_complexType.t
t/009_data_classes.t
t/011_simpleType.t
t/012_element.t
t/013_complexType.t
t/016_client_object.t
t/094_cpan_meta.t
t/095_copying.t
t/096_characters.t
t/097_kwalitee.t
t/098_pod.t
t/099_pod_coverage.t
t/acceptance/results/03_complexType-all.xml
t/acceptance/results/03_complexType-sequence.xml
t/acceptance/results/04_element-simpleType.xml
t/acceptance/results/04_element.xml
t/acceptance/results/05_simpleType-list.xml
t/acceptance/results/05_simpleType-restriction.xml
t/acceptance/results/05_simpleType-union.xml
t/acceptance/results/11_helloworld.xml
t/acceptance/wsdl/006_sax_client.wsdl
t/acceptance/wsdl/008_complexType.wsdl
t/acceptance/wsdl/02_port.wsdl
t/acceptance/wsdl/03_complexType-all.wsdl
t/acceptance/wsdl/03_complexType-element-ref.wsdl
t/acceptance/wsdl/03_complexType-sequence.wsdl
t/acceptance/wsdl/04_element-simpleType.wsdl
t/acceptance/wsdl/04_element.wsdl
t/acceptance/wsdl/05_simpleType-list.wsdl
t/acceptance/wsdl/05_simpleType-restriction.wsdl
t/acceptance/wsdl/05_simpleType-union.wsdl
t/acceptance/wsdl/10_helloworld.asmx.xml
t/acceptance/wsdl/11_helloworld.wsdl
t/acceptance/wsdl/elementAtomicComplexType.xml
t/acceptance/wsdl/email_account.wsdl
t/acceptance/wsdl/generator_test.wsdl
t/acceptance/wsdl/generator_test_dot_names.wsdl
t/acceptance/wsdl/generator_unsupported_test.wsdl
t/acceptance/wsdl/helloWorld_header.wsdl
t/acceptance/wsdl/import.xsd
t/acceptance/wsdl/import_loop.xsd
t/acceptance/wsdl/message_gateway.wsdl
t/acceptance/wsdl/nested_complextype.wsdl
t/acceptance/wsdl/WSDLParser-import.wsdl
t/acceptance/wsdl/WSDLParser-imported.wsdl
t/acceptance/wsdl/WSDLParser.wsdl
t/acceptance/wsdl/WSDLParser/import_cascade.xsd
t/acceptance/wsdl/WSDLParser/import_no_location.wsdl
t/acceptance/wsdl/WSDLParser/import_xsd_cascade.wsdl
t/acceptance/wsdl/WSDLParser/imported.xsd
t/acceptance/wsdl/WSDLParser/xsd_import_no_location.wsdl
t/acceptance/wsdl/WSDLParser_import_loop.wsdl
t/CodeFirst/ComplexType.pm
t/CodeFirst/element.pm
t/CodeFirst/sequence.pm
t/CodeFirst/test.pl
t/contributed.wsdl
t/lib/CodeFirst.pm
t/lib/Mod_Perl2Test.pm
t/lib/MyComplexType.pm
t/lib/MyElement.pm
t/lib/MySimpleElement.pm
t/lib/MySimpleType.pm
t/lib/Test/SOAP/WSDL/Expat/WSDLParser.pm
t/lib/Test/SOAP/WSDL/Generator/Iterator/WSDL11.pm
t/lib/Test/SOAP/WSDL/Generator/Visitor/Typemap.pm
t/lib/Test/SOAP/WSDL/Tester.pm
t/lib/Typelib/Base.pm
t/lib/Typelib/TEnqueueMessage.pm
t/lib/Typelib/TMessage.pm
t/SOAP/WSDL.t
t/SOAP/WSDL/02_port.t
t/SOAP/WSDL/03_complexType-all.t
t/SOAP/WSDL/03_complexType-choice.t
t/SOAP/WSDL/03_complexType-complexContent.t
t/SOAP/WSDL/03_complexType-element-ref.t
t/SOAP/WSDL/03_complexType-group.t
t/SOAP/WSDL/03_complexType-sequence.t
t/SOAP/WSDL/03_complexType-simpleContent.t
t/SOAP/WSDL/04_element-complexType.t
t/SOAP/WSDL/04_element-simpleType.t
t/SOAP/WSDL/04_element.t
t/SOAP/WSDL/05_simpleType-list.t
t/SOAP/WSDL/05_simpleType-restriction.t
t/SOAP/WSDL/05_simpleType-union.t
t/SOAP/WSDL/06_keep_alive.t
t/SOAP/WSDL/11_helloworld.NET.t
t/SOAP/WSDL/12_binding.t
t/SOAP/WSDL/Base.t
t/SOAP/WSDL/Client.t
t/SOAP/WSDL/Client/Base.t
t/SOAP/WSDL/Definitions.t
t/SOAP/WSDL/Deserializer/Hash.t
t/SOAP/WSDL/Deserializer/SOM.t
t/SOAP/WSDL/Deserializer/XSD.t
t/SOAP/WSDL/Expat/Base.t
t/SOAP/WSDL/Expat/MessageParser.t
t/SOAP/WSDL/Expat/WSDLParser.t
t/SOAP/WSDL/Factory/Deserializer.t
t/SOAP/WSDL/Factory/Serializer.t
t/SOAP/WSDL/Factory/Transport.t
t/SOAP/WSDL/Generator/Template.t
t/SOAP/WSDL/Generator/Template/XSD/Import.t
t/SOAP/WSDL/Generator/Template/XSD/Unqualified.t
t/SOAP/WSDL/Generator/Visitor.t
t/SOAP/WSDL/Generator/Visitor/Typemap.t
t/SOAP/WSDL/Generator/XSD.t
t/SOAP/WSDL/Generator/XSD_custom_resolver.t
t/SOAP/WSDL/Generator/XSD_dot_names.t
t/SOAP/WSDL/Generator/XSD_nested_complextype.t
t/SOAP/WSDL/Generator/XSD_unsupported.t
t/SOAP/WSDL/Part.t
t/SOAP/WSDL/PortType.t
t/SOAP/WSDL/Serializer/XSD.t
t/SOAP/WSDL/Server.t
t/SOAP/WSDL/Server/CGI.t
t/SOAP/WSDL/Server/Mod_Perl2.t
t/SOAP/WSDL/Server/Simple.t
t/SOAP/WSDL/Transport/01_Test.t
t/SOAP/WSDL/Transport/acceptance/test2.xml
t/SOAP/WSDL/Transport/acceptance/test3.xml
t/SOAP/WSDL/Transport/HTTP.t
t/SOAP/WSDL/Typelib/Fault11.t
t/SOAP/WSDL/Types.t
t/SOAP/WSDL/XSD/Attribute.t
t/SOAP/WSDL/XSD/AttributeGroup.t
t/SOAP/WSDL/XSD/Builtin.t
t/SOAP/WSDL/XSD/ComplexType.t
t/SOAP/WSDL/XSD/Element.t
t/SOAP/WSDL/XSD/Enumeration.t
t/SOAP/WSDL/XSD/Schema.t
t/SOAP/WSDL/XSD/SimpleType.t
t/SOAP/WSDL/XSD/Typelib/Attribute.t
t/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.t
t/SOAP/WSDL/XSD/Typelib/Builtin/anyType.t
t/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.t
t/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.t
t/SOAP/WSDL/XSD/Typelib/Builtin/boolean.t
t/SOAP/WSDL/XSD/Typelib/Builtin/byte.t
t/SOAP/WSDL/XSD/Typelib/Builtin/date.t
t/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.t
t/SOAP/WSDL/XSD/Typelib/Builtin/decimal.t
t/SOAP/WSDL/XSD/Typelib/Builtin/double.t
t/SOAP/WSDL/XSD/Typelib/Builtin/duration.t
t/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.t
t/SOAP/WSDL/XSD/Typelib/Builtin/float.t
t/SOAP/WSDL/XSD/Typelib/Builtin/gDay.t
t/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.t
t/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.t
t/SOAP/WSDL/XSD/Typelib/Builtin/gYear.t
t/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.t
t/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.t
t/SOAP/WSDL/XSD/Typelib/Builtin/ID.t
t/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.t
t/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.t
t/SOAP/WSDL/XSD/Typelib/Builtin/int.t
t/SOAP/WSDL/XSD/Typelib/Builtin/integer.t
t/SOAP/WSDL/XSD/Typelib/Builtin/language.t
t/SOAP/WSDL/XSD/Typelib/Builtin/list.t
t/SOAP/WSDL/XSD/Typelib/Builtin/long.t
t/SOAP/WSDL/XSD/Typelib/Builtin/Name.t
t/SOAP/WSDL/XSD/Typelib/Builtin/NCName.t
t/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.t
t/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.t
t/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.t
t/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.t
t/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.t
t/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.t
t/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.t
t/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.t
t/SOAP/WSDL/XSD/Typelib/Builtin/QName.t
t/SOAP/WSDL/XSD/Typelib/Builtin/short.t
t/SOAP/WSDL/XSD/Typelib/Builtin/string.t
t/SOAP/WSDL/XSD/Typelib/Builtin/time.t
t/SOAP/WSDL/XSD/Typelib/Builtin/token.t
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.t
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.t
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.t
t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.t
t/SOAP/WSDL/XSD/Typelib/ComplexType.t
t/SOAP/WSDL/XSD/Typelib/Element.t
t/SOAP/WSDL_1.wsdl
t/SOAP/WSDL_EMPTY_DEFINITIONS.wsdl
t/SOAP/WSDL_NO_BINDING.wsdl
t/SOAP/WSDL_NO_MESSAGE.wsdl
t/SOAP/WSDL_NO_PORTTYPE.wsdl
t/test.wsdl
TEST_COVERAGE
test_html.pl
TODO
SOAP-WSDL-2.00.10/Build.PL 0000444 0001750 0001750 00000003741 11203370730 014024 0 ustar martin martin use Module::Build;
use version;
$build = Module::Build->new(
dist_author => 'Martin Kutter ',
create_makefile_pl => 'small',
dist_abstract => 'SOAP with WSDL support',
dist_name => 'SOAP-WSDL',
dist_version => '2.00.10',
module_name => 'SOAP::WSDL',
license => 'artistic',
requires => {
# 5.6.x is way too buggy and has no unicode support
# for us. SOAP-WSDL relies on unicode (WS-I demands it)
# and triggers several 5.6 bugs...
'perl' => q(5.8.0),
'Class::Std::Fast' => q(0.0.5),
'Data::Dumper' => 0,
'Date::Parse' => 0,
'Date::Format' => 0,
'File::Basename' => 0,
'File::Path' => 0,
'Getopt::Long' => 0,
'List::Util' => 0,
'LWP::UserAgent' => 0,
'Template' => q(2.18),
'Term::ReadKey' => 0,
'URI' => 0,
'XML::Parser::Expat' => 0,
},
build_requires => {
'Class::Std::Fast' => q(0.0.5),
'Cwd' => 0,
'Date::Parse' => 0,
'Date::Format' => 0,
'Getopt::Long' => 0,
'List::Util' => 0,
'LWP::UserAgent' => 0,
'Module::Build' => 0,
'File::Basename' => 0,
'File::Path' => 0,
'File::Spec' => 0,
'Storable' => 0,
'Test::More' => 0,
'Template' => q(2.18),
'XML::Parser::Expat' => 0,
},
recursive_test_files => 1,
meta_add => {
no_index => {
directory => 'lib/SOAP/WSDL/Generator/Template/XSD/',
},
}
);
$build->add_build_element('tt');
$build->create_build_script;
SOAP-WSDL-2.00.10/TODO 0000444 0001750 0001750 00000000577 11203370730 013224 0 ustar martin martin TODO list for SOAP::WSDL
2.1 release
--------
* Support namespaces in SOAP message payload [ 1809057 ]
* Support the xsi:type attribute on derived types on the wire [ 1809059 ]
* SOAP1.2 support [ 1803331 ]
2.2 release
--------
* XML schema support ("minimal conformant") [ 1764845 ]
* Support SOAP attachments
3.0 release
--------
We're not thinking that far ahead right now.
SOAP-WSDL-2.00.10/MIGRATING 0000444 0001750 0001750 00000005007 11203370730 013771 0 ustar martin martin MIGRATING
---------
MIGRATING FROM PRE-2.00_33
--------------------------
The handling of stringification of SOAP::WSDL::XSD simpleType objects with
undef values changed in 2.00_33.
While 2.00_32 and before returned undef on stringification of a undef value,
>=2.00_33 now returns an empty string.
This is due to common usage in templates or the like, where undef is likely
to produce a warning, and the unreliable behavior of
$obj eq undef
which behaves differently in different versions of perl.
MIGRATING FROM PRE-2.00_29
--------------------------
SOAP::WSDL 2.00_29 added experimental XML attribute support. The attribute
support changed the code of the generated classes, which may now
require the class SOAP::WSDL::XSD::Typelib::Attribute introduced in the same
pre-release.
While interfaces generated with pre-releases back to 2.00_25 work without
change, this does not hold true vice versa: Interfaces generated with
2.00_29 and above won't work with older pre-releases.
You'll have to update SOAP::WSDL on all your machines.
MIGRATING FROM PRE-2.00_24
--------------------------
This section describes how to migrate from 2.00_24 and before versions to
2.00_25.
Migrating from 2.00_xx
----------------------
Background
SOAP::WSDL 2.00_xx has used Class::Std as base for its inside out objects
up to 2.00_24. For performance reasons, now Class::Std::Fast is used.
As Class::Std::Fast is a drop-in replacement for Class::Std, there should be
no need to change anything in your (handwritten) code.
Generated interfaces
SOAP::WSDL's internal structure has changed, and this change needs to
be reflected in all generated classes.
This means you have to re-generate your interfaces (in case you use generated
interfaces)
Typemaps
SOAP::WSDL now tries to load all typemap classes at once from 2.00_25 on.
If you use __SKIP__ in your typemaps, you'll have to comment out all
paths deeper than the path marked with __SKIP__ - if you don't, SOAP::WSDL
will try to load all correspondent classes.
Migrating from 1.xx
-------------------
Background
SOAP::WSDL uses a custom WSDL parser and serializer. It does not rely on XPath
for on the fly WSDL processing, nor does it use SOAP::Data objects for
encoding any more.
You should be able to use your existing code under most circumstances.
SOAP::WSDL is the compatibility module for old interfaces.
Overloading
Message overloading (as introduced in 1.23) is not supported any more.
Message overloading is prohibited by the WS-I basic profile, therefore
SOAP::WSDL does not implement it any more. SOAP-WSDL-2.00.10/HACKING 0000444 0001750 0001750 00000011425 11203370730 013515 0 ustar martin martin HACKING
=======
Development of SOAP::WSDL takes place on sourceforge.net.
There's a svn repository available at
https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl
Engagement in the further development of this module is highly encouraged -
many people have already contributed, and many more probably will.
I'm sometimes a bit slow in answering e-mails or merging in changes -
so if you feel your changes are urgent, please set up a sourceforge account
and ask me for commit permissions on the repository - I will happily accept
you as co-author.
TODO shows the current roadmap.
SOAP-WSDL CODING GUIDELINES
===========================
DESIGN PRINCIPLES
-----------------
SOAP-WSDL is designed for the following principles:
1. SPEED
A SOAP toolkit is useless, if it's not fast enough. Therefore SOAP::WSDL aims
at always being fast enough.
Please benchmark any contributions - if they slow down SOAP-WSDL (especially
the XML parsing part), you should have good reasons.
2. USABILITY
SOAP-WSDL is designed user-friendly. It tells the user whether it's
capable of handling some WSDL or not, it gives friendly error messages, and
if a user happens to call a non-existant method on XSD objects, they croak
with a list of available methods to ease development.
3. EXTENSIBILITY
If you plan an extension, look if the extension itself should be extensible,
and which extension points to use.
Creating new extension points is highly appreciated.
4. MAINTAINABILITY
SOAP::Lite unfortunately shows where a toolkit can go without focus on
maintainability. SOAP::WSDL tries to be highly maintainable and easy to
understand.
CODING STYLE
------------
The principles above dictate a clear, but not too lengthy coding style.
SOAP::WSDL's coding style in principle follows Perl Best Practices by
Damian Conway, but allows deviances for speed reasons
The following guidelines apply:
- Testing
* SOAP::WSDL has a test coverage of >95% and aims at 100%. Please write
a test first.
* Use author tests for testing guidelines. Disable author tests for
users - it's time consuming and of no use to have users run author tests.
- Indentation and formatting
* indent with spaces.
* indent 4 characters per level
* use \n (LF) for newlines, not CRLF
* use blank lines to separate paragraphs
* Coding style is similar to K&R (opening brace on last line, closing
brace on new line. No cuddled else)
* No trailing spaces allowed (except to indicate a blank line in a POD
source block)
- Flow control
* postfix if is allowed for single statements only. Preferably for flow
control only.
* postfix for, while, until are not allowed.
* unless is not allowed at all. Use if not.
* goto is only allowed for jumping into subs. Nothing else.
* redo, next, last etc. are preferred over goto.
- Strictness and Warnings
* always use strict and warnings. Switch off for the smallest block
possible, but switch of if there's a reason (don't let tools like
perlcritic fool you: no strict qw(refs); is often required.
- Naming
* variable names are lower case with _ separating words, except when
a XML Schema, SOAP, or WSDL name is name-giving (don't force portType to
become port_type)
* hashes should be named FOO_of, lists FOO_from, references FOO_ref.
* package names are CamelCase, except when a XML, SOAP or WSDL name is
name-giving (don't force 'int' to become 'Int'. However, simpleType
becomes SimpleType).
- Subroutines
* Subroutines shouldn't be more than around 50 lines long
* @_ should be unpacked. Deviances are allowed for speed reasons. If
you're not unpacking @_ in a sub of say, 5 lines or more, please comment
what you're doing.
* Always return. Always return. A single "return" allows perl to execute
the subroutine in question in void context, which saves it from putting
it's result in a temporary variable. Always return.
- POD and comments
* Comment extensively. Comments are the maintainer (and core developer's)
documentation - aid them where possible (your're probably doing yourself
a favor by adding extensive comments).
* Comment either in blocks or as hanging side comments (especially when
commenting @_ access).
Example:
sub baz {
# @_ not unpacked for speed reasons. Read:
# my ($self, $something, %args_of) = @_;
$_[0]->bar($_[1]); # read as $self->bar($something);
$_[0]->foo($_[2..$#]); # read as $self->foo(%args_of);
return;
}
* POD is located at end of file, preferably after __END__
* Complete POD coverage is essential. However, if the package in question
is used internally only, it's better to omit the POD completely - too many
PODs to look at confuse the average CPAN user.
July - November 2007,
Martin Kutter SOAP-WSDL-2.00.10/META.yml 0000444 0001750 0001750 00000031727 11203370730 014006 0 ustar martin martin ---
name: SOAP-WSDL
version: 2.00.10
author:
- 'Martin Kutter '
abstract: SOAP with WSDL support
license: artistic
resources:
license: http://opensource.org/licenses/artistic-license.php
requires:
Class::Std::Fast: 0.0.5
Data::Dumper: 0
Date::Format: 0
Date::Parse: 0
File::Basename: 0
File::Path: 0
Getopt::Long: 0
LWP::UserAgent: 0
List::Util: 0
Template: 2.18
Term::ReadKey: 0
URI: 0
XML::Parser::Expat: 0
perl: 5.8.0
build_requires:
Class::Std::Fast: 0.0.5
Cwd: 0
Date::Format: 0
Date::Parse: 0
File::Basename: 0
File::Path: 0
File::Spec: 0
Getopt::Long: 0
LWP::UserAgent: 0
List::Util: 0
Module::Build: 0
Storable: 0
Template: 2.18
Test::More: 0
XML::Parser::Expat: 0
provides:
SOAP::WSDL:
file: lib/SOAP/WSDL.pm
version: 2.00.10
SOAP::WSDL::Base:
file: lib/SOAP/WSDL/Base.pm
version: 2.00.10
SOAP::WSDL::Binding:
file: lib/SOAP/WSDL/Binding.pm
version: 2.00.10
SOAP::WSDL::Client:
file: lib/SOAP/WSDL/Client.pm
version: 2.00.10
SOAP::WSDL::Client::Base:
file: lib/SOAP/WSDL/Client/Base.pm
version: 2.00.10
SOAP::WSDL::Definitions:
file: lib/SOAP/WSDL/Definitions.pm
version: 2.00.10
SOAP::WSDL::Deserializer::Hash:
file: lib/SOAP/WSDL/Deserializer/Hash.pm
version: 2.00.10
SOAP::WSDL::Deserializer::SOM:
file: lib/SOAP/WSDL/Deserializer/SOM.pm
version: 2.00.10
SOAP::WSDL::Deserializer::XSD:
file: lib/SOAP/WSDL/Deserializer/XSD.pm
version: 2.00.10
SOAP::WSDL::Expat::Base:
file: lib/SOAP/WSDL/Expat/Base.pm
version: 2.00.10
SOAP::WSDL::Expat::Message2Hash:
file: lib/SOAP/WSDL/Expat/Message2Hash.pm
version: 2.00.10
SOAP::WSDL::Expat::MessageParser:
file: lib/SOAP/WSDL/Expat/MessageParser.pm
version: 2.00.10
SOAP::WSDL::Expat::MessageStreamParser:
file: lib/SOAP/WSDL/Expat/MessageStreamParser.pm
version: 2.00.10
SOAP::WSDL::Expat::WSDLParser:
file: lib/SOAP/WSDL/Expat/WSDLParser.pm
version: 2.00.10
SOAP::WSDL::Factory::Deserializer:
file: lib/SOAP/WSDL/Factory/Deserializer.pm
version: 2.00.10
SOAP::WSDL::Factory::Generator:
file: lib/SOAP/WSDL/Factory/Generator.pm
version: 2.00.10
SOAP::WSDL::Factory::Serializer:
file: lib/SOAP/WSDL/Factory/Serializer.pm
version: 2.00.10
SOAP::WSDL::Factory::Transport:
file: lib/SOAP/WSDL/Factory/Transport.pm
version: 2.00.10
SOAP::WSDL::Generator::Iterator::WSDL11:
file: lib/SOAP/WSDL/Generator/Iterator/WSDL11.pm
version: 2.00.10
SOAP::WSDL::Generator::PrefixResolver:
file: lib/SOAP/WSDL/Generator/PrefixResolver.pm
version: 2.00.10
SOAP::WSDL::Generator::Template:
file: lib/SOAP/WSDL/Generator/Template.pm
version: 2.00.10
SOAP::WSDL::Generator::Template::Plugin::XSD:
file: lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm
version: 2.00.10
SOAP::WSDL::Generator::Template::XSD:
file: lib/SOAP/WSDL/Generator/Template/XSD.pm
version: 2.00.10
SOAP::WSDL::Generator::Visitor:
file: lib/SOAP/WSDL/Generator/Visitor.pm
version: 2.00.10
SOAP::WSDL::Generator::Visitor::Typemap:
file: lib/SOAP/WSDL/Generator/Visitor/Typemap.pm
version: 2.00.10
SOAP::WSDL::Message:
file: lib/SOAP/WSDL/Message.pm
version: 2.00.10
SOAP::WSDL::OpMessage:
file: lib/SOAP/WSDL/OpMessage.pm
version: 2.00.10
SOAP::WSDL::Operation:
file: lib/SOAP/WSDL/Operation.pm
version: 2.00.10
SOAP::WSDL::Part:
file: lib/SOAP/WSDL/Part.pm
version: 2.00.10
SOAP::WSDL::Port:
file: lib/SOAP/WSDL/Port.pm
version: 2.00.10
SOAP::WSDL::PortType:
file: lib/SOAP/WSDL/PortType.pm
version: 2.00.10
SOAP::WSDL::SOAP::Address:
file: lib/SOAP/WSDL/SOAP/Address.pm
version: 2.00.10
SOAP::WSDL::SOAP::Body:
file: lib/SOAP/WSDL/SOAP/Body.pm
version: 2.00.10
SOAP::WSDL::SOAP::Header:
file: lib/SOAP/WSDL/SOAP/Header.pm
version: 2.00.10
SOAP::WSDL::SOAP::HeaderFault:
file: lib/SOAP/WSDL/SOAP/HeaderFault.pm
version: 2.00.10
SOAP::WSDL::SOAP::Operation:
file: lib/SOAP/WSDL/SOAP/Operation.pm
version: 2.00.10
SOAP::WSDL::SOAP::Typelib::Fault:
file: lib/SOAP/WSDL/SOAP/Typelib/Fault.pm
version: 2.00.10
SOAP::WSDL::SOAP::Typelib::Fault11:
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
version: 2.00.10
SOAP::WSDL::SOAP::Typelib::Fault11Detail:
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
SOAP::WSDL::Serializer::XSD:
file: lib/SOAP/WSDL/Serializer/XSD.pm
version: 2.00.10
SOAP::WSDL::Server:
file: lib/SOAP/WSDL/Server.pm
version: 2.00.10
SOAP::WSDL::Server::CGI:
file: lib/SOAP/WSDL/Server/CGI.pm
version: 2.00.10
SOAP::WSDL::Server::Mod_Perl2:
file: lib/SOAP/WSDL/Server/Mod_Perl2.pm
version: 2.00.10
SOAP::WSDL::Server::Simple:
file: lib/SOAP/WSDL/Server/Simple.pm
version: 2.00.10
SOAP::WSDL::Service:
file: lib/SOAP/WSDL/Service.pm
version: 2.00.10
SOAP::WSDL::Transport::HTTP:
file: lib/SOAP/WSDL/Transport/HTTP.pm
version: 2.00.10
SOAP::WSDL::Transport::Loopback:
file: lib/SOAP/WSDL/Transport/Loopback.pm
version: 2.00.10
SOAP::WSDL::Transport::Test:
file: lib/SOAP/WSDL/Transport/Test.pm
version: 2.00.10
SOAP::WSDL::TypeLookup:
file: lib/SOAP/WSDL/TypeLookup.pm
version: 2.00.10
SOAP::WSDL::Types:
file: lib/SOAP/WSDL/Types.pm
version: 2.00.10
SOAP::WSDL::XSD::Annotation:
file: lib/SOAP/WSDL/XSD/Annotation.pm
version: 2.00.10
SOAP::WSDL::XSD::Attribute:
file: lib/SOAP/WSDL/XSD/Attribute.pm
version: 2.00.10
SOAP::WSDL::XSD::AttributeGroup:
file: lib/SOAP/WSDL/XSD/AttributeGroup.pm
version: 2.00.10
SOAP::WSDL::XSD::Builtin:
file: lib/SOAP/WSDL/XSD/Builtin.pm
version: 2.00.10
SOAP::WSDL::XSD::ComplexType:
file: lib/SOAP/WSDL/XSD/ComplexType.pm
version: 2.00.10
SOAP::WSDL::XSD::Element:
file: lib/SOAP/WSDL/XSD/Element.pm
version: 2.00.10
SOAP::WSDL::XSD::Enumeration:
file: lib/SOAP/WSDL/XSD/Enumeration.pm
version: 2.00.10
SOAP::WSDL::XSD::FractionDigits:
file: lib/SOAP/WSDL/XSD/FractionDigits.pm
version: 2.00.10
SOAP::WSDL::XSD::Group:
file: lib/SOAP/WSDL/XSD/Group.pm
version: 2.00.10
SOAP::WSDL::XSD::Length:
file: lib/SOAP/WSDL/XSD/Length.pm
version: 2.00.10
SOAP::WSDL::XSD::MaxExclusive:
file: lib/SOAP/WSDL/XSD/MaxExclusive.pm
version: 2.00.10
SOAP::WSDL::XSD::MaxInclusive:
file: lib/SOAP/WSDL/XSD/MaxInclusive.pm
version: 2.00.10
SOAP::WSDL::XSD::MaxLength:
file: lib/SOAP/WSDL/XSD/MaxLength.pm
version: 2.00.10
SOAP::WSDL::XSD::MinExclusive:
file: lib/SOAP/WSDL/XSD/MinExclusive.pm
version: 2.00.10
SOAP::WSDL::XSD::MinInclusive:
file: lib/SOAP/WSDL/XSD/MinInclusive.pm
version: 2.00.10
SOAP::WSDL::XSD::MinLength:
file: lib/SOAP/WSDL/XSD/MinLength.pm
version: 2.00.10
SOAP::WSDL::XSD::Pattern:
file: lib/SOAP/WSDL/XSD/Pattern.pm
version: 2.00.10
SOAP::WSDL::XSD::Schema:
file: lib/SOAP/WSDL/XSD/Schema.pm
version: 2.00.10
SOAP::WSDL::XSD::Schema::Builtin:
file: lib/SOAP/WSDL/XSD/Schema/Builtin.pm
version: 2.00.10
SOAP::WSDL::XSD::SimpleType:
file: lib/SOAP/WSDL/XSD/SimpleType.pm
version: 2.00.10
SOAP::WSDL::XSD::TotalDigits:
file: lib/SOAP/WSDL/XSD/TotalDigits.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::Attribute:
file: lib/SOAP/WSDL/XSD/Typelib/Attribute.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::AttributeSet:
file: lib/SOAP/WSDL/XSD/Typelib/AttributeSet.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::Builtin:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::Builtin::ENTITY:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ENTITY.pm
SOAP::WSDL::XSD::Typelib::Builtin::ID:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/ID.pm
SOAP::WSDL::XSD::Typelib::Builtin::IDREF:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREF.pm
SOAP::WSDL::XSD::Typelib::Builtin::IDREFS:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/IDREFS.pm
SOAP::WSDL::XSD::Typelib::Builtin::NCName:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NCName.pm
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKEN:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKEN.pm
SOAP::WSDL::XSD::Typelib::Builtin::NMTOKENS:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NMTOKENS.pm
SOAP::WSDL::XSD::Typelib::Builtin::NOTATION:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/NOTATION.pm
SOAP::WSDL::XSD::Typelib::Builtin::Name:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/Name.pm
SOAP::WSDL::XSD::Typelib::Builtin::QName:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/QName.pm
SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm
SOAP::WSDL::XSD::Typelib::Builtin::anyType:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::Builtin::anyURI:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/anyURI.pm
SOAP::WSDL::XSD::Typelib::Builtin::base64Binary:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/base64Binary.pm
SOAP::WSDL::XSD::Typelib::Builtin::boolean:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/boolean.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::Builtin::byte:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/byte.pm
SOAP::WSDL::XSD::Typelib::Builtin::date:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/date.pm
SOAP::WSDL::XSD::Typelib::Builtin::dateTime:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/dateTime.pm
SOAP::WSDL::XSD::Typelib::Builtin::decimal:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/decimal.pm
SOAP::WSDL::XSD::Typelib::Builtin::double:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/double.pm
SOAP::WSDL::XSD::Typelib::Builtin::duration:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/duration.pm
SOAP::WSDL::XSD::Typelib::Builtin::float:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/float.pm
SOAP::WSDL::XSD::Typelib::Builtin::gDay:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gDay.pm
SOAP::WSDL::XSD::Typelib::Builtin::gMonth:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonth.pm
SOAP::WSDL::XSD::Typelib::Builtin::gMonthDay:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gMonthDay.pm
SOAP::WSDL::XSD::Typelib::Builtin::gYear:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYear.pm
SOAP::WSDL::XSD::Typelib::Builtin::gYearMonth:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/gYearMonth.pm
SOAP::WSDL::XSD::Typelib::Builtin::hexBinary:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/hexBinary.pm
SOAP::WSDL::XSD::Typelib::Builtin::int:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/int.pm
SOAP::WSDL::XSD::Typelib::Builtin::integer:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/integer.pm
SOAP::WSDL::XSD::Typelib::Builtin::language:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/language.pm
SOAP::WSDL::XSD::Typelib::Builtin::list:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/list.pm
SOAP::WSDL::XSD::Typelib::Builtin::long:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/long.pm
SOAP::WSDL::XSD::Typelib::Builtin::negativeInteger:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/negativeInteger.pm
SOAP::WSDL::XSD::Typelib::Builtin::nonNegativeInteger:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonNegativeInteger.pm
SOAP::WSDL::XSD::Typelib::Builtin::nonPositiveInteger:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/nonPositiveInteger.pm
SOAP::WSDL::XSD::Typelib::Builtin::normalizedString:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/normalizedString.pm
SOAP::WSDL::XSD::Typelib::Builtin::positiveInteger:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/positiveInteger.pm
SOAP::WSDL::XSD::Typelib::Builtin::short:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/short.pm
SOAP::WSDL::XSD::Typelib::Builtin::string:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/string.pm
SOAP::WSDL::XSD::Typelib::Builtin::time:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/time.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::Builtin::token:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/token.pm
SOAP::WSDL::XSD::Typelib::Builtin::unsignedByte:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedByte.pm
SOAP::WSDL::XSD::Typelib::Builtin::unsignedInt:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedInt.pm
SOAP::WSDL::XSD::Typelib::Builtin::unsignedLong:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedLong.pm
SOAP::WSDL::XSD::Typelib::Builtin::unsignedShort:
file: lib/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.pm
SOAP::WSDL::XSD::Typelib::ComplexType:
file: lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::Element:
file: lib/SOAP/WSDL/XSD/Typelib/Element.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::SimpleType:
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
version: 2.00.10
SOAP::WSDL::XSD::Typelib::SimpleType::restriction:
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
version: 2.00.10
SOAP::WSDL::XSD::WhiteSpace:
file: lib/SOAP/WSDL/XSD/WhiteSpace.pm
version: 2.00.10
generated_by: Module::Build version 0.280801
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
no_index:
directory: lib/SOAP/WSDL/Generator/Template/XSD/
SOAP-WSDL-2.00.10/test_html.pl 0000444 0001750 0001750 00000001223 11203370730 015061 0 ustar martin martin # perl usage:
use lib 't/lib';
use TAP::Harness;
use TAP::Formatter::HTML;
my $fmt = TAP::Formatter::HTML->new({
verbosity => -2,
});
use File::Find::Rule;
my @tests = sort { $a cmp $b } File::Find::Rule->file()
->name( '*.t' )
->in( 't/' );
local $ENV{TEST_VERBOSE} = 1;
my $harness = TAP::Harness->new(
{
formatter => $fmt ,
merge => 1,
# verbosity => 1,
lib => [ 't/lib', 'lib' ],
switches => ($ARGV[0] eq '--cover')
? [ '-MDevel::Cover=-ignore,.,-select,^lib/.+,-coverage,statement,subroutine,condition,branch' ]
: [],
});
$harness->runtests( @tests );
SOAP-WSDL-2.00.10/LICENSE 0000444 0001750 0001750 00000015046 11203370730 013536 0 ustar martin martin SOAP::WSDL is dual licensed under the same terms as
Perl itself.
This means at your choice, either the Perl Artistic License, or
the GNU GPL version 1 or - at your choice - any higher version.
The GNU GPL can be obtained from
http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt
Newer versions can be found at http://www.gnu.org/licenses/gpl.html
The Artistic License can be obtained from
http://dev.perl.org/licenses/artistic.html and is included below.
ARTISTIC LICENSE
================
The "Artistic License"
Preamble
The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.
Definitions:
"Package" refers to the collection of files distributed by the
Copyright Holder, and derivatives of that collection of files
created through textual modification.
"Standard Version" refers to such a Package if it has not been
modified, or has been modified in accordance with the wishes
of the Copyright Holder as specified below.
"Copyright Holder" is whoever is named in the copyright or
copyrights for the package.
"You" is you, if you're thinking about copying or distributing
this Package.
"Reasonable copying fee" is whatever you can justify on the
basis of media cost, duplication charges, time of people involved,
and so on. (You will not be required to justify it to the
Copyright Holder, but only to the computing community at large
as a market that must bear the fee.)
"Freely Available" means that no fee is charged for the item
itself, though there may be fees involved in handling the item.
It also means that recipients of the item may redistribute it
under the same conditions they received it.
1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.
2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder. A Package
modified in such a way shall still be considered the Standard Version.
3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:
a) place your modifications in the Public Domain or otherwise make them
Freely Available, such as by posting said modifications to Usenet or
an equivalent medium, or placing the modifications on a major archive
site such as uunet.uu.net, or by allowing the Copyright Holder to include
your modifications in the Standard Version of the Package.
b) use the modified Package only within your corporation or organization.
c) rename any non-standard executables so the names do not conflict
with standard executables, which must also be provided, and provide
a separate manual page for each non-standard executable that clearly
documents how it differs from the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:
a) distribute a Standard Version of the executables and library files,
together with instructions (in the manual page or equivalent) on where
to get the Standard Version.
b) accompany the distribution with the machine-readable source of
the Package with your modifications.
c) give non-standard executables non-standard names, and clearly
document the differences in manual pages (or equivalent), together
with instructions on where to get the Standard Version.
d) make other distribution arrangements with the Copyright Holder.
5. You may charge a reasonable copying fee for any distribution of this
Package. You may charge any fee you choose for support of this
Package. You may not charge a fee for this Package itself. However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own. You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.
6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package. If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.
7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.
8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.
10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The End
SOAP-WSDL-2.00.10/TEST_COVERAGE 0000444 0001750 0001750 00000001630 11203370730 014500 0 ustar martin martin # Unfortunately, Build testcover reports test coverage wrong.
#
# To get a complete coverage report, just run this file as a shell script
# on a linux box (or execute the equivalent commands on another OS):
#
# Note that this shell script requires Devel::CoverX::Covered - if you
# don't have it, comment out the line noted below
#
perl Build.PL && perl Build && \
perl -MTAP::Harness -MFile::Find::Rule -e '
local $ENV{TEST_VERBOSE} = 1;
TAP::Harness->new({
merge => 1,
lib => [ q{t/lib}, q{blib/lib} ],
switches => [ q{-MDevel::Cover=-ignore,.,-select,^blib/lib/.+,-coverage,statement,-coverage,subroutine,-coverage,condition,-coverage,branch} ],
})->runtests( sort { $a cmp $b } File::Find::Rule->file()->name( q{*.t} )->in( q{t/} ) );
'
# Devel::CoverX::Covered
# covered runs
cover
# cover -coverage="statement" -coverage=condition -coverage=subroutine -coverage="branch"
SOAP-WSDL-2.00.10/Makefile.PL 0000444 0001750 0001750 00000000447 11203370730 014502 0 ustar martin martin # Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
require 5.8.0;
use Module::Build::Compat 0.02;
Module::Build::Compat->run_build_pl(args => \@ARGV);
require Module::Build;
Module::Build::Compat->write_makefile(build_class => 'Module::Build');
SOAP-WSDL-2.00.10/lib/ 0000755 0001750 0001750 00000000000 11203370730 013273 5 ustar martin martin SOAP-WSDL-2.00.10/lib/SOAP/ 0000755 0001750 0001750 00000000000 11203370730 014035 5 ustar martin martin SOAP-WSDL-2.00.10/lib/SOAP/WSDL/ 0000755 0001750 0001750 00000000000 11203370730 014606 5 ustar martin martin SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Server/ 0000755 0001750 0001750 00000000000 11203370730 016054 5 ustar martin martin SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Server/Mod_Perl2.pm 0000444 0001750 0001750 00000020735 11203370730 020202 0 ustar martin martin package SOAP::WSDL::Server::Mod_Perl2;
use strict;
use warnings;
use base qw(SOAP::WSDL::Server);
use Scalar::Util qw(blessed);
use HTTP::Request ();
use Apache2::RequestIO (); # $r->read()
use Apache2::RequestRec (); # $r->headers_in
use Apache2::RequestUtil(); # $r->dir_config()
use APR::Table (); # $r->headers_in->get()
use Apache2::Log (); # $r->log
use Apache2::Const -compile => qw(
OK
SERVER_ERROR
HTTP_LENGTH_REQUIRED
);
use version; our $VERSION = qv('2.00.10');
my %LOADED_OF = ();
sub handler {
my $r = shift;
my $rlog = $r->log();
#
# Set up section; import requested modules, throwing errors if we're
# unable to do so. For maximum performance, this should be re-worked
# to use perl-based Apache directives rather than dir_config(), since
# the former happens at startup time and the latter at request time.
#
# dispatch_to
my $dispatch_to = $r->dir_config('dispatch_to');
if (! $dispatch_to) {
$rlog->error("No 'dispatch_to' variable set in httpd.conf");
return Apache2::Const::SERVER_ERROR;
}
if (! exists $LOADED_OF{$dispatch_to}) {
eval "require $dispatch_to";
if ($@) {
$rlog->error("Failed to require [$dispatch_to]: $@");
return Apache2::Const::SERVER_ERROR;
}
$LOADED_OF{$dispatch_to} = undef;
}
#
# SOAP service
my $soap_service_package = $r->dir_config('soap_service');
if (! $soap_service_package) {
$rlog->error("No 'soap_service' variable set in httpd.conf");
return Apache2::Const::SERVER_ERROR;
}
if (! exists $LOADED_OF{$soap_service_package}) {
eval "require $soap_service_package";
if ($@) {
$rlog->error("Failed to require [$soap_service_package]: $@");
return Apache2::Const::SERVER_ERROR;
}
$LOADED_OF{$soap_service_package} = undef;
}
#
# transport_class (optional)
my $transport_class = $r->dir_config('transport_class');
if ($transport_class) {
eval "require $transport_class";
if ($@) {
$rlog->error("Failed to require [$transport_class]: $@");
return Apache2::Const::SERVER_ERROR;
}
}
else {
#
# if no transport class was specified, use this package's handle()
# method
$transport_class = __PACKAGE__;
}
#
# instantiate SOAP server object
my $server = $soap_service_package->new({
dispatch_to => $dispatch_to, # methods
transport_class => $transport_class, # handle() call
});
my $response_msg = $server->handle($r);
if ($response_msg =~ /^\d{3}$/) {
#
# a 3-digit number is presumed to be an HTTP return status; since
# we got this and not a SOAP response, it's presumed to be an
# error; pass it back to the client as-is
$rlog->error("Dispatcher returned HTTP $response_msg");
return $response_msg;
}
if ($response_msg) {
$r->content_type('text/xml; charset="utf-8"');
$r->print($response_msg);
return Apache2::Const::OK;
}
else {
$rlog->error("No response returned from dispatcher");
return Apache2::Const::SERVER_ERROR;
}
}
sub handle {
my ($self, $r) = @_;
my $rlog = $r->log();
my $length = $r->headers_in->get('content-length');
if (! $length) {
$rlog->error("No content-length provided");
# TODO maybe throw instead of returning a HTTP code?
# ... it's an exception, anyway...
return Apache2::Const::HTTP_LENGTH_REQUIRED;
}
# read may return less than requested - read until there's no more...
# TODO: We should note that LimitRequestBody is a must in apache config
my ($buffer, $read_length);
my $content = q{};
while ($read_length = $r->read($buffer, $length)) {
$content .= $buffer;
}
if ($length != length $content) {
$rlog->error("Read length mismatch; read [" . length($content) . "] bytes but received [$length] bytes");
return Apache2::Const::SERVER_ERROR;
}
# Shamelessly copied (with mild tweaks) from SOAP::WSDL::Server::CGI
# ... which was as shamelessly copied from SOAP::Transport::HTTP...
my $request = HTTP::Request->new(
$r->method => $r->uri,
HTTP::Headers->new(
SOAPAction => $r->headers_in()->get('SOAPAction'),
),
$content,
);
my $response_message = eval { $self->SUPER::handle($request) };
# TODO return response if @$ is a SOAP::WSDL::XSD::Typelib::Builtin::anyType object
if ($@ || blessed($@)) {
$rlog->error("Failed to handle request: $@");
return Apache2::Const::SERVER_ERROR;
}
else {
return $response_message;
}
}
1;
__END__
=pod
=head1 NAME
SOAP::WSDL::Server::Mod_Perl2 - mod_perl based SOAP server using SOAP::WSDL
=head1 DESCRIPTION
Perl module providing a mod_perl2-based SOAP server using SOAP::WSDL
=head1 CONFIGURATION
Configuration is managed through the use of PerlSetVar directives.
The following variables are available:
=head2 dispatch_to
Takes as a single argument the package name of the module which contains
the methods which handle SOAP requests.
PerlSetVar dispatch_to "WebPackage::SOAPMethods"
=head2 soap_service
Takes as a single argument the package name of the Server module
generated by SOAP::WSDL using
wsdl2perl.pl --server file:///path/to/your/wsdl
By default, the name of the package is MyServer::$SERVICENAME::$PORTTYPE.
EXAMPLE: Given this sample WSDL which wsdl2perl.pl was run against to generate
perl packages:
[...]
[...]
The following directive would be correct:
PerlSetVar soap_service "MyServer::WebService::WebServiceSoap"
=head2 transport_class [OPTIONAL]
Takes as a single argument the package name of the perl module containing a
handle() method used to assemble the HTTP request which will be passed to the
methods in your L module (see above). A default handle() method
is supplied in this module which should handle most common cases.
handle() is called with the following parameters:
$r - Apache::RequestRec object
=head1 EXAMPLES
The following snippet added to httpd.conf will enable a SOAP server at
/WebService on your webserver:
SetHandler perl-script
PerlResponseHandler SOAP::WSDL::Server::Mod_Perl2
PerlSetVar dispatch_to "WebPackage::SOAPMethods"
PerlSetVar soap_service "MyServer::WebService::WebServiceSoap"
=head1 PERFORMANCE
On my machine, a simple SOAP server (the HelloWorld service from the examples)
needs around 20s to process 300 requests to a CGI script implemented with
SOAP::WSDL::Server::CGI, around 4.5s to the same CGI with mod_perl enabled,
and around 3.2s with SOAP::WSDL::Server::Mod_Perl2. All these figures
include the time for creating the request and parsing the response.
As general advice, using mod_perl is highly recommended in high-performance
environments. Using SOAP::WSDL::Server::Mod_Perl2 yields an extra 20% speedup
compared with mod_perl enabled CGI scripts - and it allows one to configure
SOAP servers in the Apache config.
=head1 THREAD SAFETY
SOAP::WSDL uses Class::Std::Fast, which is not guaranteed to be threadsafe
yet. Thread safety in Class::Std::Fast is dependent on whether
my $foo = $bar++;
is an atomic operation. I haven't found out yet.
A load test on a single CPU machine with 4 clients using the worker mpm
did not reveal any threading issues - but that does not mean there are none.
=head1 CREDITS
Contributed (along with lots of other little improvements) by Noah Robin.
Thanks!
=head1 LICENSE AND COPYRIGHT
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 AUTHOR
Noah Robin Enoah.robin gmail.comE
Based on SOAP::WSDL::Server::CGI, by Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 583 $
$LastChangedBy: kutterma $
$Id: $
$HeadURL: $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Server/Simple.pm 0000444 0001750 0001750 00000010225 11203370730 017641 0 ustar martin martin package SOAP::WSDL::Server::Simple;
use strict;
use warnings;
use Encode;
use HTTP::Request;
use HTTP::Response;
use HTTP::Status;
use HTTP::Headers;
use Scalar::Util qw(blessed);
use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Server);
use version; our $VERSION = qv('2.00.10');
# mostly copied from SOAP::Lite. Unfortunately we can't use SOAP::Lite's CGI
# server directly - we would have to swap out it's base class...
#
# This should be a warning for us: We should not handle methods via inheritance,
# but via some plugin mechanism, to allow alternative handlers to be plugged
# in.
sub handle {
my ($self, $cgi) = @_;
my $response;
my $content = $cgi->param('POSTDATA');
my $request = HTTP::Request->new(
$ENV{'REQUEST_METHOD'} || '' => $ENV{'SCRIPT_NAME'},
HTTP::Headers->new(
map {
(/^HTTP_(.+)/i
? ($1=~m/SOAPACTION/)
?('SOAPAction')
:($1)
: $_
) => $ENV{$_}
} keys %ENV),
$content,
);
# we copy the response message around here.
# Passing by reference would be much better...
my $response_message = eval { $self->SUPER::handle($request) };
# caveat: SOAP::WSDL::SOAP::Typelib::Fault11 is false in bool context...
if ($@ || blessed $@) {
my $exception = $@;
$response = HTTP::Response->new(500);
$response->header('Content-type' => 'text/xml; charset="utf-8"');
if (blessed($exception)) {
$response->content( $self->get_serializer->serialize({
body => $exception
})
);
}
else {
$response->content($exception);
}
}
else {
$response = HTTP::Response->new(200);
$response->header('Content-type' => 'text/xml; charset="utf-8"');
$response->content( encode('utf8', $response_message ) );
{
use bytes;
$response->header('Content-length', length $response_message);
}
}
$self->_output($response);
return;
}
sub _output :PRIVATE {
my ($self, $response) = @_;
my $code = $response->code;
binmode(STDOUT);
print STDOUT "HTTP/1.0 $code ", HTTP::Status::status_message($code)
, "\015\012", $response->headers_as_string("\015\012")
, "\015\012", $response->content;
warn "HTTP/1.0 $code ", HTTP::Status::status_message($code)
, "\015\012", $response->headers_as_string("\015\012")
, $response->content, "\n\n";
}
1;
=pod
=head1 NAME
SOAP::WSDL::Server::Simple - CGI based SOAP server for HTTP::Server::Simple
=head1 SYNOPSIS
package TestServer;
use base qw(HTTP::Server::Simple::CGI);
use MyServer::TestService::TestPort;
sub handle_request {
my ($self, $cgi) = @_;
my $server = MyServer::TestService::TestPort->new({
dispatch_to => 'main',
transport_class => 'SOAP::WSDL::Server::Simple',
});
$server->handle($cgi);
}
my $httpd = __PACKAGE__->new();
$httpd->run();
=head1 USAGE
To use SOAP::WSDL::Server::Simple efficiently, you should first create a server
interface using L.
SOAP::WSDL::Server::Simple dispatches all calls to appropriately named methods in the
class or object set via C.
See the generated server class on details.
=head1 DESCRIPTION
Lightweight SOAP server for use with HTTP::Server::Simple, mainly designed
for testing purposes. It allows to set up a simple SOAP server without having
to configure CGI or mod_perl stuff.
SOAP::WSDL::Server::Simple is not recommended for production use.
=head1 METHODS
=head2 handle
See synopsis above.
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2008 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same
terms as perl itself
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 391 $
$LastChangedBy: kutterma $
$Id: Client.pm 391 2007-11-17 21:56:13Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Server/CGI.pm 0000444 0001750 0001750 00000010621 11203370730 017012 0 ustar martin martin package SOAP::WSDL::Server::CGI;
use strict;
use warnings;
use Encode;
use HTTP::Request;
use HTTP::Response;
use HTTP::Status;
use HTTP::Headers;
use Scalar::Util qw(blessed);
use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Server);
use version; our $VERSION = qv('2.00.10');
# mostly copied from SOAP::Lite. Unfortunately we can't use SOAP::Lite's CGI
# server directly - we would have to swap out it's base class...
#
# This should be a warning for us: We should not handle methods via inheritance,
# but via some plugin mechanism, to allow alternative handlers to be plugged
# in.
sub handle {
my $self = shift;
my $response;
my $length = $ENV{'CONTENT_LENGTH'} || 0;
if (!$length) {
$response = HTTP::Response->new(411); # LENGTH REQUIRED
$self->_output($response);
return;
}
if (exists $ENV{EXPECT} && $ENV{EXPECT} =~ /\b100-Continue\b/i) {
print "HTTP/1.1 100 Continue\r\n\r\n";
}
my $content = q{};
my $buffer;
# do we need to use bytes; here ?
binmode(STDIN);
while (read(STDIN,$buffer,$length - length($content))) {
$content .= $buffer;
}
my $request = HTTP::Request->new(
$ENV{'REQUEST_METHOD'} || '' => $ENV{'SCRIPT_NAME'},
HTTP::Headers->new(
map {
(/^HTTP_(.+)/i
? ($1=~m/SOAPACTION/)
?('SOAPAction')
:($1)
: $_
) => $ENV{$_}
} keys %ENV),
$content,
);
# we copy the response message around here.
# Passing by reference would be much better...
my $response_message = eval { $self->SUPER::handle($request) };
# caveat: SOAP::WSDL::SOAP::Typelib::Fault11 is false in bool context...
if ($@ || blessed $@) {
my $exception = $@;
$response = HTTP::Response->new(500);
$response->header('Content-type' => 'text/xml; charset="utf-8"');
if (blessed($exception)) {
$response->content( $self->get_serializer->serialize({
body => $exception
})
);
}
else {
$response->content($exception);
}
}
else {
$response = HTTP::Response->new(200);
$response->header('Content-type' => 'text/xml; charset="utf-8"');
$response->content( encode('utf8', $response_message ) );
{
use bytes;
$response->header('Content-length', length $response_message);
}
}
$self->_output($response);
return;
}
sub _output :PRIVATE {
my ($self, $response) = @_;
# imitate nph- cgi for IIS (pointed by Murray Nesbitt)
my $status = defined($ENV{'SERVER_SOFTWARE'}) && $ENV{'SERVER_SOFTWARE'}=~/IIS/
? $ENV{SERVER_PROTOCOL} || 'HTTP/1.0'
: 'Status:';
my $code = $response->code;
binmode(STDOUT);
print STDOUT "$status $code ", HTTP::Status::status_message($code)
, "\015\012", $response->headers_as_string("\015\012")
, "\015\012", $response->content;
}
1;
=pod
=head1 NAME
SOAP::WSDL::Server::CGI - CGI based SOAP server
=head1 SYNOPSIS
use MyServer::TestService::TestPort;
my $server = MyServer::TestService::TestPort->new({
dispatch_to => 'main',
transport_class => 'SOAP::WSDL::Server::CGI', # optional, default
});
$server->handle();
=head1 USAGE
To use SOAP::WSDL::Server::CGI efficiently, you should first create a server
interface using L.
SOAP::WSDL::Server dispatches all calls to appropriately named methods in the
class or object set via C.
See the generated server class on details.
=head1 DESCRIPTION
Lightweight CGI based SOAP server. SOAP::WSDL::Server::CGI does not provide
the fancier things of CGI handling, like URL parsing, parameter extraction
or the like, but provides a basic SOAP server using SOAP::WSDL::Server.
=head1 METHODS
=head2 handle
See synopsis above.
=head1 LICENSE AND COPYRIGHT
Copyright 2004-2008 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same
terms as perl itself
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 391 $
$LastChangedBy: kutterma $
$Id: Client.pm 391 2007-11-17 21:56:13Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Message.pm 0000444 0001750 0001750 00000000324 11203370730 016525 0 ustar martin martin package SOAP::WSDL::Message;
use strict;
use warnings;
use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Base);
use version; our $VERSION = qv('2.00.10');
my %part_of :ATTR(:name :default<[]>);
1;
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/ 0000755 0001750 0001750 00000000000 11203370730 016023 5 ustar martin martin SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/Cookbook.pod 0000444 0001750 0001750 00000021721 11203370730 020276 0 ustar martin martin =pod
=head1 NAME
SOAP::WSDL::Manual::Cookbook - SOAP::WSDL recipes
=head2 Accessing HTTPS webservices
You need Crypt::SSLeay installed to access HTTPS webservices.
=head2 Accessing protected web services
Passing a username and password, or a client certificate and key, to the
transport layer is highly dependent on the transport backend. The descriptions
below are for HTTP(S) transport using LWP::UserAgent
=head3 Accessing HTTP(S) webservices with basic/digest authentication
When using SOAP::WSDL::Transport::HTTP (SOAP::Lite not installed), add a
method called "get_basic_credentials" to SOAP::WSDL::Transport::HTTP:
*SOAP::WSDL::Transport::HTTP::get_basic_credentials = sub {
return ($user, $password);
};
When using SOAP::Transport::HTTP (SOAP::Lite is installed), do the same to
this backend:
*SOAP::Transport::HTTP::Client::get_basic_credentials = sub {
return ($user, $password);
};
=head3 Accessing HTTP(S) webservices protected by NTLM authentication
If you want to connect to a windows server using some Windows Domain Login, please
consider using Kerberos instead of the (older) NTLM mechanism - see below.
Kerberos and NTLM are (currently) mutually exclusive - when LWP::Authen::Negotiate
is installed, it will always be queried (and will always raise an error), even
if you don't want to use it. See http://rt.cpan.org/Public/Bug/Display.html?id=32826
for details.
You need the L distribution installed to access webservices protected
by NTLM authentication. More specifically, you need the Authen::NTLM module
from this distribution. Note that this is different from the Authen::NTML
distribution by Yee Man Chan also available from CPAN.
Your user credentials usually need to include the windows domain or the
windows hostname like this:
testdomain\testuser
or
\\testhost\testuser
Besides passing user credentials as when accessing a web service protected
by basic or digest authentication, you also need to enforce connection
keep_alive on the transport backens.
To do so, pass a I argument to the new() method of the generated
class. This unfortunately means that you have to set the endpoint URL, too:
my $interface = MyInterfaces::SERVICE_NAME::PORT_NAME->new({
proxy => [ $url, keep_alive => 1 ]
});
You may, of course, decide to just hack the generated class. Be advised that
subclassing might be a more appropriate solution - re-generating overwrites
changes in interface classes.
=head3 Accessing HTTP(S) webservices protected by NTLMv2
There are different variants of NTLM, and by default Authen::NTLM uses the v1 variant.
NTLM is a connection-based handshake authentication protocol, which requires
three or more requests on the same connection:
Request POST
Response 401 Unauthorized
WWW-Authenticate: NTLM
Request Authorization: NTLM
Response 401 Unauthorized
WWW-Authenticate: NTLM
Request Authorization: NTLM
Response 200 Ok
If you try to access a NTLMv2 protected web service and switch on LWP::Debug by
saying
use LWP::Debug qw(+);
you should see at least two lines containing something like
Authorization NTLM TlRMTVNTUAABAAAAB7IAAAAAAAAAAAAAAwADACAAAABmb28=
...
Authorization NTLM TlRMTVNTUAABAAAAB7IAAAAAAAAAAAAAAw ... much longer ... ADACAAAABmb28=
If you're talking to a Server using NTLMv2 exclusively, you will only the first line
in the debug output, and then an error.
To explicitely enable NTLMv2, do the following in your client:
use Authen::NTLM;
ntlmv2(1);
This globally enables the use of NTLMv2. Note that this is a global setting: All
clients running in the same perl interpreter will be affected. This can
cause unexpected issues when running under mod_perl.
=head3 Accessing webservices protected by HTTP Kerberos Authentication
Use the L plugin from CPAN. You
need to set up GSSAPI to perform the Kerberos authentication, though. How to do
this is implementation specific (MIT or Heimdahl). See your Kerberos/GSSAPI
documentation for details.
(Newer) Windows Web Services usually allow to use both the Negotiate (Kerberos)
and NTLM authentication scheme.
=head3 Accessing HTTPS webservices protected by certificate authentication
You need Crypt::SSLeay installed to access HTTPS webservices.
See L on how to configure client certificate authentication.
=head1 XML OUTPUT
=head2 Outputting namespaces as prefixes
Q: I need to interface with a SOAP server which doesn't accept the following
format:
12345
Instead, it requires this:
12345
How do I do this using SOAP::WSDL?
A: The following steps are neccessary to achieve this result:
First, you would need to write a new serializer, which is quite easy, as it
just creates the envelope and calls ->serialize_qualified() on $header and
$body to fill them in. The new serializer has to declare all namespace
prefixes used, the rest is just the same as the original XSD serializer.
Second, you'd need to overwrite the start_tag method in
L to use
the appropriate prefixes for the body elements.
In contrast to the original method, it would probably look up the appropriate
prefix from some data set in the serializer class, so this could be the
appropriate place to load SOAP::WSDL::XSD::Typelib::Element and override the
method.
Something like this should do (without the handling of specialties like empty
or nil elements):
%PREFIX_OF = { 'http://services.company.com/' => 'ns2' };
*SOAP::WSDL::XSD::Typelib::Element::start_tag = sub {
# use prefix instead of xmlns attribute and copy the rest from
# SOAP::WSDL::XSD::Typelib::Element::start_tag
my $prefix = $PREFIX_OF{ $_[0]->get_xmlns() };
my $name = $_[1]->{ name } || $self->__get_name();
return "<$prefix:$name>";
}
=head1 Skipping unknown XML elements - "lax" XML processing
SOAP::WSDL's default serializer
L is a "strict"
XML processor in the sense that it throws an exception on encountering unknown
XML elements.
L allows
switching off the stric XML processing by passing the C 0>
option.
=head2 Disabling strict XML processing in a Client
Pass the following as C:
{ strict => 0 }
Example: The generated SOAP client is assumed to be "MyInterface::Test".
use MyInterface::Test;
my $soap = MyInterface::Test->new({
deserializer_args => { strict => 0 }
});
my $result = $soap->SomeMethod();
=head2 Disabling strict XML processing in a CGI based server
You have to set the deserializer in the transport class explicitely to
a L object with the
C option set to 0.
Example: The generated SOAP server is assumed to be "MyServer::Test".
use strict;
use MyServer::Test;
use SOAP::WSDL::Deserializer::XSD;
my $soap = MyServer::Test->new({
transport_class => 'SOAP::WSDL::Server::CGI',
dispatch_to => 'main',
});
$soap->get_transport()->set_deserializer(
SOAP::WSDL::Deserializer::XSD->new({ strict => 0 })
);
$soap->handle();
=head2 Disabling strict XML processing in a mod_perl based server
Sorry, this is not implemented yet - you'll have to write your own handler
class based on L.
=head1 Changing the encoding of a SOAP request
SOAP::WSDL uses utf-8 per default: utf-8
is the de-facto standard for webservice ommunication.
However, you can change the encoding the transport layer announces by calling
C on a client object.
You probably have to write your own serializer class too, because the default
serializer has the utf-8 encoding hardcoded in the envelope.
Just look into SOAP::WSDL::Serializer on how to do that.
Don't forget to register your serializer at the serializer factory
SOAP::WSDL::Factory::Serializer.
=head1 LICENSE AND COPYRIGHT
Copyright 2008, 2009 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself.
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 583 $
$LastChangedBy: kutterma $
$Id: $
$HeadURL: $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/WS_I.pod 0000444 0001750 0001750 00000110423 11203370730 017327 0 ustar martin martin =pod
=head1 NAME
SOAP::WSDL::Manual::WS_I - How SOAP::WSDL complies to WS-I Basic Profile 1.0
=head1 DESCRIPTION
This document gives an overview about how SOAP::WSDL confirms to the rules of
the WS-I Basic Profile 1.0 found at
L
Errata are not yet worked in.
You may find rules mis-categorized, especially in the "not applicable" section.
Such mis-categorizations are documentation bugs, please feel free to report
them.
Rules are categorized into the following sections:
=over
=item * RULES CONFIRMED
This section contains rules SOAP::WSDL follows. Conformance to these rules may
be assured by a test.
=item * RULES NOT CONFIRMED
This section contains rules SOAP::WSDL does not follow yet. These may be
considered as bugs.
=item * RULES NOT APPLICABLE
WS-I Basic Profile contains rules for web services as a whole. SOAP::WSDL only
plays the part of one layer in a Web Service CONSUMER / RECEIVER, thus does
not implement some parts the WS-I Basic Profile references.
This section contains rules not applicable for SOAP::WSDL, because they refer
to parts SOAP::WSDL does not implement.
=back
=head1 RULES CONFIRMED
=head2 R1005
A MESSAGE MUST NOT contain soap:encodingStyle attributes on any of the elements
whose namespace name is "http://schemas.xmlsoap.org/soap/envelope/".
SOAP::WSDL::Serializer::SOAP11 does not add soap:encodingStyle attributes on any
element.
=head2 R1006
A MESSAGE MUST NOT contain soap:encodingStyle attributes on any element that is
a child of soap:Body.
SOAP::WSDL::Serializer::SOAP11 does not add soap:encodingStyle attributes on any
element.
=head2 R1008
A MESSAGE MUST NOT contain a Document Type Declaration.
SOAP::WSDL::Serializer::SOAP11 does not add DTDs.
=head2 R1009
A MESSAGE MUST NOT contain Processing Instructions.
SOAP::WSDL::Serializer::SOAP11 does not add Processing Instructions
=head2 R1010
A RECEIVER MUST accept messages that contain an XML Declaration.
SOAP::WSDL::Expat::MessageParser allows the use of XML Declarations.
=head2 R1011
A MESSAGE MUST NOT have any element children of soap:Envelope following
the soap:Body element.
SOAP::WSDL::Serializer::SOAP11 does not emit children of soap:Envelope following
the soap:Body element. Other serializers may behave different.
=head2 R1012
A MESSAGE MUST be serialized as either UTF-8 or UTF-16.
SOAP::WSDL::Serializer::SOAP11 serializes messages as UTF-8.
=head2 R1018
The media type of a MESSAGE's envelope MUST indicate the correct character
encoding, using the charset parameter.
SOAP::WSDL::Transport::HTTP sets the Content-type header to
"text/xml; charset=utf8". SOAP::Transport does, too. Other transport
backends may behave different.
=head2 R1014
The children of the soap:Body element in a MESSAGE MUST be namespace
qualified.
SOAP::WSDL::Serializer::SOAP11 emits namespace-qualified child elements
of the soap:Body element.
=head2 R1017
A RECEIVER MUST NOT mandate the use of the xsi:type attribute in messages
except as required in order to indicate a derived type (see XML Schema
Part 1: Structures, Section 2.6.1).
SOAP::WSDL::Expat::MessageParser does not require the use of xsi:type
attributes, but uses typemaps instead.
Other deserializers may not comply to this rule.
=head2 R1028
When a Fault is generated by a RECEIVER, further processing SHOULD NOT be
performed on the SOAP message aside from that which is necessary to rollback,
or compensate for, any effects of processing the message prior to the
generation of the Fault.
A fault is generated when an error occurs processing the message.
SOAP::WSDL::Deserializer::SOAP11 does not perform any additional processing
after an error occured.
=head2 R1029
Where the normal outcome of processing a SOAP message would have resulted
in the transmission of a SOAP response, but rather a SOAP Fault is generated
instead, a RECEIVER MUST transmit a SOAP Fault message in place of the
response.
A fault is generated when an error occurs processing the message.
=head2 R1030
A RECEIVER that generates a SOAP Fault SHOULD notify the end user that a
SOAP Fault has been generated when practical, by whatever means is deemed
appropriate to the circumstance.
Via return value.
=head2 R1140
A MESSAGE SHOULD be sent using HTTP/1.1.
SOAP::WSDL::Transport::HTTP uses HTTP/1.1
=head2 R1141
A MESSAGE MUST be sent using either HTTP/1.1 or HTTP/1.0.
SOAP::WSDL::Transport::HTTP uses HTTP/1.1
=head2 R1107
A RECEIVER MUST interpret SOAP messages containing only a soap:Fault element
as a Fault.
SOAP::WSDL::Deserializer::SOAP11 does this.
=head2 R1132
A HTTP request MESSAGE MUST use the HTTP POST method.
Both SOAP::WSDL::Transport::HTTP and SOAP::Transport::HTTP use POST.
=head2 R1108
A MESSAGE MUST NOT use the HTTP Extension Framework (RFC2774).
SOAP::WSDL::Transport::HTTP does not use the HTTP Extension framework,
however SOAP::Transport::HTTP use M-POST if POST was not successful.
To be sure you comply to this rule, use SOAP::WSDL::Transport::HTTP as
transport backend.
=head2 R1109
The value of the SOAPAction HTTP header field in a HTTP request
MESSAGE MUST be a quoted string.
SOAP::WSDL::Client always quotes the SOAPAction header.
=head2 R1119
A RECEIVER MAY respond with a Fault if the value of the SOAPAction
HTTP header field is not quoted.
SOAP::WSDL does not apply any processing on the SOAPAction header
field.
=head2 R1131
A CONSUMER MAY automatically redirect a request when it encounters a
"307 Temporary Redirect" HTTP status code in a response.
LWP::UserAgent (used by SOAP::WSDL::Transport::HTTP and
SOAP::Transport::HTTP) accepts up to 7 levels of redirect by default.
=head2 R2113
A MESSAGE containing serialized arrays MUST NOT include the
soapenc:arrayType attribute.
SOAP::WSDL does not natively support soapenc::arrayType.
=head2 R2114
The target namespace for WSDL definitions and the target namespace for
schema definitions in a DESCRIPTION MAY be the same.
SOAP::WSDL does not impose any constraints on the target namespace for
WSDL definitions or schema definitions.
=head2 R2301
The order of the elements in the soap:body of a MESSAGE MUST be the same
as that of the wsdl:parts in the wsdl:message that describes it.
SOAP::WSDL obeys the part order.
=head2 R2712
A document-literal binding MUST be represented on the wire as a
MESSAGE with a soap:Body whose child element is an instance of the
global element declaration referenced by the corresponding wsdl:message
part.
If defined accordingly in the DESCRIPTION, SOAP::WSDL issues
document-literal binding operation MESSAGES conforming to this rule.
=head2 R2748
A CONSUMER MUST NOT interpret the presence of the wsdl:required attribute
on a soapbind extension element with a value of "false" to mean the extension
element is optional in the messages generated from the WSDL description.
SOAP::WSDL does not imterpret the wsdl:required attribute at all.
=head2 R5000
An INSTANCE MAY require the use of HTTPS.
SOAP::WSDL supports https.
=head2 R5010
An INSTANCE MAY require the use of HTTPS with mutual authentication.
SOAP::WSDL supports all kinds of authentication known to LWP::UserAgent
=head2 R2742
A MESSAGE MAY contain a fault detail entry in a SOAP fault that is not
described by a wsdl:fault element in the corresponding WSDL description.
SOAP::WSDL does not emit such faults. Such faults can be processed by adding
custom maps to the type maps for SOAP::WSDL::Expat::MessageParser.
=head2 R2744
A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field with a
quoted value equal to the value of the soapAction attribute of
soapbind:operation, if present in the corresponding WSDL description.
SOAP::WSDL uses the soapAction attribute from soapbind:operation as SOAPAction
header in generated code.
Alternative WSDL parsers / code generator have to assure they pass the correct
soap_action to SOAP::WSDL::Client.
The interpreting SOAP::WSDL client does not conform to this rule, but "guesses"
the SOAPAction header from the operation name and the top node's namespace.
=head2 R2745
A HTTP request MESSAGE MUST contain a SOAPAction HTTP header field with a
quoted empty string value, if in the corresponding WSDL description, the
soapAction of soapbind:operation is either not present, or present with an
empty string as its value.
SOAP::WSDL::Client always assures the SOAPaction header is quoted, thus
automatically inserts the empty string if no SOAPAction header is defined.
=head2 R1015
A RECEIVER MUST generate a fault if they encounter a message whose document
element has a local name of "Envelope" but a namespace name that is not
"http://schemas.xmlsoap.org/soap/envelope/".
SOAP::WSDL::Expat::MessageParser checks the namespace of the SOAP envelope.
SOAP::WSDL::Expat::MessageParser does not check that Envelope is the root
element, yet.
=head2 R1110
An INSTANCE MAY accept connections on TCP port 80 (HTTP)
SOAP::WSDL::Server::CGI may be used in a web server listening at port 80.
=head2 R1124
An INSTANCE MUST use a 2xx HTTP status code for responses that
indicate a successful outcome of a request.
SOAP::WSDL::Server::CGI sends a 2xx HTTP status code for successful requests.
=head2 R1111
An INSTANCE SHOULD use a "200 OK" HTTP status code for responses
that contain a SOAP message that is not a SOAP fault.
SOAP::WSDL::Server::CGI does this.
=head2 R1112
An INSTANCE SHOULD use either a "200 OK" or "202 Accepted" HTTP
status code for a response that does do not contain a SOAP message
but indicates successful HTTP outcome of a request.
SOAP::WSDL::Server::CGI does this.
=head2 R1130
An INSTANCE MUST use HTTP status code "307 Temporary Redirect"
when redirecting a request to a different endpoint.
SOAP::WSDL::Server::CGI has no means of redirecting. The web server running
a SOAP::WSDL::Server::CGI script is responsible for redirecting with a 307
HTTP status code.
=head2 R1125
An INSTANCE MUST use a 4xx HTTP status code for responses that indicate
a problem with the format of the request.
SOAP::WSDL does this.
=head2 R1113
An INSTANCE SHOULD use a "400 Bad Request "HTTP status code, if the
request message is a malformed HTTP request, or not well-formed XML.
SOAP::WSDL does this.
=head2 R1114
An INSTANCE SHOULD use a "405 Method not Allowed" HTTP status code if the
request method was not "POST".
SOAP::WSDL does this.
=head2 R1115
An INSTANCE SHOULD use a "415 Unsupported Media Type" HTTP status code if
the Content-Type HTTP request header did not have a value consistent with
the value specified for the corresponding binding of the input message.
SOAP::WSDL::Server::CGI does not support any content type other than text/xml
and application/xml yet.
=head1 RULES NOT CONFIRMED
=head2 R4001
A RECEIVER MUST accept messages that include the Unicode Byte Order Mark
(BOM).
May automatically work with XML::Parser::Expat, but is not tested yet.
TODO write test. If not confirmed, add encoding support.
=head2 R1002
A RECEIVER MUST accept fault messages that have any number of elements,
including zero, appearing as children of the detail element. Such children
can be qualified or unqualified.
Partially confirmed: This only works when the fault detail elements are added to
the deserializer's typemap.
TODO add processing of arbitrary content of faults to SOAP::WSDL::Expat::MessageParser
=head2 R1003
A RECEIVER MUST accept fault messages that have any number of qualified or
unqualified attributes, including zero, appearing on the detail element.
The namespace of qualified attributes can be anything other than
"http://schemas.xmlsoap.org/soap/envelope/".
TODO add processing of arbitrary attributes to SOAP::WSDL::SOAP::Typelib::Fault11
=head2 R1016
A RECEIVER MUST accept fault messages that carry an xml:lang attribute on
the faultstring element.
SOAP::WSDL::Expat::MessageParser currently ignores all attributes.
TODO add processing of the xml:lang attribute to SOAP::WSDL::SOAP::Typelib::Fault11
=head2 R1007
A MESSAGE described in an rpc-literal binding MUST NOT contain soap:encodingStyle
attribute on any elements are grandchildren of soap:Body.
SOAP::WSDL::Serializer::SOAP11 does not add soap:encodingStyle attributes on any
element.
However, rpc-literal bindings are not supported, yet.
TODO support rpc-literal bindings.
=head2 R2008
In a DESCRIPTION the value of the location attribute of a wsdl:import element
SHOULD be treated as a hint.
The wsdl:import element imports the referenced WSDL definition.
This is rather hard-wired and does not allow to specify a wsdl:import without
a resolvable location in SOAP::WSDL.
=head2 R4002
A DESCRIPTION MAY include the Unicode Byte Order Mark (BOM).
TODO Test.
=head2 R4003
A DESCRIPTION MUST use either UTF-8 or UTF-16 encoding.
TODO Test whether UTF-16 works.
=head2 R2020
The wsdl:documentation element MAY occur as a child of the wsdl:import
element in a DESCRIPTION.
Not tested yet.
=head2 R2024
The wsdl:documentation element MAY occur as a first child of the
wsdl:definitions element in a DESCRIPTION.
TODO Test.
=head2 R2027
If during the processing of an element in the WSDL namespace in a
description, a consumer encounters a WSDL extension element amongst
its element children, that has a wsdl:required attribute with a boolean
value of "true" that the consumer does not understand or cannot process,
the CONSUMER MUST fail processing of that element in the WSDL namespace.
TODO Implement support for wsdl:required
=head2 R2750
A CONSUMER MUST ignore a SOAP response carried in a response from a
one-way operation.
SOAP::WSDL does not ignore the SOAP response from a one way operation yet.
TODO Define operation type signature, and ignore result from one way operations.
=head2 R2747
A CONSUMER MUST understand and process all WSDL 1.1 SOAP Binding extension
elements, irrespective of the presence or absence of the wsdl:required
attribute on an extension element; and irrespective of the value of the
wsdl:required attribute, when present.
SOAP::WSDL does not implement all WSDL 1.1 SOAP Binding extension yet.
TODO check and implement.
=head2 R2800
A DESCRIPTION MAY use any construct from XML Schema 1.0.
SOAP::WSDL's WSDL parser doen not allow all contructs from XML Schema 1.0 to
be used.
TODO become "minimal conformant".
=head1 RULES NOT APPLICABLE
=head2 R0004
A MESSAGE MAY contain conformance claims, as specified in the conformance claim schema.
SOAP::WSDL::Serializer::SOAP11 does not add conformance claims.
Other serializers may act different.
=head2 R0005
A MESSAGE's conformance claims MUST be carried as SOAP header blocks.
SOAP::WSDL::Serializer::SOAP11 does not add conformance claims.
Other serializers may act different.
=head2 R0006
A MESSAGE MAY contain conformance claims for more than one profile.
SOAP::WSDL::Serializer::SOAP11 does not add conformance claims.
Other serializers may act different.
=head2 R0007
A SENDER MUST NOT use the soap:mustUnderstand attribute when sending a SOAP
header block containing a conformance claim.
SOAP::WSDL::Serializer::SOAP11 does not add conformance claims.
Other serializers may act different.
=head2 R3020
REGDATA of type uddi:tModel claiming conformance with a Profile MUST be
categorized using the ws-i-org:conformsTo:2002_12 taxonomy.
SOAP::WSDL does not publish web services yet.
=head2 R3030
REGDATA of type uddi:tModel claiming conformance with a Profile MUST use
the ws-i-org:conformsTo:2002_12 categorization value corresponding to
the conformance claim URI for that Profile.
SOAP::WSDL does not publish web services yet.
=head2 R3021
A REGISTRY MUST support the WS-I Conformance category system by adding
the ws-i-org:conformsTo:2002_12 tModel definition to its registry content.
SOAP::WSDL does not publish web services yet.
=head2 R3005
REGDATA other than uddi:tModel elements representing conformant Web service
types MUST NOT be categorized using the ws-i-org:conformsTo:2002_12
taxonomy and a categorization of "http://ws-i.org/profiles/basic/1.0".
SOAP::WSDL does not publish web services yet.
=head2 R3004
REGDATA of type uddi:tModel MUST be constructed so that the conformance
claim it makes is consistent with the conformance claim made by the
wsdl:binding to which it refers.
SOAP::WSDL does not publish web services yet.
=head2 R1000
When a MESSAGE contains a soap:Fault element, that element MUST NOT have element
children other than faultcode, faultstring, faultactor and detail.
SOAP::WSDL does not send fault messages. However, SOAP::WSDL::SOAP::Typelib::Fault11
complies to this rule.
=head2 R1001
When a MESSAGE contains a soap:Fault element its element children MUST be
unqualified.
SOAP::WSDL does not send fault messages. However, SOAP::WSDL::SOAP::Typelib::Fault11
complies to this rule.
=head2 R1004
When a MESSAGE contains a faultcode element the content of that element
SHOULD be one of the fault codes defined in SOAP 1.1 or a namespace qualified
fault code.
SOAP::WSDL does not send fault messages. However, the fault issued by
SOAP::WSDL::Deserializer comply to this rule.
=head2 R1031
When a MESSAGE contains a faultcode element the content of that element SHOULD
NOT use of the SOAP 1.1 "dot" notation to refine the meaning of the Fault.
SOAP::WSDL does not send fault messages. However, the fault issued by
SOAP::WSDL::Deserializer comply to this rule.
=head2 R1013
A MESSAGE containing a soap:mustUnderstand attribute MUST only use the lexical
forms "0" and "1".
SOAP::WSDL does not add soap:mustUnderstand attributes.
=head2 R1025
A RECEIVER MUST handle messages in such a way that it appears that all
checking of mandatory header blocks is performed before any actual
processing.
SOAP::WSDL does not check mandatory header blocks yet.
=head2 R1027
A RECEIVER MUST generate a "soap:MustUnderstand" fault when a message
contains a mandatory header block (i.e., one that has a soap:mustUnderstand
attribute with the value "1") targeted at the receiver (via soap:actor)
that the receiver does not understand.
SOAP::WSDL does not check mandatory header blocks yet.
=head2 R1120
An INSTANCE MAY use the HTTP state mechanism ("Cookies").
SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies..
=head2 R1122
An INSTANCE using Cookies SHOULD conform to RFC2965.
SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies..
=head2 R1121
An INSTANCE SHOULD NOT require consumer support for Cookies in order to
function correctly
SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies.
=head2 R1123
The value of the cookie MUST be considered to be opaque by the CONSUMER.
SOAP::WSDL::Server::CGI does not use cookies. A web server running a
SOAP::WSDL::Server::CGI script may use cookies.
=head2 R2028
A DESCRIPTION using the WSDL namespace (prefixed "wsdl" in this Profile)
MUST be valid according to the XML Schema found at
"http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd".
See 2029.
=head2 R2029
A DESCRIPTION using the WSDL SOAP binding namespace (prefixed "soapbind"
in this Profile) MUST be valid according to the XML Schema found at
"http://schemas.xmlsoap.org/wsdl/soap/2003-02-11.xsd".
Although the Profile requires WSDL descriptions to be Schema valid,
it does not require consumers to validate WSDL documents.
It is the responsibility of a WSDL document's author to assure that it
is Schema valid.
=head2 R2001
A DESCRIPTION MUST only use the WSDL "import" statement to import another
WSDL description.
SOAP::WSDL (partially) supports the wsdl:import statement. The wsdl:include
statement is not supported.
It's the responsibility of the WSDL author to use only the wsdl:import
statement for importing WSDL descriptions.
=head2 R2002
To import XML Schema Definitions, a DESCRIPTION MUST use the XML Schema
"import" statement.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2003
A DESCRIPTION MUST use the XML Schema "import" statement only within the
xsd:schema element of the types section.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2004
A DESCRIPTION MUST NOT use the XML Schema "import" statement to import a
Schema from any document whose root element is not "schema" from the
namespace "http://www.w3.org/2001/XMLSchema".
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2009
An XML Schema directly or indirectly imported by a DESCRIPTION MAY include
the Unicode Byte Order Mark (BOM).
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2010
An XML Schema directly or indirectly imported by a DESCRIPTION MUST
use either UTF-8 or UTF-16 encoding.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2011
An XML Schema directly or indirectly imported by a DESCRIPTION MUST use
version 1.0 of the eXtensible Markup Language W3C Recommendation.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2007
A DESCRIPTION MUST specify a non-empty location attribute on the wsdl:import
element.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2022
When they appear in a DESCRIPTION, wsdl:import elements MUST precede all
other elements from the WSDL namespace except wsdl:documentation.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2023
When they appear in a DESCRIPTION, wsdl:types elements MUST precede all
other elements from the WSDL namespace except wsdl:documentation and
wsdl:import.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R4004
A DESCRIPTION MUST use version 1.0 of the eXtensible Markup Language W3C
Recommendation.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2005
The targetNamespace attribute on the wsdl:definitions element of a
description that is being imported MUST have same the value as the
namespace attribute on the wsdl:import element in the importing
DESCRIPTION.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2021
The wsdl:documentation element MAY occur as a child of the wsdl:part
element in a DESCRIPTION.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2025
A DESCRIPTION containing WSDL extensions MUST NOT use them to
contradict other requirements of the Profile.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2026
A DESCRIPTION SHOULD NOT include extension elements with a wsdl:required
attribute value of "true" on any WSDL construct (wsdl:binding,
wsdl:portType, wsdl:message, wsdl:types or wsdl:import) that claims
conformance to the Profile.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2101
A DESCRIPTION MUST NOT use QName references to elements in namespaces that
have been neither imported, nor defined in the referring WSDL document.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2102
A QName reference to a Schema component in a DESCRIPTION MUST use the
namespace defined in the targetNamespace attribute on the xsd:schema
element, or to a namespace defined in the namespace attribute on an
xsd:import element within the xsd:schema element.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2105
All xsd:schema elements contained in a wsdl:types element of a
DESCRIPTION MUST have a targetNamespace attribute with a valid and non-null
value, UNLESS the xsd:schema element has xsd:import and/or
xsd:annotation as its only child element(s).
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2110
In a DESCRIPTION, array declarations MUST NOT extend or restrict the
soapenc:Array type.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2111
In a DESCRIPTION, array declarations MUST NOT use wsdl:arrayType attribute
in the type declaration.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2112
In a DESCRIPTION, array declaration wrapper elements SHOULD NOT be named
using the convention ArrayOfXXX.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2201
A document-literal binding in a DESCRIPTION MUST, in each of its
soapbind:body element(s), have at most one part listed in the parts
attribute, if the parts attribute is specified.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2210
If a document-literal binding in a DESCRIPTION does not specify the parts
attribute on a soapbind:body element, the corresponding abstract
wsdl:message MUST define zero or one wsdl:parts.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2202
A wsdl:binding in a DESCRIPTION MAY contain soapbind:body element(s) that
specify that zero parts form the soap:Body.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2203
An rpc-literal binding in a DESCRIPTION MUST refer, in its soapbind:body
element(s), only to wsdl:part element(s) that have been defined using the
type attribute.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2211
A MESSAGE described with an rpc-literal binding MUST NOT have the xsi:nil
attribute with a value of "1" or "true" on the part accessors.
=head2 R2207
A wsdl:message in a DESCRIPTION MAY contain wsdl:parts that use the
elements attribute provided those wsdl:parts are not referred to by a
soapbind:body in an rpc-literal binding.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2204
A document-literal binding in a DESCRIPTION MUST refer, in each of its
soapbind:body element(s), only to wsdl:part element(s) that have been
defined using the element attribute.
SOAP::WSDL has no means of generating WSDL definitions.
Note: SOAP::WSDL requires that a DESCRIPTION confirms to these rules.
=head2 R2208
A binding in a DESCRIPTION MAY contain soapbind:header element(s) that
refer to wsdl:parts in the same wsdl:message that are referred to by its
soapbind:body element(s).
=head2 R2205
A wsdl:binding in a DESCRIPTION MUST refer, in each of its soapbind:header,
soapbind:headerfault and soapbind:fault elements, only to wsdl:part
element(s) that have been defined using the element attribute.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2209
A wsdl:binding in a DESCRIPTION SHOULD bind every wsdl:part of a
wsdl:message in the wsdl:portType to which it refers to one of
soapbind:body, soapbind:header, soapbind:fault or soapbind:headerfault.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2206
A wsdl:message in a DESCRIPTION containing a wsdl:part that uses the
element attribute MUST refer, in that attribute, to a global element
declaration.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2302
A DESCRIPTION MAY use the parameterOrder attribute of an
wsdl:operation element to indicate the return value and method
signatures as a hint to code generators.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2303
A DESCRIPTION MUST NOT use Solicit-Response and Notification type
operations in a wsdl:portType definition.
=head2 R2304
A wsdl:portType in a DESCRIPTION MUST have operations with distinct
values for their name attributes.
Note: SOAP::WSDL requires that a DESCRIPTION confirms to these rules.
=head2 R2305
A wsdl:portType in a DESCRIPTION MUST be constructed so that the
parameterOrder attribute, if present, omits at most 1 wsdl:part
from the output message.
=head2 R2306
A wsdl:message in a DESCRIPTION MUST NOT specify both type and
element attributes on the same wsdl:part.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2401
A wsdl:binding element in a DESCRIPTION MUST use WSDL SOAP
Binding as defined in WSDL 1.1 Section 3.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2701
The wsdl:binding element in a DESCRIPTION MUST be constructed so
that its soapbind:binding child element specifies the transport
attribute.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2702
A wsdl:binding element in a DESCRIPTION MUST specify the HTTP
transport protocol with SOAP binding. Specifically, the transport
attribute of its soapbind:binding child MUST have the value
"http://schemas.xmlsoap.org/soap/http".
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2705
A wsdl:binding in a DESCRIPTION MUST use either be a rpc-literal
binding or a document-literal binding.
SOAP::WSDL has no means of generating WSDL definitions.
Note: SOAP::WSDL does not support rpc-literal bindings yet.
=head2 R2706
A wsdl:binding in a DESCRIPTION MUST use the value of "literal"
for the use attribute in all soapbind:body, soapbind:fault,
soapbind:header and soapbind:headerfault elements.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2707
A wsdl:binding in a DESCRIPTION that contains one or more
soapbind:body, soapbind:fault, soapbind:header or soapbind:headerfault
elements that do not specify the use attribute MUST be interpreted as
though the value "literal" had been specified in each case.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2709
A wsdl:portType in a DESCRIPTION MAY have zero or more wsdl:bindings
that refer to it, defined in the same or other WSDL documents.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2710
The operations in a wsdl:binding in a DESCRIPTION MUST result in wire
signatures that are different from one another.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2711
A DESCRIPTION SHOULD NOT have more than one wsdl:port with the same
value for the location attribute of the soapbind:address element.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2714
For one-way operations, an INSTANCE MUST NOT return a HTTP response
that contains a SOAP envelope. Specifically, the HTTP response
entity-body must be empty.
SOAP::WSDL does not act as a server, yet.
=head2 R2727
For one-way operations, a CONSUMER MUST NOT interpret a successful
HTTP response status code (i.e., 2xx) to mean the message is valid
or that the receiver would process it.
SOAP::WSDL regards a successful HTTP status code for a one-way operation
as an acknowledgement of the RECEIVER having receive (not processed!)
the message.
SOAP::WSDL makes no assumptions about the processing of SOAP messages,
but higher level clients may do.
=head2 R2716
A document-literal binding in a DESCRIPTION MUST NOT have the
namespace attribute specified on contained soapbind:body,
soapbind:header, soapbind:headerfault and soapbind:fault elements.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2717
An rpc-literal binding in a DESCRIPTION MUST have the namespace attribute
specified, the value of which MUST be an absolute URI, on
contained soapbind:body elements.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2726
An rpc-literal binding in a DESCRIPTION MUST NOT have the namespace
attribute specified on contained soapbind:header, soapbind:headerfault
and soapbind:fault elements.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2718
A wsdl:binding in a DESCRIPTION MUST have the same set of
wsdl:operations as the wsdl:portType to which it refers
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2719
A wsdl:binding in a DESCRIPTION MAY contain no soapbind:headerfault
elements if there are no known header faults.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2740
A wsdl:binding in a DESCRIPTION SHOULD contain a soapbind:fault describing
each known fault.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2741
A wsdl:binding in a DESCRIPTION SHOULD contain a soapbind:headerfault
describing each known header fault.
SOAP::WSDL has no means of generating WSDL definitions.
=head2 R2743
A MESSAGE MAY contain the details of a header processing related fault in a
SOAP header block that is not described by a wsdl:headerfault element in the
corresponding WSDL description.
=head2 R2720
A wsdl:binding in a DESCRIPTION MUST use the attribute named part with a
schema type of "NMTOKEN" on all contained soapbind:header and
soapbind:headerfault elements.
=head2 R2749
A wsdl:binding in a DESCRIPTION MUST NOT use the attribute named parts on
contained soapbind:header and soapbind:headerfault elements.
=head2 R2721
A wsdl:binding in a DESCRIPTION MUST have the name attribute specified on all
contained soapbind:fault elements.
=head2 R2754
In a DESCRIPTION, the value of the name attribute on a soapbind:fault element
MUST match the value of the name attribute on its parent wsdl:fault element.
=head2 R2722
A wsdl:binding in a DESCRIPTION MAY specify the use attribute on contained
soapbind:fault elements.
=head2 R2723
If in a wsdl:binding in a DESCRIPTION the use attribute on a contained
soapbind:fault element is present, its value MUST be "literal".
=head2 R2728
A wsdl:binding in a DESCRIPTION that omits the use attribute on a contained
soapbind:fault element MUST be interpreted as though use="literal" had been
specified.
=head2 R2724
If an INSTANCE receives a message that is inconsistent with its WSDL
description, it SHOULD generate a soap:Fault with a faultcode of "Client",
unless a "MustUnderstand" or "VersionMismatch" fault is generated.
=head2 R2725
If an INSTANCE receives a message that is inconsistent with its WSDL
description, it MUST check for "VersionMismatch", "MustUnderstand" and
"Client" fault conditions in that order.
=head2 R2729
A MESSAGE described with an rpc-literal binding that is a response message
MUST have a wrapper element whose name is the corresponding wsdl:operation
name suffixed with the string "Response".
=head2 R2735
A MESSAGE described with an rpc-literal binding MUST place the part accessor
elements for parameters and return value in no namespace.
=head2 R2737
A MESSAGE described with an rpc-literal binding MUST namespace qualify the
children of part accessor elements for the parameters and the return value
with the targetNamespace in which their types are defined.
=head2 R2738
A MESSAGE MUST include all soapbind:headers specified on a wsdl:input or
wsdl:output of a wsdl:operation of a wsdl:binding that describes it.
=head2 R2739
A MESSAGE MAY contain SOAP header blocks that are not described in the
wsdl:binding that describes it.
=head2 R2753
A MESSAGE containing SOAP header blocks that are not described in the
appropriate wsdl:binding MAY have the mustUnderstand attribute on such SOAP
header blocks set to '1'.
=head2 R2751
The order of soapbind:header elements in soapbind:binding sections of a
DESCRIPTION MUST be considered independent of the order of SOAP header blocks
in the message.
=head2 R2752
A MESSAGE MAY contain more than one instance of each SOAP header block for
each soapbind:header element in the appropriate child of soapbind:binding in
the corresponding description.
=head2 R2801
A DESCRIPTION MUST use XML Schema 1.0 Recommendation as the basis of user
defined datatypes and structures.
=head2 R3100
REGDATA of type uddi:bindingTemplate representing a conformant INSTANCE MUST
contain the uddi:accessPoint element.
=head2 R3002
REGDATA of type uddi:tModel representing a conformant Web service type MUST
use WSDL as the description language.
=head2 R3003
REGDATA of type uddi:tModel representing a conformant Web service type MUST be
categorized using the uddi:types taxonomy and a categorization of "wsdlSpec".
=head2 R3010
REGDATA of type uddi:tModel representing a conformant Web service type MUST
follow V1.08 of the UDDI Best Practice for Using WSDL in a UDDI Registry.
=head2 R3011
The wsdl:binding that is referenced by REGDATA of type uddi:tModel MUST itself
conform to the Profile.
=head2 R5001
If an INSTANCE requires the use of HTTPS, the location attribute of the
soapbind:address element in its wsdl:port description MUST be a URI whose
scheme is "https"; otherwise it MUST be a URI whose scheme is "http".
SOAP::WSDL has no means of generating WSDL definitions.
=head1 LICENSE AND COPYRIGHT
This file contains quotes from
L. To these
quotes, the legal notice from the document source applies.
Rest of this file: Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 562 $
$LastChangedBy: kutterma $
$Id: WS_I.pod 562 2008-02-22 20:32:17Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/WS_I.pod $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/XSD.pod 0000444 0001750 0001750 00000034021 11203370730 017163 0 ustar martin martin =pod
=head1 NAME
SOAP::WSDL::Manual::XSD - SOAP::WSDL's XML Schema implementation
=head1 DESCRIPTION
SOAP::WSDL's XML Schema implementation translates XML Schema definitions into
perl classes.
Every top-level type or element in a XML schema is translated into a perl
class (usually in it's own file).
Atomic types are either directly included in the class of their parent's
node, or as sub-package in their parent class' file.
While the implementation is still incomplete, it covers the XML schema
definitions used by most object mappers.
=head1 USAGE
You can use SOAP::WSDL::XSD based classes just like any perl class - you may
instantiate it, inherit from it etc.
You should be aware, that SOAP::WSDL::XSD based classes are inside-out
classes using Class::Std::Fast, though - things you would expect from
hash-based classes like using the blessed hash ref as data storage won't work.
Moreover, most all SOAP::WSDL::XSD::Typelib based classes override
Class::Std::Fast's default constructor for speed - you should not expect
BUILD or START methods to work, unless you call them yourself (or define a new
constructor).
All SOAP::WSDL::XSD based complexType classes allow a hash ref matching their
data structure as only parameter to new(). You may mix hash and list refs and
objects in the structure passed to new - as long as the structure matches, it
will work fine.
All SOAP::WSDL::XSD based simpleType (and builtin) classes accept a single
hash ref with the only key "value" and the value to be set as value.
=head2 Conversions
=head3 Array dereference
All SOAP::WSDL::XSD based classes overload arrayification - that is being
accessed as a list ref - with a method returning [ $self ].
This means that you can safely use the results of get_ELEMENT calls on
complexTypes as list refs (you'll have to check for definedness, though -
see L
for details.
To iterate over a (potential) list of child elements just do the following:
if (defined $obj->get_ELEMENT()) {
for (@{ $obj->get_ELEMENT() }) {
...
}
}
This is especially useful in mini-languages like
L, where you could say
<%IF_DEFINED obj.get_ELEMENT %>
<%LOOP obj.get_ELEMENT %>
...
<%/LOOP>
<%IF%>
Note that this does not work in HTML::Template::Compiled yet - the code
generated for the template checks UNIVERSAL::isa instead of dereferencing.
There's a ticket open in HTC to solve the issue.
=head3 as_hash_ref
SOAP::WSDL::XSD::Typelib::ComplexType based objects have a method as_hash_ref,
which returns the object's content as a hash reference.
This can be convenient for cloning:
my $class = ref $old;
my $clone = $class->new( $old->as_hash_ref() );
To convert from one type to another, you
can just say
my $new = MyTypes::NewType->new( $old->as_hash_ref() );
Of course this will only work if MyTypes::NewType has a superset of the old
object class' elements.
Note that XML attribute data is not included in the hash ref output yet.
=head1 HOW IT WORKS
=head2 Base classes
SOAP::WSDL::XSD provides a set of base classes for the construction of XML
schema defined type classes.
=head3 Builtin types
SOAP::WSDL::XSD provides classes for all builtin XML Schema datatypes.
For a list and reference on these classes, see
SOAP::WSDL::XSD::Typelib::Builtin.
=head3 Derivation classes
For derivation by list, the list derivation class
SOAP::WSDL::XSD::Typelib::Builtin::list exists.
Derivation by restriction is handled without the help of additional classes.
=head3 Element construction class
For the construction of element classes, the element superclass
SOAP::WSDL::XSD::Typelib::Element exists. All elements are ultimately derived
from this class. Elements may inherit from type classes, too - see
L for details.
=head3 complexType construction class
For the construction of complexType classes, the construction class
SOAP::WSDL::XSD::Typelib::ComplexType is provided. It provides a __factory
method for placing attributes in generated classes, and generating
appropriate setter/getter accessors.
The setters are special: They handle complex data structures of any type
(meaning hash refs, list refs and objects, and any combination of them), as
long as their structure matches the expected structure.
=head1 TRANSLATION RULES
=head2 element
TODO add more elaborate description
=head3 element with type attribute
Elements defined by referencing a builtin or user defined type inherit
from SOAP::WSDL::XSD::Typelib::Element and from the corresponding type class.
Element Type
base class class
^ ^
| |
------------
|
Element type="" class
=head3 element with ref attribute
Elements defined by referencing another element inherit from the
corresponding element class.
referenced Element class
^
|
Element ref="" class
=head3 element with atomic simpleType
Elements defined by a atomic simpleType from
SOAP::WSDL::XSD::Typelib::Element and from the base type of the atomic type.
Element atomic Type
base class base class
^ ^
| |
--------------
|
element simpleType class
=head3 element with atomic complexType
Elements defined with a atomic complexType inherit from
SOAP::WSDL::XSD::Typelib::Element and from
SOAP::WSDL::XSD::Typelib::ComplexType.
Element complexType
base class base class
^ ^
| |
--------------
|
element complexType class
=head2 complexType
TODO add more elaborate description
Some content models are not implemented yet. The content models
implemented are described below.
=head3 complexType with "all" variety
Complex types with "all" variety inherit from
SOAP::WSDL::XSD::Typelib::ComplexType, and call it's factory method for
creating fields and accessors/mutators for the complexType's elements.
All element's type classes are loaded. Complex type classes have a "has a"
relationship to their element fields.
Element fields may either be element classes (for element ref="") or type
classes (for element type=""). No extra element classes are created for
a complexType's elements.
complexType
base class
^
|
complexType all
---------------- has a
element name="a" ------------> Element or type class object
element name="b" ------------> Element or type class object
The implementation for all does enforce the order of elements as described
in the WSDL, even though this is not required by the XML Schema
specification.
=head3 complexType with "sequence" variety
The implementation of the "sequence" variety is the same as for all.
=head3 complexType with "choice" variety
The implementation for choice currently is the same as for all - which means,
no check for occurrence are made.
=head3 complexType with complexContent content model
Note that complexType classes with complexContent content model don't exhibit
their type via the xsi:type attribute yet, so they currently cannot be used
as a replacement for their base type.
SOAP::WSDL's XSD deserializer backend does not recognize the xsi:type=""
attribute either yet.
=over
=item * restriction variety
ComplexType classes with restriction variety inherit from their base type.
No additional processing or content checking is performed yet.
complexType
base type class
^
|
complexType
restriction
=item * extension variety
ComplexType classes with extension variety inherit from the XSD base
complexType class and from their base type.
Extension classes are checked for (re-)defining all elements of their parent
class.
Note that a derived type's elements (=properties) overrides the getter /
setter methods for all inherited elements. All object data is stored in the
derived type's class, not in the defining class (See L for a
discussion on inside out object data storage).
No additional processing or content checking is performed yet.
complexType complexType
base class base type class
^ ^
| |
-----------------
|
complexType
extension
=back
=head2 SimpleType
TODO add more elaborate description
Some derivation methods are not implemented yet. The derivation methods
implemented are described below.
=head3 Derivation by list
Derivation by list is implemented by inheriting from both the base type and
SOAP::WSDL::XSD::Typelib::XSD::list.
=head3 Derivation by restriction
Derivation by restriction is implemented by inheriting from a base type and
applying the required restrictions.
=head1 FACETS
XML Schema facets are not implemented yet.
They will probably implemented some day by putting constant methods into
the correspondent classes.
=head2 Attributes
The attribute set for a XML element (derived from anySimpleType or
complexType) is implemented as a sub-package of the element derived from
SOAP::WSDL::XSD::Typelib::AttributeSet.
The sub-package is named as the corresponding type or element package,
suffixed with C. The suffix "XmlAttr" has carefully been chosen to
avoid potential naming clashes: The name XmlAttr cannot be included as
element or type name in XML schemas - the XML standard bans the use of names
starting with "xml" (case-insensitive).
All XML attributes for a XML element are set- and retrievable via the method
C. The name is chosen to allow mimicing SOAP::Lite's behaviour, which
allows setting a SOAP::Data object's attributes via C.
my $attrSet = $obj->attr();
$obj->attr({
whitespace => 'preserve',
nillable => 1,
});
SOAP::WSDL::XSD::Typelib::AttributeSet is derived from
SOAP::WSDL::XSD::Typelib::ComplexType with content model C. The
individual attributes can be set and retrieved via the respective set_FOO /
get_FOO methods.
The C method provides auto-vivification: An xml object's attribute set
is instantiated when accessed.
Auto-vivification is only triggered if there actually B a set of
attributes for the class/object in question, so you may want to test
whether the result of ->attr is defined:
my $attr = $unknownObject->attr();
if (defined($attr)) {
$unknownObject->attr({
some => 'value',
});
}
=head2 group
CAVEAT: Group resolution is not implemented yet.
XML Schema Group definitions are just treated as aliases that can be
inserted in complexType definitions by referencing them. That is, there's
no difference between a complexType with simpleContent and a sequence of
three elements, and a complexType with simpleContent referencing a group
containing the same sequence of elements.
=head1 CAVEATS
=over
=item * START and BUILD are not being called
In contrast to "normal" Class::Std::Fast based objects, the classes of the
SOAP::WSDL::XSD::Typelib:: hierarchy (and all type and element classes
generated by SOAP::WSDL) override Class::Std's constructor for performance
reasons.
If you inherit from such a class and place a START or BUILD method in it,
it will not get called - at least not unless you place something like this
at the top of you code:
use Class::Std::Fast::Storable;
In this case, Class::Std::Fast::Storable will export a new() method into your
class, which in turn calls START and BUILD.
The constructors of all SOAP::WSDL::XSD::Typelib:: classes don't !
=back
=head1 BUGS AND LIMITATIONS
The following XML Schema declaration elements are not supported yet:
=head2 XML Schema elements partially supported
=head3 Type definition elements
=over
=item * simpleContent
simpleContent is only supported with a restriction or extension with a C
attribute. simpleContent declarations deriving from a atomic type are not
supported (yet).
=back
=head3 Inclusion elements
=over
=item * import
The import inclusion element requires the schemaLocation attribute for
resolving the XML schema to import. Support for the import element is
implemented in L,
so alternative parsers may or may not support the import element.
L keeps track of
included schemas and prevents import loops.
=back
=head3 Facets
The following XML Schema declaration elements are supported, but have no
effect yet.
=over
=item * enumeration
=item * fractionDigits
=item * lenght
=item * maxExclusive
=item * maxInclusiove
=item * maxLength
=item * minExclusive
=item * minInclusive
=item * minLength
=item * pattern
=item * totalDigits
=item * whitespace
=back
=head2 XML Schema elements not implemented
=head3 Declaration elements
=over
=item * notation
=back
=head3 Content model definition elements
=over
=item * any
The horror of each XML schema implementation: Just anything...
C declarations are not supported yet.
=item * anyAttribute
=item * attributeGroup
C declarations actually just are macros for XML Schema
writers: Including an attributeGroup in a declaration has the same effect
as including all attributes in the group.
Just not implemented yet.
=item * group
The group definition element is not supported yet.
=back
=head3 Identity definition elements
These declaration elements don't declare XML elements, but apply identity
constraints. They have no effect yet.
=over
=item * field
=item * key
=item * keyref
=item * selector
=item * unique
=back
=head3 Inclusion elements
=over
=item * include
Use of the include inclusion element is forbidden by the WS-I basic profile.
It is not supported (yet).
=item * redefine
Not supported (yet).
=back
=head3 * Documentation elements
=over
=item * appinfo
The appinfo documentation element is ignored.
=back
=head1 LICENSE
Copyright 2007,2008 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 390 $
$LastChangedBy: kutterma $
$Id: Client.pm 390 2007-11-16 22:18:32Z kutterma $
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/CodeFirst.pod 0000444 0001750 0001750 00000005251 11203370730 020412 0 ustar martin martin =pod
=head1 Writing Code-First Web Services with SOAP::WSDL
B.
=head2 How Data Class definitions could look like
=head3 Moose
Of course SOAP::WSDL could (and probably should) just use Moose - it provides the full
Metaclass Framework needed for generating Schemas from class definitions.
However, Moose is way too powerful for building (just) simple Data Transfer Objects which
can be expressed in XML.
With Moose, a class could look like this:
package MyElements::GenerateBarCode;
use Moose;
has 'xmlns' =>
is => 'ro',
default => 'http://webservicex.net';
has 'xmlname' =>
is => 'ro',
default => 'GenerateBarCode';
has 'BarCodeParam' =>
is => 'rw',
type => 'MyTypes::BarCodeData';
has 'BarCodeText' =>
is => 'rw',
type => 'String';
1;
This is - despite the condensed syntax - a lot of line noise.
=head3 Native SOAP::WSDL
SOAP::WSDL::XSD::Typelib::ComplexType (should) provide a simple setup method allowing a even shorter
description (and offering the additional performance boost SOAP::WSDL has over Moose):
package MyElements::GenerateBarCode;
use strice; use warnings;
use SOAP::WSDL::XSD::Typelib::Element;
use SOAP::WSDL::XSD::Typelib::ComplexType;
_namespace 'http://webservicex.net'; # might be better in the SOAP server interface
_name 'GenerateBarCode';
_elements
BarCodeParam => 'MyTypes::BarCodeData',
BarCodeText => 'string';
This would result in the following XML Schema (inside a schema with the namespace
"http://webservicex.net" - the namespaces could even be declared outside the DTO classes.
=head2 Interface definitions
Perl does not have the concept of interfaces. However, Moose provides Roles, which can be used for defining
interfaces.
However, it's not really necessary to define a interface Interface (in the sense of a Jave interface) -
a interface class is sufficient.
Subroutine attributes could be used for providing additional information - attributes in perl are much like
annotations in Java
A interface could look like this:
package MyServer::BarCode;
use strict; use warnings;
use SOAP::WSDL::Server::CodeFirst;
sub generateBarCode :WebMethod(name=
return=
body=) {
my ($self, $body, $header) = @_;
my $result = MyElements::GenerateBarcodeResponse->new();
return $result;
};
1;
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/FAQ.pod 0000444 0001750 0001750 00000012304 11203370730 017134 0 ustar martin martin =pod
=head1 NAME
SOAP::WSDL::Manual::FAQ - Frequently Asked Questions (and answers)
=head1 Development status
=head2 Can I use SOAP::WSDL in a production environment?
Yes. SOAP::WSDL is used in production environments. You should - as always -
apply common sense and take appropriate safety measures, especially if
running SOAP::WSDL as a server.
=head2 Can I throw the WSDL away after generating?
Please don't. Future versions of SOAP::WSDL may require you to re-generate
interfaces in order to use them.
=head1 SOAP/WSDL Version and message styles
=head2 Which SOAP / WSDL versions does SOAP::WSDL support?
SOAP1.1 and WSDL1.1. SOAP1.2 and WSDL2 are not supported yet.
=head2 Which SOAP message Styles are supported?
document/literal.
The message / encoding styles rpc/encoded and rpc/literal are not supported
(rpc/literal is hardly used).
rpc/literal is not implemented yet.
Unfortunately, SOAP::WSDL can't even parse many rpc/encoded WSDL definitions,
and thus cannot inform you about unsupported message styles in some
situations.
=head1 Aren't rpc variants bad anyway?
No. They can be as well-defined and useful as the document/literal variant.
The difference between rpc and document is that rpc SOAP messages have an
additional container named after the remote procedure called.
rpc/literal is RPC with named parameters, whereas rpc/encoded corresponds to
positional parameters.
rpc/encoded is prohibited by the WS-I Basic Profile. However, rpc/encoded
is still popular, especially for scripting languages like perl, python or php.
You should probably use L for rpc/encoded web services.
All the document/rpc literal/encoded discussion will cede with WSDL2.0: These
variants are dropped in favour of an extensible operation style mechanism.
=head1 XML Parsing / Generation
=head2 Does SOAP::WSDL support namespaces?
Well, sort of. SOAP::WSDL can use WSDL definitions containing namespaces,
and emits SOAP messages with namespace information.
Its SOAP message parser however, is not namespace sensitive but uses the
pre-shared information from the WSDL for looking up what each XML node means.
SOAP::WSDL can parse SOAP messages including namespace informations up to the
point where equally named elements from different namespaces may appear at
the same position.
This is a long-standing feature request and will eventually be resolved.
=head2 Validation
=head3 Does SOAP::WSDL perform XML Schema Validation?
No, SOAP::WSDL does not perform XML Schema Validation. It does, however,
enforce the correct structure on both XML and perl data. Occurrence, ordering,
value-spaces, and identity constraints are not checked.
=head3 Does SOAP::WSDL perform XML Validation?
No, SOAP::WSDL does not perform XML Validation (that is, validation against
a DTD). WS-I prohibits the use of DTDs in WSDL definitions.
=head3 Isn't validation required for XML?
No. The XML Specification does not require validation from XML processors.
It states how validating and non-validating parsers must react on errors.
Note: Validation in the context of (only) XML actually means DTD validation.
=head3 And doesn't XML Schema require validation?
The XML Schema specification requires conformant XML Schema processors to
be able to validate XML Schema constraints.
SOAP::WSDL is not a conformant XML Schema processor in this sense, as it does
not validate all XML Schema constraints.
=head3 And does SOAP require XML Schema Validation?
No. The SOAP1.1 note does not say anything about validation. The SOAP1.2.
specification explicitly states that XML Schema validation is not required
for the SOAP envelope, and that applications may decide whether they need
XML Schema Validation for the SOAP payload or not.
The WSDL 1.1. specification does not mandate XML Schema validation. It does
actually not even mandate the use of XML Schema for type definitions.
=head2 Can SOAP::WSDL parse SOAP message fragments?
No. SOAP::WSDL can parse neither well-formed nor not-well-formed
SOAP message chunks.
=head1 Persistence
=head2 Can I use Storable to freeze/thaw SOAP::WSDL's objects?
You can freeze almost all of SOAP::WSDL's objects. The only exceptions are
the objects used in parsing WSDL definitions itself - they cannot be frozen.
Note that freezing/thawing inside-out objects comes with a performance penalty
and is at around the speed of XML generation/parsing.
=head1 Performance and memory consumption
=head2 How fast is SOAP::WSDL?
As of this writing, SOAP::WSDL is the fastest SOAP Client toolkit for perl
available on CPAN. There are no published server benchmarks yet.
If you need extra speed you can try SOAP::WSDL_XS available
from SOAP::WSDL's subversion repository at:
https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL_XS/trunk
Note however that SOAP::WSDL_XS is not very mature yet and only suitable for
use in trusted environments - you definitely should not use it on a public
internet SOAP server yet.
Note further that SOAP::WSDL's inside-out objects come with a big performance
penalty when freezing/thawing them with Storable.
=head2 There's a lot of perl modules generated. Don't they eat up all my
memory?
SOAP::WSDL usually uses a bit more memory than SOAP::Lite, but less than
XML::Compile. Test if in question.
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/Glossary.pod 0000444 0001750 0001750 00000005572 11203370730 020341 0 ustar martin martin =head1 NAME
SOAP::WSDL::Manual::Glossary - Those acronyms and stuff
=head1 Glossary
=head2 web service
Web services are RPC (Remote Procedure Call) interfaces accessible via
some internet protocol, typically via HTTP(S).
=head2 SOAP
SOAP is (was - since 1.2 the name "SOAP" has no meaning any more) an acronym
for Simple Object Access Protocol.
SOAP is a W3C recommendation. The latest version of the SOAP specification
may be found at L.
SOAP defines a protocoll for message exchange between applications.
The most popular usage is to use SOAP for remote procedure calls (RPC).
While one of the constituting aspects of a web service is its
reachability via some internet protocol, you might as well define
SOAP services accessible via postcards.
Despite it's former name, SOAP has nothing more to do with objects than
cars have with pets - SOAP messages may, but not necessarily do
carry objects, very much like your car may, but does not need to
carry your pet.
=head2 WSDL
WSDL is an acronym for Web Services Description Language.
WSDL is a W3C recommendation. The latest version of the WSDL specification
may be found at L.
WSDL defines a XML-based language for describing web service interfaces,
including SOAP interfaces.
=head2 WS-I
WS-I (Web Services Interoperability Organization) is an open industry
organisation chartered to promote Web service interoperability across
platforms, operating systems, and programming languages.
WS-I publishes profiles, which provide implementation guidelines for
how related Web services specifications should be used together for
best interoperability. To date, WS-I has finalized the Basic Profile,
Attachments Profile and Simple SOAP Binding Profile.
SOAP::WSDL aims at complying to the WS-I Basic Profile (but does not
implement full support yet).
=head2 SOAP message styles
=head3 rpc
Meant for transporting a RPC message. All contents of the SOAP body are
put into a top-level node named equal to the SOAP operation.
WS-I Basic Profile allows the use of rpc message style.
SOAP::WSDL does not support rpc message style yet.
SOAP::Lite supports rpc message style only.
=head3 document
Meant for transporting arbitrary content. No additional nodes are inserted
between the SOAP body and the actual content.
WS-I Basic Profile allows the use of document message style.
=head2 SOAP encoding styles
=head3 encoded
=head3 literal
=head1 LICENSE AND COPYRIGHT
Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same
terms as perl itself.
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 391 $
$LastChangedBy: kutterma $
$Id: Glossary.pod 391 2007-11-17 21:56:13Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/Glossary.pod $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/Parser.pod 0000444 0001750 0001750 00000016010 11203370730 017757 0 ustar martin martin =pod
=head1 NAME
SOAP::WSDL::Manual::Parser - How SOAP::WSDL parses XML messages
=head1 Which XML message does SOAP::WSDL parse ?
Naturally, there are two kinds of XML documents (or messages) SOAP::WSDL has
to parse:
=over
=item * WSDL definitions
=item * SOAP messages
=back
There are different parser implementations available for SOAP messages and
WSDL definitions.
=head1 WSDL definitions parser
=head2 SOAP::WSDL::Expat::WSDLParser
A parser for WSDL definitions based on L.
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
my $wsdl = $parser->parse_file( $filename );
The WSDL parser creates a tree of perl objects, whose root is a
L element.
=head1 SOAP messages parser
=head2 SOAP::WSDL::Expat::MessageParser
L converts
SOAP messages to SOAP::WSDL::XSD object trees.
It uses a class resolvers for finding out which class
a particular XML element should be of, and type libs containing these classes.
=head3 Creating a class resolver
The easiest way for creating a class resolver is to run SOAP::WSDL's generator.
See L.
The class resolver must implement a class method "get_class", which is passed
a list ref of the current element's XPath (relative to Body), split by /.
This method must return a class name appropriate for a XML element.
A class resolver package might look like this:
package ClassResolver;
my %class_list = (
'EnqueueMessage' => 'Typelib::TEnqueueMessage',
'EnqueueMessage/MMessage' => 'Typelib::TMessage',
'EnqueueMessage/MMessage/MRecipientURI' => 'SOAP::WSDL::XSD::Builtin::anyURI',
'EnqueueMessage/MMessage/MMessageContent' => 'SOAP::WSDL::XSD::Builtin::string',
);
sub new { return bless {}, 'ClassResolver' };
sub get_class {
my $name = join('/', @{ $_[1] });
return ($class_list{ $name }) ? $class_list{ $name }
: warn "no class found for $name";
};
1;
=head3 Skipping unwanted items
Sometimes there's unneccessary information transported in SOAP messages.
To skip XML nodes (including all child nodes), just edit the type map for
the message and set the type map entry to '__SKIP__'.
In the example above, EnqueueMessage/StuffIDontNeed and all child elements
are skipped.
my %class_list = (
'EnqueueMessage' => 'Typelib::TEnqueueMessage',
'EnqueueMessage/MMessage' => 'Typelib::TMessage',
'EnqueueMessage/MMessage/MRecipientURI' => 'SOAP::WSDL::XSD::Builtin::anyURI',
'EnqueueMessage/MMessage/MMessageContent' => 'SOAP::WSDL::XSD::Builtin::string',
'EnqueueMessage/StuffIDontNeed' => '__SKIP__',
'EnqueueMessage/StuffIDontNeed/Foo' => 'SOAP::WSDL::XSD::Builtin::string',
'EnqueueMessage/StuffIDontNeed/Bar' => 'SOAP::WSDL::XSD::Builtin::string',
);
Note that only SOAP::WSDL::Expat::MessageParser implements skipping elements
at the time of writing.
=head3 Creating type lib classes
Every element must have a correspondent one in the type library.
Builtin types should be resolved as SOAP::WSDL::XSD::Builtin::* classes
Creating a type lib is easy: Just run SOAP::WSDL's generator - it will
create both a typemap and the type lib classes for a WSDL file.
Sometimes it is nessecary to create type lib classes by hand - not all
WSDL definitions are complete.
For writing your own lib classes, see L,
L and L.
=head2 SOAP::WSDL::Expat::Message2Hash
Transforms a SOAP message into a perl hash refs. Using this parser is usually
triggered by calling the C method of SOAP::WSDL, or by using
L.
Acts somewhat like XML::Simple, but faster.
The following restrictions apply:
=over
=item * Ignores all namespaces
=item * Ignores all attributes
=item * Does not handle mixed content
=item * The SOAP header is ignored
=back
=cut
=head1 OLD SAX HANDLER
Historically, SOAP::WSDL used SAX for parsing XML. The SAX handlers were
implemented as L handlers, which also worked with
L.
Support for SAX and L in SOAP::WSDL is discontinued
for the following reasons:
=over
=item * Speed
L is faster than
L - at least when optimized for speed.
High parsing speed is one of the key requirements for a SOAP toolkit - if XML
serializing and (more important) deserializing are not fast enough, the whole
toolkit is unusable.
=item * Availability
L is more popular than L.
=item * Stability
XML::LibXML is based on the libxml2 library. Several versions of
libxml2 are known to have specific bugs. As a workaround, there are
often several versions of libxml2 installed on one system. This may
lead to problems on operating systems which cannot load more than
one version of a shared library simultaneously.
XML::LibXML is also still under development, while XML::Parser has had time
to stabilize.
=item * SOAP::Lite uses XML::Parser
L uses L if available.
SOAP::WSDL should not require users to install both L
and L.
=back
The old SAX handler historically used in SOAP::WSDL are not included in
the SOAP::WSDL package any more.
However, they may be obtained from the "attic" directory in
SOAP::WSDL's SVN repository at
https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/attic
=over
=item * SOAP::WSDL::SAX::WSDLHandler
This is a SAX handler for parsing WSDL files into object trees SOAP::WSDL
works with.
It's built as a native handler for XML::LibXML, but will also work with
XML::SAX::ParserFactory.
To parse a WSDL file, use one of the following variants:
my $parser = XML::LibXML->new();
my $handler = SOAP::WSDL::SAX::WSDLHandler->new();
$parser->set_handler( $handler );
$parser->parse( $xml );
my $data = $handler->get_data();
my $handler = SOAP::WSDL::SAX::WSDLHandler->new({
base => 'XML::SAX::Base'
});
my $parser = XML::SAX::ParserFactor->parser(
Handler => $handler
);
$parser->parse( $xml );
my $data = $handler->get_data();
=item * SOAP::WSDL::SAX::MessageHandler
This is a SAX handler for parsing WSDL files into object trees SOAP::WSDL
works with.
It's built as a native handler for XML::LibXML, but will also work with
XML::SAX::ParserFactory.
Can be used for parsing both streams (chunks) and documents.
=back
=head1 LICENSE AND COPYRIGHT
Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself.
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=head1 REPOSITORY INFORMATION
$Rev: 391 $
$LastChangedBy: kutterma $
$Id: Parser.pod 391 2007-11-17 21:56:13Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/Parser.pod $
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/Serializer.pod 0000444 0001750 0001750 00000001035 11203370730 020635 0 ustar martin martin =pod
=head1 NAME
SOAP::WSDL::Manual::Serializer
=head1 SERIALIZER CLASSES
Serializer classes convert perl data structures to XML.
SOAP::WSDL comes with one builtin serializer class:
L.
=head1 WRITING YOUR OWN SERIALIZER
See L.
=head1 LICENSE
Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under
the same terms as perl itself
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Manual/Deserializer.pod 0000444 0001750 0001750 00000002060 11203370730 021145 0 ustar martin martin =pod
=head1 NAME
SOAP::WSDL::Manual::Deserializer
=head1 DESERIALIZER CLASSES
Deserializer classes convert SOAP messages to perl data structures.
SOAP::WSDL comes with several builtin serializer classes:
=over
=item * L
Creates SOAP::WSDL::XSD objects from SOAP messages. Default deserializer for
generated interfaces and SOAP::WSDL::Client.
=item * L
Creates perl hash structures from SOAP messages.
=item * L
Creates SOAP::SOM objects from SOAP messages. Default deserializer for
SOAP::WSDL.
See L for more information on SOAP::SOM objects.
=back
=head1 WRITING YOUR OWN DESERIALIZER
See L.
=head1 LICENSE AND COPYRIGHT
Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same
terms as perl itself
=head1 AUTHOR
Martin Kutter Emartin.kutter fen-net.deE
=cut
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/XSD/ 0000755 0001750 0001750 00000000000 11203370730 015244 5 ustar martin martin SOAP-WSDL-2.00.10/lib/SOAP/WSDL/XSD/SimpleType.pm 0000444 0001750 0001750 00000007356 11203370730 017706 0 ustar martin martin package SOAP::WSDL::XSD::SimpleType;
use strict;
use warnings;
use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Base);
use version; our $VERSION = qv('2.00.10');
my %length_of :ATTR(:name :default<[]>);
my %minLength_of :ATTR(:name :default<[]>);
my %maxLength_of :ATTR(:name :default<[]>);
my %pattern_of :ATTR(:name :default<[]>);
my %enumeration_of :ATTR(:name :default<[]>);
my %whiteSpace_of :ATTR(:name :default<[]>);
my %totalDigits_of :ATTR(:name :default<[]>);
my %fractionDigits_of :ATTR(:name :default<[]>);
my %minExclusive :ATTR(:name :default<[]>);
my %minInclusive :ATTR(:name :default<[]>);
my %maxExclusive :ATTR(:name :default<[]>);
my %maxInclusive :ATTR(:name :default<[]>);
my %fixed :ATTR(:name :default<[]>);
my %annotation_of :ATTR(:name :default<()>);
my %base_of :ATTR(:name :default<()>);
my %itemType_of :ATTR(:name :default<()>);
# TODO rename flavor to variety to be consistent with the XML Schema
# specs - though flavor is the cooler name..
# set to restriction|list|union|enumeration
my %flavor_of :ATTR(:name :default<()>);
# for simpleType containing atomic simple types
my %type_of :ATTR(:name :default<()>);
sub get_simpleType; *get_simpleType = \&get_type;
sub set_simpleType; *set_simpleType = \&set_type;
sub get_variety; *get_variety = \&get_flavor;
sub set_restriction {
my $self = shift;
my @attributes = @_;
$self->set_flavor( 'restriction' );
for (@attributes) {
next if (not $_->{ LocalName } eq 'base');
$self->set_base( $_->{ Value } );
}
}
sub set_list {
my $self = shift;
my @attributes = @_;
$self->set_flavor( 'list' );
for (@attributes) {
next if (not $_->{ LocalName } eq 'itemType');
$self->set_itemType( $_->{ Value } );
}
}
sub set_union {
my $self = shift;
my @attributes = @_;
$self->set_flavor( 'union' );
for (@attributes) {
next if (not $_->{ LocalName } eq 'memberTypes');
$self->set_base( [ split /\s/, $_->{ Value } ] );
}
}
sub serialize {
my $self = shift;
my $name = shift;
my $value = shift;
my $opt = shift;
my $ident = ident $self;
$opt->{ attributes } ||= [];
$opt->{ indent } ||= q{};
return $self->_serialize_single($name, $value , $opt)
if ( $flavor_of{ $ident } eq 'restriction'
or $flavor_of{ $ident } eq 'union'
or $flavor_of{ $ident } eq 'enumeration');
if ($flavor_of{ $ident } eq 'list' )
{
$value ||= [];
$value = [ $value ] if ( ref( $value) ne 'ARRAY' );
return $self->_serialize_single($name, join( q{ }, @{ $value } ), $opt);
}
}
sub _serialize_single {
my ($self, $name, $value, $opt) = @_;
my $xml = '';
$xml .= $opt->{ indent } if ($opt->{ readable }); # add indentation
$xml .= '<' . join ' ', $name, @{ $opt->{ attributes } };
if ( $opt->{ autotype }) {
# reverse namespace by prefix hash
my %prefix_of = reverse %{ $opt->{ namespace } };
my $ns = $self->get_targetNamespace();
my $prefix = $prefix_of{ $ns }
|| die 'No prefix found for namespace '. $ns;
$xml .= ' type="' . $prefix . ':' . $self->get_name() .'"';
}
# nillabel ?
return $xml .'/>' if not defined $value;
$xml .= join q{}, '>' , $value , '' , $name , '>';
$xml .= "\n" if ($opt->{ readable });
return $xml;
}
1;
SOAP-WSDL-2.00.10/lib/SOAP/WSDL/XSD/Element.pm 0000444 0001750 0001750 00000007242 11203370730 017176 0 ustar martin martin package SOAP::WSDL::XSD::Element;
use strict;
use warnings;
use Class::Std::Fast::Storable;
use base qw(SOAP::WSDL::Base);
use version; our $VERSION = qv('2.00.10');
# id provided by Base
# name provided by Base
# annotation provided by Base
my %simpleType_of :ATTR(:name :default<()>);
my %complexType_of :ATTR(:name :default<()>);
my %facet_of :ATTR(:name :default<()>);
my %type_of :ATTR(:name :default<()>);
my %abstract_of :ATTR(:name :default<()>);
my %block_of :ATTR(:name :default<()>);
my %default_of :ATTR(:name :default<()>);
my %final_of :ATTR(:name :default<()>);
my %fixed_of :ATTR(:name :default<()>);
my %form_of :ATTR(:name