import SOAP-WSDL 2.00.06 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 2.00.06 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00.06.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
c2ac24dd0f
commit
3de318be40
2
Build.PL
2
Build.PL
@@ -5,7 +5,7 @@ $build = Module::Build->new(
|
||||
create_makefile_pl => 'small',
|
||||
dist_abstract => 'SOAP with WSDL support',
|
||||
dist_name => 'SOAP-WSDL',
|
||||
dist_version => '2.00.05',
|
||||
dist_version => '2.00.06',
|
||||
module_name => 'SOAP::WSDL',
|
||||
license => 'artistic',
|
||||
requires => {
|
||||
|
||||
33
Changes
33
Changes
@@ -1,4 +1,4 @@
|
||||
Release notes for SOAP::WSDL 2.00.05
|
||||
Release notes for SOAP::WSDL 2.00.06
|
||||
-------
|
||||
|
||||
I'm proud to present a new release of SOAP::WSDL.
|
||||
@@ -27,7 +27,7 @@ Features:
|
||||
* SOAP::Lite like look and feel
|
||||
o Where possible, SOAP::WSDL mimics SOAP::Lite's API to allow easy migration
|
||||
* XML schema based class library for creating data objects
|
||||
* High-performance XML parser
|
||||
* High-performance SOAP Message parser
|
||||
* Plugin support. SOAP::WSDL can be extended through plugins in various aspects.
|
||||
The following plugins are supported:
|
||||
o Transport plugins via SOAP::WSDL::Factory::Transport
|
||||
@@ -36,7 +36,34 @@ Features:
|
||||
|
||||
The following changes have been made:
|
||||
|
||||
2.00.05
|
||||
2.00.06 - Dec 03 2008
|
||||
|
||||
The following bugs have been fixed (the numbers in square brackets are the
|
||||
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||
The numbers with # are CPAN RT IDs (http://rt.cpan.org/).
|
||||
|
||||
* #40658 wsdl2perl - prefix option
|
||||
The prefix option is now changed to behave more practical
|
||||
* #40802 wsdl2perl problems with special url
|
||||
The "fixed" attribute caused an error.
|
||||
* #40650 Deserialization on inherited types
|
||||
The inherited complexType variety (sequence/all/choice...) did not get
|
||||
propagated to derived complexTypes. Thus, derived complexTypes which did
|
||||
not add elements lost all inherited elements.
|
||||
* #40108 Test failure on Cygwin
|
||||
Fixes a test failure on Cygwin due to a malformed file:// URL
|
||||
* #40021 charset: utf-8
|
||||
Removed duplicate charset in HTTP requests issued by
|
||||
SOAP::WSDL::Transport::HTTP. Replaced the utf8 by utf-8 in HTTP requests
|
||||
* #39715 Error with complexType extension base without child elements
|
||||
A rather subtle error caused by a wrong init value (undef) for the list
|
||||
of child elements in a complexType sequence.
|
||||
* [ 2005693 ] <maxLength fixed ="true"> causes error
|
||||
* [ 2023797 ] type extensions not handled correctly
|
||||
ComplexType objects now test their elements with ->isa, not with ref
|
||||
* [ 2021755 ] Generating nested complexType extensions throws errors
|
||||
|
||||
2.00.05 - Jul 13 2008
|
||||
|
||||
The following bugs have been fixed (the numbers in square brackets are the
|
||||
tracker IDs from https://sourceforge.net/tracker/?group_id=111978&atid=660921):
|
||||
|
||||
5
MANIFEST
5
MANIFEST
@@ -13,8 +13,6 @@ benchmark/XSD/strftime.pl
|
||||
bin/wsdl2perl.pl
|
||||
Build.PL
|
||||
Changes
|
||||
covered_by.pl
|
||||
covering.pl
|
||||
example/cgi-bin/helloworld.pl
|
||||
example/cgi-bin/person.pl
|
||||
example/fortune.pl
|
||||
@@ -22,9 +20,6 @@ example/genericbarcode.pl
|
||||
example/hello.pl
|
||||
example/hello_compile.pl
|
||||
example/hello_lite.pl
|
||||
example/leaktest/hello_wsdl.pl
|
||||
example/leaktest/leak.pl
|
||||
example/leaktest/parse.pl
|
||||
example/lib/MyElements/CountCookies.pm
|
||||
example/lib/MyElements/CountCookiesResponse.pm
|
||||
example/lib/MyElements/GenerateBarCode.pm
|
||||
|
||||
10
META.yml
10
META.yml
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: SOAP-WSDL
|
||||
version: 2.00.05
|
||||
version: 2.00.06
|
||||
author:
|
||||
- 'Martin Kutter <martin.kutter@fen-net.de>'
|
||||
abstract: SOAP with WSDL support
|
||||
@@ -41,7 +41,7 @@ build_requires:
|
||||
provides:
|
||||
SOAP::WSDL:
|
||||
file: lib/SOAP/WSDL.pm
|
||||
version: 2.00.05
|
||||
version: 2.00.06
|
||||
SOAP::WSDL::Base:
|
||||
file: lib/SOAP/WSDL/Base.pm
|
||||
version: 2.00.05
|
||||
@@ -161,7 +161,7 @@ provides:
|
||||
version: 2.00.05
|
||||
SOAP::WSDL::Server::CGI:
|
||||
file: lib/SOAP/WSDL/Server/CGI.pm
|
||||
version: 2.00.05
|
||||
version: 2.00.06
|
||||
SOAP::WSDL::Server::Mod_Perl2:
|
||||
file: lib/SOAP/WSDL/Server/Mod_Perl2.pm
|
||||
version: 2.00.05
|
||||
@@ -197,7 +197,7 @@ provides:
|
||||
version: 2.00.05
|
||||
SOAP::WSDL::XSD::ComplexType:
|
||||
file: lib/SOAP/WSDL/XSD/ComplexType.pm
|
||||
version: 2.00.05
|
||||
version: 2.00.06
|
||||
SOAP::WSDL::XSD::Element:
|
||||
file: lib/SOAP/WSDL/XSD/Element.pm
|
||||
version: 2.00.05
|
||||
@@ -365,7 +365,7 @@ provides:
|
||||
SOAP::WSDL::XSD::WhiteSpace:
|
||||
file: lib/SOAP/WSDL/XSD/WhiteSpace.pm
|
||||
version: 2.00.05
|
||||
generated_by: Module::Build version 0.2808
|
||||
generated_by: Module::Build version 0.3
|
||||
meta-spec:
|
||||
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
||||
version: 1.2
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Note: this file was auto-generated by Module::Build::Compat version 0.03
|
||||
# Note: this file was auto-generated by Module::Build::Compat version 0.30
|
||||
require 5.8.0;
|
||||
use Module::Build::Compat 0.02;
|
||||
|
||||
Module::Build::Compat->run_build_pl(args => \@ARGV);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# don't have it, comment out the line noted below
|
||||
#
|
||||
|
||||
perl -It/lib -MTAP::Harness -MFile::Find::Rule -e '
|
||||
perl -Ilib -It/lib -MTAP::Harness -MFile::Find::Rule -e '
|
||||
local $ENV{TEST_VERBOSE} = 1;
|
||||
TAP::Harness->new({
|
||||
merge => 1,
|
||||
@@ -17,7 +17,7 @@ perl -It/lib -MTAP::Harness -MFile::Find::Rule -e '
|
||||
'
|
||||
|
||||
# Devel::CoverX::Covered
|
||||
covered runs
|
||||
# covered runs
|
||||
|
||||
cover -coverage="statement" -coverage=condition -coverage=subroutine -coverage="branch"
|
||||
|
||||
|
||||
@@ -10,13 +10,13 @@ use Term::ReadKey;
|
||||
|
||||
my %opt = (
|
||||
url => '',
|
||||
prefix => undef,
|
||||
attribute_prefix => 'MyAttributes',
|
||||
type_prefix => 'MyTypes',
|
||||
element_prefix => 'MyElements',
|
||||
typemap_prefix => 'MyTypemaps',
|
||||
interface_prefix => 'MyInterfaces',
|
||||
server_prefix => 'MyServer',
|
||||
prefix => 'My',
|
||||
attribute_prefix => undef,
|
||||
type_prefix => undef,
|
||||
element_prefix => undef,
|
||||
typemap_prefix => undef,
|
||||
interface_prefix => undef,
|
||||
server_prefix => undef,
|
||||
base_path => 'lib/',
|
||||
proxy => undef,
|
||||
generator => 'XSD',
|
||||
@@ -91,6 +91,20 @@ my $parser = SOAP::WSDL::Expat::WSDLParser->new({
|
||||
user_agent => $lwp,
|
||||
});
|
||||
|
||||
# resolve the default prefix options
|
||||
map {
|
||||
my $opt_key = $_;
|
||||
if ( $opt_key =~ / (\w+) _prefix $/xms # relevant option
|
||||
&& !$opt{ $opt_key } # that hasn't already been explicitly set
|
||||
)
|
||||
{
|
||||
my $prefix_type = $1;
|
||||
$opt{ $opt_key } = $opt{prefix} . # My
|
||||
ucfirst( $prefix_type ) . # Typemap
|
||||
( $prefix_type eq 'server' ? '' : 's' ); # s
|
||||
}
|
||||
} keys %opt;
|
||||
|
||||
my $definitions = $parser->parse_uri( $url );
|
||||
|
||||
my %typemap = ();
|
||||
@@ -150,7 +164,9 @@ wsdl2perl.pl - create perl bindings for SOAP webservices.
|
||||
|
||||
NAME SHORT DESCRITPION
|
||||
----------------------------------------------------------------------------
|
||||
prefix p Prefix for both type and element classes.
|
||||
prefix p Prefix for all generated classes. If you set "-p=Foo",
|
||||
you will get "FooAttributes", "FooTypes",
|
||||
"FooElements" and so on.
|
||||
attribute_prefix a Prefix for XML attribute classes.
|
||||
Default: MyAttributes
|
||||
type_prefix t Prefix for type classes.
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
use File::Basename;
|
||||
use POSIX;
|
||||
use Data::Dumper;
|
||||
use Path::Class;
|
||||
|
||||
use Devel::CoverX::Covered::Db;
|
||||
my $db = Devel::CoverX::Covered::Db->new(
|
||||
dir => dir('./cover_db')->absolute(),
|
||||
);
|
||||
|
||||
print( "* Covered *\nVersion: " . Devel::CoverX::Covered->VERSION . "\n" );
|
||||
|
||||
my @test_file_from = $db->test_files();
|
||||
for my $test_file (sort @test_file_from) {
|
||||
print "$test_file\n";
|
||||
print( "\t", join("\n\t", $db->source_files_covered_by($test_file)) , "\n\n" );
|
||||
}
|
||||
|
||||
58
covering.pl
58
covering.pl
@@ -1,58 +0,0 @@
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
use File::Basename;
|
||||
use POSIX;
|
||||
use Data::Dumper;
|
||||
use Path::Class;
|
||||
|
||||
use Devel::CoverX::Covered::Db;
|
||||
my $db = Devel::CoverX::Covered::Db->new(
|
||||
dir => dir('./cover_db')->absolute(),
|
||||
);
|
||||
|
||||
sub covered_subs {
|
||||
my $db = shift;
|
||||
my ($covered_file_name, $calling_file_name) = @_;
|
||||
|
||||
my %sub_covered;
|
||||
map { push @{ $sub_covered{ $_->[1] } }, $_->[0] } $db->db->query(
|
||||
qq{
|
||||
SELECT ccm.covered_row, ccm.covered_sub_name
|
||||
FROM covered_calling_metric ccm, file f_covered, file f_calling
|
||||
WHERE
|
||||
f_covered.name = ?
|
||||
AND f_calling.name = ?
|
||||
AND ccm.calling_file_id = f_calling.file_id
|
||||
AND ccm.covered_file_id = f_covered.file_id
|
||||
AND ccm.metric_type_id = ?
|
||||
GROUP BY ccm.covered_row
|
||||
ORDER by ccm.covered_sub_name
|
||||
},
|
||||
$covered_file_name,
|
||||
$calling_file_name,
|
||||
$db->get_metric_type_id("subroutine"),
|
||||
)->arrays;
|
||||
|
||||
return \%sub_covered;
|
||||
}
|
||||
|
||||
print( "* Covered *\nVersion: " . Devel::CoverX::Covered->VERSION . "\n" );
|
||||
|
||||
my @covered_files = sort { $a cmp $b } $db->covered_files();
|
||||
for my $covered_file (sort @covered_files) {
|
||||
next if $covered_file =~m{\.t$}x;
|
||||
print "$covered_file\n";
|
||||
# print( "\t", join("\n\t", $db->test_files_covering($covered_file)) , "\n\n" );
|
||||
|
||||
my @test_files = $db->test_files_covering($covered_file);
|
||||
for my $test_file (@test_files) {
|
||||
print "\t$test_file\n";
|
||||
|
||||
my $covered_subs_of_ref = covered_subs($db, $covered_file, $test_file);
|
||||
for my $covered_sub (sort keys %{ $covered_subs_of_ref }) {
|
||||
print "\t\t$covered_sub (line ", join(q{, }, @{ $covered_subs_of_ref->{ $covered_sub } }), ")\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
# use SOAP::Lite 'trace';
|
||||
use Devel::Leak;
|
||||
use Devel::Cycle;
|
||||
use SOAP::WSDL;
|
||||
my $path = `pwd`; chomp $path;
|
||||
# I have to lookup the URL from the WSDL
|
||||
|
||||
use SOAP::WSDL::Factory::Transport;
|
||||
SOAP::WSDL::Factory::Transport->register('http' => 'SOAP::WSDL::Transport::HTTP');
|
||||
|
||||
my $table;
|
||||
my $count = Devel::Leak::NoteSV($table);
|
||||
|
||||
for (1..10) {
|
||||
my $soap;
|
||||
$soap = SOAP::WSDL->new(
|
||||
wsdl => "file://$path/../wsdl/11_helloworld.wsdl",
|
||||
);
|
||||
$count = Devel::Leak::NoteSV($table);
|
||||
print "SVs: $count\n";
|
||||
|
||||
$soap->wsdlinit();
|
||||
# $count = Devel::Leak::NoteSV($table);
|
||||
# print "SVs: $count\n";
|
||||
# $soap->autotype(0);
|
||||
|
||||
my $som = $soap->call(
|
||||
"sayHello",
|
||||
'sayHello', => { 'name' => 'Your Name',
|
||||
'givenName' => 'Your given name',
|
||||
}
|
||||
);
|
||||
|
||||
die $som->fault->{ faultstring } if ($som->fault);
|
||||
|
||||
print $som->result, "\n";
|
||||
undef $som;
|
||||
# $count = Devel::Leak::NoteSV($table);
|
||||
# print "SVs: $count\n";
|
||||
}
|
||||
#}
|
||||
sleep 500;
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use warnings;
|
||||
# use SOAP::Lite 'trace';
|
||||
use Devel::Leak;
|
||||
use SOAP::WSDL;
|
||||
use SOAP::WSDL::Definitions;
|
||||
use SOAP::WSDL::Binding;
|
||||
my $path = `pwd`; chomp $path;
|
||||
# I have to lookup the URL from the WSDL
|
||||
|
||||
my $table;
|
||||
my $count = Devel::Leak::NoteSV($table);
|
||||
for (1..3) {
|
||||
print "SVs: $count\n";
|
||||
my $definitions = SOAP::WSDL::Definitions->new({
|
||||
annotation => 'Foo',
|
||||
});
|
||||
|
||||
$definitions->set_binding(
|
||||
SOAP::WSDL::Binding->new({ parent => $definitions })
|
||||
);
|
||||
|
||||
undef $definitions;
|
||||
$count = Devel::Leak::NoteSV($table);
|
||||
}
|
||||
print "SVs: $count\n";
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
use SOAP::WSDL::Expat::WSDLParser;
|
||||
use Devel::Leak;
|
||||
my $xml = `cat ../wsdl/11_helloworld.wsdl`;
|
||||
|
||||
my ($table, $count);
|
||||
|
||||
|
||||
for (1..5) {
|
||||
$count = Devel::Leak::NoteSV($table);
|
||||
print "SV: $count \n";
|
||||
my $parser = SOAP::WSDL::Expat::WSDLParser->new();
|
||||
$parser->parse_string($xml);
|
||||
my $data = $parser->get_data();
|
||||
undef $parser;
|
||||
undef $data;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::CountCookies;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -17,13 +18,30 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# There's no variety - empty complexType
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
__PACKAGE__->_factory();
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -36,6 +54,21 @@ MyElements::CountCookies
|
||||
Perl data type class for the XML Schema defined element
|
||||
CountCookies from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::CountCookiesResponse;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -16,6 +17,14 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
@@ -26,14 +35,18 @@ Class::Std::initialize();
|
||||
my %CountCookiesResult_of :ATTR(:get<CountCookiesResult>);
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(
|
||||
CountCookiesResult
|
||||
[ qw( CountCookiesResult
|
||||
|
||||
) ],
|
||||
{
|
||||
CountCookiesResult => \%CountCookiesResult_of,
|
||||
'CountCookiesResult' => \%CountCookiesResult_of,
|
||||
},
|
||||
{
|
||||
CountCookiesResult => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
|
||||
'CountCookiesResult' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
|
||||
},
|
||||
{
|
||||
|
||||
'CountCookiesResult' => 'CountCookiesResult',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -44,11 +57,12 @@ __PACKAGE__->_factory(
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -61,6 +75,30 @@ MyElements::CountCookiesResponse
|
||||
Perl data type class for the XML Schema defined element
|
||||
CountCookiesResponse from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
=item * CountCookiesResult
|
||||
|
||||
$element->set_CountCookiesResult($data);
|
||||
$element->get_CountCookiesResult();
|
||||
|
||||
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::GetFortuneCookie;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -17,13 +18,30 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# There's no variety - empty complexType
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
__PACKAGE__->_factory();
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -36,6 +54,21 @@ MyElements::GetFortuneCookie
|
||||
Perl data type class for the XML Schema defined element
|
||||
GetFortuneCookie from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::GetFortuneCookieResponse;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -16,6 +17,14 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
@@ -26,14 +35,18 @@ Class::Std::initialize();
|
||||
my %GetFortuneCookieResult_of :ATTR(:get<GetFortuneCookieResult>);
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(
|
||||
GetFortuneCookieResult
|
||||
[ qw( GetFortuneCookieResult
|
||||
|
||||
) ],
|
||||
{
|
||||
GetFortuneCookieResult => \%GetFortuneCookieResult_of,
|
||||
'GetFortuneCookieResult' => \%GetFortuneCookieResult_of,
|
||||
},
|
||||
{
|
||||
GetFortuneCookieResult => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'GetFortuneCookieResult' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
},
|
||||
{
|
||||
|
||||
'GetFortuneCookieResult' => 'GetFortuneCookieResult',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -44,11 +57,12 @@ __PACKAGE__->_factory(
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -61,6 +75,30 @@ MyElements::GetFortuneCookieResponse
|
||||
Perl data type class for the XML Schema defined element
|
||||
GetFortuneCookieResponse from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
=item * GetFortuneCookieResult
|
||||
|
||||
$element->set_GetFortuneCookieResult($data);
|
||||
$element->get_GetFortuneCookieResult();
|
||||
|
||||
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::GetSpecificCookie;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -16,6 +17,14 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
@@ -26,14 +35,18 @@ Class::Std::initialize();
|
||||
my %index_of :ATTR(:get<index>);
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(
|
||||
index
|
||||
[ qw( index
|
||||
|
||||
) ],
|
||||
{
|
||||
index => \%index_of,
|
||||
'index' => \%index_of,
|
||||
},
|
||||
{
|
||||
index => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
|
||||
'index' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
|
||||
},
|
||||
{
|
||||
|
||||
'index' => 'index',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -44,11 +57,12 @@ __PACKAGE__->_factory(
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -61,6 +75,30 @@ MyElements::GetSpecificCookie
|
||||
Perl data type class for the XML Schema defined element
|
||||
GetSpecificCookie from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
=item * index
|
||||
|
||||
$element->set_index($data);
|
||||
$element->get_index();
|
||||
|
||||
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::GetSpecificCookieResponse;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -16,6 +17,14 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
@@ -26,14 +35,18 @@ Class::Std::initialize();
|
||||
my %GetSpecificCookieResult_of :ATTR(:get<GetSpecificCookieResult>);
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(
|
||||
GetSpecificCookieResult
|
||||
[ qw( GetSpecificCookieResult
|
||||
|
||||
) ],
|
||||
{
|
||||
GetSpecificCookieResult => \%GetSpecificCookieResult_of,
|
||||
'GetSpecificCookieResult' => \%GetSpecificCookieResult_of,
|
||||
},
|
||||
{
|
||||
GetSpecificCookieResult => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
'GetSpecificCookieResult' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
|
||||
},
|
||||
{
|
||||
|
||||
'GetSpecificCookieResult' => 'GetSpecificCookieResult',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -44,11 +57,12 @@ __PACKAGE__->_factory(
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -61,6 +75,30 @@ MyElements::GetSpecificCookieResponse
|
||||
Perl data type class for the XML Schema defined element
|
||||
GetSpecificCookieResponse from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
=item * GetSpecificCookieResult
|
||||
|
||||
$element->set_GetSpecificCookieResult($data);
|
||||
$element->get_GetSpecificCookieResult();
|
||||
|
||||
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::int;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -14,14 +15,12 @@ __PACKAGE__->__set_ref();
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::int
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
} # end of BLOCK
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -34,6 +33,12 @@ MyElements::int
|
||||
Perl data type class for the XML Schema defined element
|
||||
int from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::readNodeCount;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -17,13 +18,30 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# There's no variety - empty complexType
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
__PACKAGE__->_factory();
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -36,6 +54,21 @@ MyElements::readNodeCount
|
||||
Perl data type class for the XML Schema defined element
|
||||
readNodeCount from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyElements::readNodeCountResponse;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -16,6 +17,14 @@ use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType
|
||||
);
|
||||
|
||||
our $XML_ATTRIBUTE_CLASS;
|
||||
undef $XML_ATTRIBUTE_CLASS;
|
||||
|
||||
sub __get_attr_class {
|
||||
return $XML_ATTRIBUTE_CLASS;
|
||||
}
|
||||
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
use base qw(SOAP::WSDL::XSD::Typelib::ComplexType);
|
||||
|
||||
@@ -26,14 +35,18 @@ Class::Std::initialize();
|
||||
my %readNodeCountResult_of :ATTR(:get<readNodeCountResult>);
|
||||
|
||||
__PACKAGE__->_factory(
|
||||
[ qw(
|
||||
readNodeCountResult
|
||||
[ qw( readNodeCountResult
|
||||
|
||||
) ],
|
||||
{
|
||||
readNodeCountResult => \%readNodeCountResult_of,
|
||||
'readNodeCountResult' => \%readNodeCountResult_of,
|
||||
},
|
||||
{
|
||||
readNodeCountResult => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
|
||||
'readNodeCountResult' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
|
||||
},
|
||||
{
|
||||
|
||||
'readNodeCountResult' => 'readNodeCountResult',
|
||||
}
|
||||
);
|
||||
|
||||
@@ -44,11 +57,12 @@ __PACKAGE__->_factory(
|
||||
|
||||
|
||||
|
||||
|
||||
} # end of BLOCK
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -61,6 +75,30 @@ MyElements::readNodeCountResponse
|
||||
Perl data type class for the XML Schema defined element
|
||||
readNodeCountResponse from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
=item * readNodeCountResult
|
||||
|
||||
$element->set_readNodeCountResult($data);
|
||||
$element->get_readNodeCountResult();
|
||||
|
||||
|
||||
|
||||
|
||||
=back
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
=head2 new
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
|
||||
package MyElements::string;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
{ # BLOCK to scope variables
|
||||
|
||||
sub get_xmlns { 'http://www.webserviceX.NET' }
|
||||
sub get_xmlns { 'http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx' }
|
||||
|
||||
__PACKAGE__->__set_name('string');
|
||||
__PACKAGE__->__set_nillable(true);
|
||||
__PACKAGE__->__set_nillable(1);
|
||||
__PACKAGE__->__set_minOccurs();
|
||||
__PACKAGE__->__set_maxOccurs();
|
||||
__PACKAGE__->__set_ref();
|
||||
use base qw(
|
||||
SOAP::WSDL::XSD::Typelib::Element
|
||||
SOAP::WSDL::XSD::Typelib::Builtin::string
|
||||
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
} # end of BLOCK
|
||||
1;
|
||||
|
||||
# __END__
|
||||
|
||||
=pod
|
||||
|
||||
@@ -32,7 +31,13 @@ MyElements::string
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Perl data type class for the XML Schema defined element
|
||||
string from the namespace http://www.webserviceX.NET.
|
||||
string from the namespace http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ sub START {
|
||||
$_[0]->set_proxy('http://www.fullerdata.com/FortuneCookie/FortuneCookie.asmx') if not $_[2]->{proxy};
|
||||
$_[0]->set_class_resolver('MyTypemaps::FullerData_x0020_Fortune_x0020_Cookie')
|
||||
if not $_[2]->{class_resolver};
|
||||
|
||||
$_[0]->set_prefix($_[2]->{use_prefix}) if exists $_[2]->{use_prefix};
|
||||
}
|
||||
|
||||
sub readNodeCount {
|
||||
@@ -24,10 +26,11 @@ sub readNodeCount {
|
||||
style => 'document',
|
||||
body => {
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => '',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::readNodeCount )],
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::readNodeCount )],
|
||||
},
|
||||
header => {
|
||||
|
||||
@@ -38,6 +41,7 @@ sub readNodeCount {
|
||||
}, $body, $header);
|
||||
}
|
||||
|
||||
|
||||
sub GetFortuneCookie {
|
||||
my ($self, $body, $header) = @_;
|
||||
die "GetFortuneCookie must be called as object method (\$self is <$self>)" if not blessed($self);
|
||||
@@ -47,10 +51,11 @@ sub GetFortuneCookie {
|
||||
style => 'document',
|
||||
body => {
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => '',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::GetFortuneCookie )],
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::GetFortuneCookie )],
|
||||
},
|
||||
header => {
|
||||
|
||||
@@ -61,6 +66,7 @@ sub GetFortuneCookie {
|
||||
}, $body, $header);
|
||||
}
|
||||
|
||||
|
||||
sub CountCookies {
|
||||
my ($self, $body, $header) = @_;
|
||||
die "CountCookies must be called as object method (\$self is <$self>)" if not blessed($self);
|
||||
@@ -70,10 +76,11 @@ sub CountCookies {
|
||||
style => 'document',
|
||||
body => {
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => '',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::CountCookies )],
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::CountCookies )],
|
||||
},
|
||||
header => {
|
||||
|
||||
@@ -84,6 +91,7 @@ sub CountCookies {
|
||||
}, $body, $header);
|
||||
}
|
||||
|
||||
|
||||
sub GetSpecificCookie {
|
||||
my ($self, $body, $header) = @_;
|
||||
die "GetSpecificCookie must be called as object method (\$self is <$self>)" if not blessed($self);
|
||||
@@ -93,10 +101,11 @@ sub GetSpecificCookie {
|
||||
style => 'document',
|
||||
body => {
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => '',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::GetSpecificCookie )],
|
||||
|
||||
'use' => 'literal',
|
||||
namespace => 'http://schemas.xmlsoap.org/wsdl/soap/',
|
||||
encodingStyle => '',
|
||||
parts => [qw( MyElements::GetSpecificCookie )],
|
||||
},
|
||||
header => {
|
||||
|
||||
@@ -109,6 +118,7 @@ sub GetSpecificCookie {
|
||||
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
||||
@@ -119,21 +129,20 @@ __END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
||||
MyInterfaces::FullerData_x0020_Fortune_x0020_Cookie::FullerData_x0020_Fortune_x0020_CookieSoap - SOAP Interface for the FullerData_x0020_Fortune_x0020_Cookie Web Service
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use MyInterfaces::FullerData_x0020_Fortune_x0020_Cookie::FullerData_x0020_Fortune_x0020_CookieSoap;
|
||||
my $interface = MyInterfaces::FullerData_x0020_Fortune_x0020_Cookie::FullerData_x0020_Fortune_x0020_CookieSoap->new();
|
||||
|
||||
|
||||
my $response;
|
||||
$response = $interface->readNodeCount();
|
||||
$response = $interface->GetFortuneCookie();
|
||||
$response = $interface->CountCookies();
|
||||
$response = $interface->GetSpecificCookie();
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -168,42 +177,58 @@ of the corresponding class can be passed instead of the marked hash ref.
|
||||
You may pass any combination of objects, hash and list refs to these
|
||||
methods, as long as you meet the structure.
|
||||
|
||||
List items (i.e. multiple occurences) are not displayed in the synopsis.
|
||||
You may generally pass a list ref of hash refs (or objects) instead of a hash
|
||||
ref - this may result in invalid XML if used improperly, though. Note that
|
||||
SOAP::WSDL always expects list references at maximum depth position.
|
||||
|
||||
XML attributes are not displayed in this synopsis and cannot be set using
|
||||
hash refs. See the respective class' documentation for additional information.
|
||||
|
||||
|
||||
|
||||
=head3 readNodeCount
|
||||
|
||||
Display the number of nodes specified in fortune XML document
|
||||
|
||||
$interface->readNodeCount(,,
|
||||
Returns a L<MyElements::readNodeCountResponse|MyElements::readNodeCountResponse> object.
|
||||
|
||||
$response = $interface->readNodeCount(,,
|
||||
);
|
||||
|
||||
|
||||
=head3 GetFortuneCookie
|
||||
|
||||
Get a random fortune cookie from the XML document
|
||||
|
||||
$interface->GetFortuneCookie(,,
|
||||
Returns a L<MyElements::GetFortuneCookieResponse|MyElements::GetFortuneCookieResponse> object.
|
||||
|
||||
$response = $interface->GetFortuneCookie(,,
|
||||
);
|
||||
|
||||
|
||||
=head3 CountCookies
|
||||
|
||||
Count the actual number of nodes in the XML document of fortunes
|
||||
|
||||
$interface->CountCookies(,,
|
||||
Returns a L<MyElements::CountCookiesResponse|MyElements::CountCookiesResponse> object.
|
||||
|
||||
$response = $interface->CountCookies(,,
|
||||
);
|
||||
|
||||
|
||||
=head3 GetSpecificCookie
|
||||
|
||||
Get a specific cookie by the XML node number
|
||||
|
||||
$interface->GetSpecificCookie( {
|
||||
Returns a L<MyElements::GetSpecificCookieResponse|MyElements::GetSpecificCookieResponse> object.
|
||||
|
||||
$response = $interface->GetSpecificCookie( {
|
||||
index => $some_value, # int
|
||||
},,
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
Generated by SOAP::WSDL on Sun Dec 16 19:58:30 2007
|
||||
Generated by SOAP::WSDL on Wed Dec 3 22:05:20 2008
|
||||
|
||||
=pod
|
||||
=cut
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package MyTypemaps::FullerData_x0020_Fortune_x0020_Cookie;
|
||||
use strict;
|
||||
use warnings;
|
||||
@@ -38,11 +39,13 @@ sub get_typemap {
|
||||
|
||||
__END__
|
||||
|
||||
__END__
|
||||
|
||||
=pod
|
||||
|
||||
=head1 NAME
|
||||
|
||||
MyTypemaps::FullerData_x0020_Fortune_x0020_Cookie; - typemap for ::FullerData_x0020_Fortune_x0020_Cookie;
|
||||
MyTypemaps::FullerData_x0020_Fortune_x0020_Cookie - typemap for FullerData_x0020_Fortune_x0020_Cookie
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ use Class::Std::Fast constructor => 'none';
|
||||
use SOAP::WSDL::XSD::Typelib::Builtin::anySimpleType;
|
||||
use LWP::UserAgent;
|
||||
|
||||
use version; our $VERSION = qv('2.00.05');
|
||||
use version; our $VERSION = qv('2.00.06');
|
||||
|
||||
my %no_dispatch_of :ATTR(:name<no_dispatch>);
|
||||
my %wsdl_of :ATTR(:name<wsdl>);
|
||||
@@ -830,9 +830,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 728 $
|
||||
$Rev: 755 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: WSDL.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $
|
||||
$Id: WSDL.pm 755 2008-12-03 21:36:54Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -23,7 +23,7 @@ my %endpoint_of :ATTR(:name<endpoint> :default<()>);
|
||||
my %soap_version_of :ATTR(:get<soap_version> :init_attr<soap_version> :default<1.1>);
|
||||
|
||||
my %on_action_of :ATTR(:name<on_action> :default<()>);
|
||||
my %content_type_of :ATTR(:name<content_type> :default<text/xml; charset=utf8>); #/#trick editors
|
||||
my %content_type_of :ATTR(:name<content_type> :default<text/xml; charset=utf-8>); #/#trick editors
|
||||
my %serializer_of :ATTR(:name<serializer> :default<()>);
|
||||
my %deserializer_of :ATTR(:name<deserializer> :default<()>);
|
||||
|
||||
@@ -395,10 +395,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 728 $
|
||||
$Rev: 744 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Client.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
||||
$Id: Client.pm 744 2008-10-15 16:58:45Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -88,6 +88,6 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Base.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Client/Base.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -118,7 +118,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Definitions.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Definitions.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Definitions.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -166,6 +166,6 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Hash.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/Hash.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/Hash.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -143,6 +143,6 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: SOM.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/SOM.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/SOM.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -102,6 +102,6 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: XSD.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/XSD.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Deserializer/XSD.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -329,5 +329,5 @@ the same terms as perl itself
|
||||
$LastChangedRevision: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageParser.pm $
|
||||
|
||||
|
||||
@@ -72,6 +72,6 @@ the same terms as perl itself
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: MessageStreamParser.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -342,5 +342,5 @@ the same terms as perl itself
|
||||
$LastChangedRevision: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/WSDLParser.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/WSDLParser.pm $
|
||||
|
||||
|
||||
@@ -141,6 +141,6 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Serializer.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -246,6 +246,6 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Transport.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Transport.pm $
|
||||
|
||||
=cut
|
||||
|
||||
@@ -3,7 +3,7 @@ use strict;
|
||||
use warnings;
|
||||
use Carp qw(confess);
|
||||
use Class::Std::Fast::Storable constructor => 'none';
|
||||
|
||||
use Scalar::Util qw(blessed);
|
||||
use version; our $VERSION = qv('2.00.05');
|
||||
|
||||
my %namespace_prefix_map_of :ATTR(:name<namespace_prefix_map> :default<{}>);
|
||||
@@ -155,6 +155,8 @@ sub element_name {
|
||||
my $self = shift;
|
||||
my $element = shift;
|
||||
|
||||
confess "no element object" unless blessed $element;
|
||||
|
||||
my $name = $element->get_name();
|
||||
if (! $name) {
|
||||
while (my $ref = $element->get_ref()) {
|
||||
|
||||
@@ -205,6 +205,7 @@ sub visit_XSD_Element {
|
||||
my $output = defined $output_of{ ident $self }
|
||||
? $output_of{ ident $self }
|
||||
: $self->_generate_filename( $self->get_name_resolver()->create_xsd_name($element) );
|
||||
warn "Creating element class $output \n";
|
||||
$self->_process('element.tt', { element => $element } , $output);
|
||||
}
|
||||
|
||||
@@ -213,6 +214,7 @@ sub visit_XSD_SimpleType {
|
||||
my $output = defined $output_of{ ident $self }
|
||||
? $output_of{ ident $self }
|
||||
: $self->_generate_filename( $self->get_name_resolver()->create_xsd_name($type) );
|
||||
warn "Creating simpleType class $output \n";
|
||||
$self->_process('simpleType.tt', { simpleType => $type } , $output);
|
||||
}
|
||||
|
||||
@@ -221,6 +223,7 @@ sub visit_XSD_ComplexType {
|
||||
my $output = defined $output_of{ ident $self }
|
||||
? $output_of{ ident $self }
|
||||
: $self->_generate_filename( $self->get_name_resolver()->create_xsd_name($type) );
|
||||
warn "Creating complexType class $output \n";
|
||||
$self->_process('complexType.tt', { complexType => $type } , $output);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,16 @@
|
||||
|
||||
[% type = definitions.find_portType( binding.expand( binding.get_type ) );
|
||||
port_op = type.find_operation( definitions.get_targetNamespace, operation.get_name );
|
||||
port_op.get_documentation %]
|
||||
port_op.get_documentation();
|
||||
|
||||
$interface->[% operation.get_name %]([% INCLUDE Interface/POD/Message.tt %] );
|
||||
# for now we only document the first response part - document/literal
|
||||
# doesn't allow more.
|
||||
response_name = port_op.first_output.get_message();
|
||||
response_part = definitions.find_message( port_op.first_output.expand( response_name ) ).get_part();
|
||||
response_body_element = definitions.first_types.find_element( response_part.0.expand( response_part.0.get_element ) );
|
||||
response_body_class = XSD.create_xsd_name(response_body_element);
|
||||
%]
|
||||
|
||||
Returns a L<[% response_body_class %]|[% response_body_class %]> object.
|
||||
|
||||
$response = $interface->[% operation.get_name %]([% INCLUDE Interface/POD/Message.tt %] );
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[% IF (complexType.get_variety == 'restriction');
|
||||
[% IF (complexType.get_derivation == 'restriction');
|
||||
INCLUDE complexType/POD/restriction.tt(complexType = complexType);
|
||||
ELSIF (complexType.get_variety == 'extension');
|
||||
ELSIF (complexType.get_derivation == 'extension');
|
||||
#THROW NOT_IMPLEMENTED, "${ complexType.get_name } - complexType complexContent extension not implemented yet";
|
||||
%]
|
||||
# No documentation generated for complexContent / extension yet
|
||||
[%
|
||||
ELSE;
|
||||
THROW UNKNOWN, "unknown variety ${ complexType.get_variety }";
|
||||
THROW UNKNOWN, "unknown derivation ${ complexType.get_derivation }";
|
||||
END;
|
||||
|
||||
%]
|
||||
@@ -7,6 +7,10 @@ ELSIF (complexType.get_variety == 'sequence');
|
||||
ELSIF (complexType.get_variety == 'all');
|
||||
INCLUDE complexType/extension.tt(complexType = complexType);
|
||||
ELSE;
|
||||
THROW UNKNOWN, "unknown variety ${ complexType.get_variety }";
|
||||
IF (complexType.get_variety);
|
||||
THROW UNKNOWN, "unknown variety ${ complexType.get_variety }";
|
||||
ELSE -%]
|
||||
# empty variety
|
||||
[% END;
|
||||
END;
|
||||
%]
|
||||
@@ -22,7 +22,7 @@ element_list = [];
|
||||
|
||||
# copy complexType ref
|
||||
base_type = complexType;
|
||||
base_name=base_type.expand( base_type.get_base );
|
||||
base_name = base_type.expand( base_type.get_base );
|
||||
base_type = definitions.first_types.find_type( base_name );
|
||||
|
||||
# add a use base for first to setup inheritance
|
||||
@@ -31,13 +31,17 @@ use base qw([% XSD.create_xsd_name( base_type ) %]);
|
||||
[%
|
||||
# loop forever
|
||||
WHILE (1);
|
||||
IF (complexType.get_variety == 'extension');
|
||||
# wrap statement in IF to avoid printing
|
||||
IF (complexType.set_variety( base_type.get_variety )); END;
|
||||
END;
|
||||
# make a copy. We don't want to modify the original list here...
|
||||
FOREACH element = base_type.get_element.reverse;
|
||||
element_list.unshift(element);
|
||||
END;
|
||||
|
||||
# get next base type
|
||||
IF (base_name=base_type.expand( base_type.get_base ));
|
||||
# get next base type if there is one...
|
||||
IF (base_type.get_base);
|
||||
base_name=base_type.expand( base_type.get_base );
|
||||
# set new base_type
|
||||
base_type = definitions.first_types.find_type( base_name );
|
||||
ELSE;
|
||||
@@ -59,8 +63,11 @@ END;
|
||||
|
||||
# set derived element list
|
||||
# wrap in IF; END; to prevent it getting printed
|
||||
IF (complexType.set_element( element_list )); END;
|
||||
IF ( complexType.set_element( element_list ) ); END;
|
||||
|
||||
-%]
|
||||
# Variety: [% complexType.get_variety %]
|
||||
[%
|
||||
INCLUDE complexType/variety.tt(complexType = complexType);
|
||||
|
||||
# restore original element list
|
||||
|
||||
@@ -76,6 +76,38 @@ Perl data type class for the XML Schema defined element
|
||||
|
||||
[% INCLUDE POD/annotation.tt(node = element) %]
|
||||
|
||||
[% IF (complexType = element.first_complexType);
|
||||
IF (complexType.get_element); %]
|
||||
|
||||
[% head1 %] PROPERTIES
|
||||
|
||||
The following properties may be accessed using get_PROPERTY / set_PROPERTY
|
||||
methods:
|
||||
|
||||
=over
|
||||
|
||||
[% FOREACH child_element = complexType.get_element -%]
|
||||
=item * [% XSD.perl_var_name(XSD.element_name(child_element)) %]
|
||||
|
||||
$element->set_[% XSD.perl_var_name(XSD.element_name(child_element)) %]($data);
|
||||
$element->get_[% XSD.perl_var_name(XSD.element_name(child_element)) %]();
|
||||
|
||||
[% IF (XSD.perl_var_name(XSD.element_name(child_element)) == child_element.get_name); %]
|
||||
[% ELSE %]
|
||||
Note: The name of this property has been altered, because it didn't match
|
||||
perl's notion of variable/subroutine names. The altered name is used in
|
||||
perl code only, XML output uses the original name:
|
||||
|
||||
[% child_element.get_name %]
|
||||
|
||||
[% END %]
|
||||
|
||||
=back
|
||||
[% END;
|
||||
END;
|
||||
END; -%]
|
||||
|
||||
|
||||
[% head1 %] METHODS
|
||||
|
||||
[% head2 %] new
|
||||
|
||||
@@ -93,7 +93,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 391 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Glossary.pod 391 2007-11-17 21:56:13Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/Glossary.pod $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/Glossary.pod $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 391 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Parser.pod 391 2007-11-17 21:56:13Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/Parser.pod $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/Parser.pod $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -1255,7 +1255,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 562 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: WS_I.pod 562 2008-02-22 20:32:17Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/WS_I.pod $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Manual/WS_I.pod $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Fault11.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ sub serialize {
|
||||
}
|
||||
|
||||
sub serialize_header {
|
||||
my ($self, $name, $data, $opt) = @_;
|
||||
my ($self, $method, $data, $opt) = @_;
|
||||
|
||||
# header is optional. Leave out if there's no header data
|
||||
return q{} if not $data;
|
||||
@@ -62,8 +62,11 @@ sub serialize_header {
|
||||
}
|
||||
|
||||
sub serialize_body {
|
||||
my ($self, $name, $data, $opt) = @_;
|
||||
$data->__set_name("$opt->{prefix}:$name") if $opt->{prefix};
|
||||
my ($self, $method, $data, $opt) = @_;
|
||||
|
||||
# TODO This one wipes out the old class' XML name globally
|
||||
# Fix in some more appropriate place...
|
||||
$data->__set_name("$opt->{prefix}:" . $data->__get_name() ) if $opt->{prefix};
|
||||
|
||||
# Body is NOT optional. Serialize to empty body
|
||||
# if we have no data.
|
||||
@@ -129,10 +132,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 728 $
|
||||
$Rev: 735 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: XSD.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Serializer/XSD.pm $
|
||||
$Id: XSD.pm 735 2008-08-14 07:36:54Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Serializer/XSD.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package SOAP::WSDL::Server::CGI;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Encode;
|
||||
|
||||
use HTTP::Request;
|
||||
use HTTP::Response;
|
||||
use HTTP::Status;
|
||||
@@ -12,7 +14,7 @@ use Class::Std::Fast::Storable;
|
||||
|
||||
use base qw(SOAP::WSDL::Server);
|
||||
|
||||
use version; our $VERSION = qv('2.00.05');
|
||||
use version; our $VERSION = qv('2.00.06');
|
||||
|
||||
# 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...
|
||||
@@ -80,7 +82,7 @@ sub handle {
|
||||
else {
|
||||
$response = HTTP::Response->new(200);
|
||||
$response->header('Content-type' => 'text/xml; charset="utf-8"');
|
||||
$response->content( $response_message );
|
||||
$response->content( encode('utf8', $response_message ) );
|
||||
{
|
||||
use bytes;
|
||||
$response->header('Content-length', length $response_message);
|
||||
|
||||
@@ -23,9 +23,10 @@ sub send_receive {
|
||||
|
||||
$encoding = defined($encoding)
|
||||
? lc($encoding)
|
||||
: 'utf8';
|
||||
: 'utf-8';
|
||||
|
||||
$content_type = 'text/xml' if not defined($content_type);
|
||||
$content_type = "text/xml; charset=$encoding"
|
||||
if not defined($content_type);
|
||||
# what's this all about?
|
||||
# unfortunately combination of LWP and Perl 5.6.1 and later has bug
|
||||
# in sending multibyte characters. LWP uses length() to calculate
|
||||
@@ -48,7 +49,7 @@ sub send_receive {
|
||||
|
||||
my $request = HTTP::Request->new( 'POST',
|
||||
$endpoint,
|
||||
[ 'Content-Type', "$content_type; charset=$encoding",
|
||||
[ 'Content-Type', "$content_type",
|
||||
'Content-Length', $bytelength,
|
||||
'SOAPAction', $soap_action,
|
||||
],
|
||||
@@ -90,10 +91,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 728 $
|
||||
$Rev: 744 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: HTTP.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
||||
$Id: HTTP.pm 744 2008-10-15 16:58:45Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Transport/HTTP.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ use Class::Std::Fast::Storable;
|
||||
use Scalar::Util qw(blessed);
|
||||
use base qw(SOAP::WSDL::Base);
|
||||
|
||||
use version; our $VERSION = qv('2.00.05');
|
||||
use version; our $VERSION = qv('2.00.06');
|
||||
|
||||
# id provided by Base
|
||||
# name provided by Base
|
||||
@@ -25,12 +25,13 @@ my %maxInclusive :ATTR(:name<maxInclusive> :default<[]>);
|
||||
|
||||
|
||||
my %attribute_of :ATTR(:name<attribute> :default<()>);
|
||||
my %element_of :ATTR(:name<element> :default<()>);
|
||||
my %element_of :ATTR(:name<element> :default<[]>);
|
||||
my %group_of :ATTR(:name<group> :default<()>);
|
||||
my %variety_of :ATTR(:name<variety> :default<()>);
|
||||
my %base_of :ATTR(:name<base> :default<()>);
|
||||
my %itemType_of :ATTR(:name<itemType> :default<()>);
|
||||
my %abstract_of :ATTR(:name<abstract> :default<()>);
|
||||
my %final_of :ATTR(:name<final> :default<()>);
|
||||
my %mixed_of :ATTR(:name<mixed> :default<()>); # default is false
|
||||
|
||||
my %derivation_of :ATTR(:name<derivation> :default<()>);
|
||||
|
||||
@@ -103,7 +103,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Builtin.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Schema/Builtin.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Schema/Builtin.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ sub as_bool :BOOLIFY {
|
||||
return $value_of { ${ $_[0] } };
|
||||
}
|
||||
|
||||
my $ID_GENERATOR_REF = Class::Std::Fast::ID_GENERATOR_REF();
|
||||
my $OBJECT_CACHE_REF = Class::Std::Fast::OBJECT_CACHE_REF();
|
||||
|
||||
sub new {
|
||||
|
||||
@@ -200,8 +200,9 @@ sub _factory {
|
||||
]
|
||||
: $is_ref eq 'HASH'
|
||||
? $type->new( $_[1] )
|
||||
# neither ARRAY nor HASH - probably an object...
|
||||
: ($is_ref eq $type) # of required type ? ->isa would be a better test...
|
||||
# neither ARRAY nor HASH - probably an object... -
|
||||
# do we need to test for it being blessed?
|
||||
: blessed $_[1] && $_[1]->isa($type) # of required type ?
|
||||
? $_[1] # use it
|
||||
: die croak "cannot use $is_ref reference as value for $name - $type required"
|
||||
|
||||
@@ -508,10 +509,10 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
|
||||
=head1 REPOSITORY INFORMATION
|
||||
|
||||
$Rev: 728 $
|
||||
$Rev: 731 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: ComplexType.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
|
||||
$Id: ComplexType.pm 731 2008-07-22 21:33:07Z kutterma $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: Element.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/Element.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/Element.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
|
||||
$Rev: 728 $
|
||||
$LastChangedBy: kutterma $
|
||||
$Id: SimpleType.pm 728 2008-07-13 19:28:50Z kutterma $
|
||||
$HeadURL: http://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm $
|
||||
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm $
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ use_ok(qw/SOAP::WSDL/);
|
||||
|
||||
my $soap;
|
||||
$soap = SOAP::WSDL->new(
|
||||
wsdl => 'file:///' . $url .'/acceptance/wsdl/006_sax_client.wsdl',
|
||||
wsdl => 'file://' . $url .'/acceptance/wsdl/006_sax_client.wsdl',
|
||||
outputxml => 1, # required, if not set ::SOM serializer will be loaded
|
||||
)->wsdlinit();
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 8; #qw(no_plan);
|
||||
use Test::More tests => 9; #qw(no_plan);
|
||||
use_ok qw(SOAP::WSDL::Client);
|
||||
|
||||
ok my $client = SOAP::WSDL::Client->new();
|
||||
@@ -9,6 +9,8 @@ ok $client = SOAP::WSDL::Client->new({
|
||||
proxy => 'http://localhost',
|
||||
});
|
||||
|
||||
is $client->get_content_type(), 'text/xml; charset=utf-8';
|
||||
|
||||
is $client->get_endpoint(), 'http://localhost';
|
||||
|
||||
$client->no_dispatch(1);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 68;
|
||||
use Test::More tests => 71;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
use File::Path;
|
||||
@@ -51,6 +51,7 @@ my $generator = SOAP::WSDL::Generator::Template::XSD->new({
|
||||
|
||||
my $code = "";
|
||||
$generator->set_output(\$code);
|
||||
|
||||
$generator->generate_typelib();
|
||||
{
|
||||
eval $code;
|
||||
@@ -227,12 +228,24 @@ is q{<testAtomicRef xmlns="urn:Test"><in>foo</in></testAtomicRef>}
|
||||
|
||||
SKIP: {
|
||||
eval { require Test::Pod::Content; }
|
||||
or skip 'Cannot test pod content without Test::Pod::Content', 1;
|
||||
or skip 'Cannot test pod content without Test::Pod::Content', 2;
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MyTypes::testComplexTypeSequenceWithAttribute',
|
||||
'attr',
|
||||
qr{Test \s Attribute \s good \s for \s nothing}x,
|
||||
'Attribute POD');
|
||||
|
||||
Test::Pod::Content::pod_section_like(
|
||||
'MyInterfaces::testService::testPort',
|
||||
'testChoice',
|
||||
qr{Returns \s a \s MyElements::testComplexTypeRestriction \s object\.}x,
|
||||
'Interface POD contains response class name');
|
||||
}
|
||||
|
||||
use_ok qw(MyTypes::finalComplexType);
|
||||
{
|
||||
no warnings qw(once);
|
||||
ok *MyTypes::finalComplexType::get_Name, 'complexType inheritance flattened out';
|
||||
}
|
||||
|
||||
ok $typemap = MyTypemaps::testService->get_typemap();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 14;
|
||||
use Test::More tests => 17;
|
||||
use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
use File::Path;
|
||||
@@ -115,4 +115,10 @@ sub xml {
|
||||
</SOAP-ENV:Body></SOAP-ENV:Envelope>};
|
||||
}
|
||||
|
||||
require FooType::testAbstractGrandChild;
|
||||
|
||||
ok(FooType::testAbstractGrandChild->can('get_abstractGrandChild'), 'attribute');
|
||||
ok(FooType::testAbstractGrandChild->can('get_abstractChild'), 'parent attribute');
|
||||
ok(FooType::testAbstractGrandChild->can('get_abstract'), 'grandparent attribute');
|
||||
|
||||
rmtree "$path/testlib";
|
||||
|
||||
@@ -17,13 +17,18 @@ like $serializer->serialize({ body => {} }), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}
|
||||
like $serializer->serialize({ body => [] }), qr{<SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty body';
|
||||
like $serializer->serialize({ header => {}, body => [] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty header and body';
|
||||
like $serializer->serialize({ header => {}, body => [] , options => {
|
||||
|
||||
like $serializer->serialize({
|
||||
header => {},
|
||||
body => [] ,
|
||||
options => {
|
||||
namespace => {
|
||||
'http://schemas.xmlsoap.org/soap/envelope/' => 'SOAP',
|
||||
'http://www.w3.org/2001/XMLSchema-instance' => 'xsi',
|
||||
}
|
||||
} }),
|
||||
qr{<SOAP:Header></SOAP:Header><SOAP:Body></SOAP:Body>}, 'empty header and body';
|
||||
'http://schemas.xmlsoap.org/soap/envelope/' => 'SOAP',
|
||||
'http://www.w3.org/2001/XMLSchema-instance' => 'xsi',
|
||||
}
|
||||
}})
|
||||
, qr{xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"}
|
||||
, 'namespace';
|
||||
|
||||
like $serializer->serialize({ header => {}, body => [ undef ] }),
|
||||
qr{<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body></SOAP-ENV:Body>}, 'empty header and body';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use Test::More tests => 7;
|
||||
use Test::More tests => 8;
|
||||
use strict;
|
||||
use utf8;
|
||||
|
||||
@@ -15,10 +15,24 @@ my $result = $transport->send_receive(envelope => 'Test', action => 'foo');
|
||||
|
||||
ok ! $transport->is_success();
|
||||
|
||||
$result = $transport->send_receive(encoding => 'utf8', envelope => 'ÄÖÜ',
|
||||
$result = $transport->send_receive(encoding => 'utf-8', envelope => 'ÄÖÜ',
|
||||
action => 'foo');
|
||||
ok ! $transport->is_success();
|
||||
|
||||
$result = $transport->send_receive(encoding => 'utf8', envelope => 'ÄÖÜ',
|
||||
$result = $transport->send_receive(encoding => 'utf-8', envelope => 'ÄÖÜ',
|
||||
action => 'foo', content_type => 'application/xml');
|
||||
ok ! $transport->is_success();
|
||||
|
||||
{
|
||||
no warnings qw(redefine);
|
||||
my $request_sub =\&LWP::UserAgent::request;
|
||||
*LWP::UserAgent::request = sub {
|
||||
my $self = shift;
|
||||
my $request = shift;
|
||||
is $request->header('Content-Type'), 'text/xml; charset=utf-8';
|
||||
return HTTP::Response->new();
|
||||
};
|
||||
|
||||
$transport->send_receive(envelope => 'Test', action => 'foo');
|
||||
*LWP::UserAgent::request = $request_sub;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More tests => 3; #qw(no_plan);
|
||||
use Test::More tests => 5; #qw(no_plan);
|
||||
|
||||
use_ok qw(SOAP::WSDL::XSD::ComplexType);
|
||||
|
||||
@@ -11,7 +11,8 @@ eval { $obj->serialize('foo') };
|
||||
like $@, qr{sorry, \s we \s just}xsm;
|
||||
|
||||
$obj->set_targetNamespace('bar');
|
||||
|
||||
ok $obj->set_abstract(1);
|
||||
ok $obj->set_final(1);
|
||||
eval {
|
||||
$obj->serialize(
|
||||
'foo', 'bar', { autotype => 1 , namespace => {} }
|
||||
|
||||
@@ -327,8 +327,12 @@ like $@, qr{unknown \s field \s foobar \s in \s MyType }xms;
|
||||
eval { $obj->set_FOO(42) };
|
||||
like $@, qr{Can't \s locate \s object \s method}x, 'error on calling unknown object method';
|
||||
|
||||
eval { MyType->set_FOO(42) };
|
||||
like $@, qr{Can't \s locate \s object \s method}x, 'error on calling unknown class method';
|
||||
TODO: {
|
||||
local $TODO = "Identify calls to class methods";
|
||||
|
||||
eval { MyType->set_FOO(42) };
|
||||
like $@, qr{Can't \s locate \s class \s method}x, 'error on calling unknown class method';
|
||||
}
|
||||
|
||||
ok ! MyType->can('set_FOO'), 'MyType->can("setFOO")';
|
||||
|
||||
@@ -338,7 +342,7 @@ eval { MyType->new({ FOO => 42 }) };
|
||||
like $@, qr{unknown \s field \s}xm, 'error passing unknown field to constructor';
|
||||
|
||||
eval {
|
||||
# catch warning -
|
||||
# catch warning -
|
||||
local $SIG{__WARN__} = sub {};
|
||||
SOAP::WSDL::XSD::Typelib::ComplexType::AUTOMETHOD()
|
||||
};
|
||||
|
||||
@@ -193,6 +193,44 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="testReferencesExtension">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="data" type="tns:testReferencedExtension" />
|
||||
<xsd:element minOccurs="1" maxOccurs="1" name="flags" type="xsd:int" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:complexType name="testReferencedExtension">
|
||||
<xsd:complexContent mixed="false">
|
||||
<xsd:extension base="tns:testExtensionBase">
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" maxOccurs="1"
|
||||
name="test1" type="xsd:int" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1"
|
||||
name="test2" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="test3"
|
||||
type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1"
|
||||
name="test4" type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1"
|
||||
name="test5" type="xsd:boolean" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="test6"
|
||||
type="xsd:string" />
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="test7"
|
||||
type="xsd:int" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="testExtensionBase" abstract="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element minOccurs="0" maxOccurs="1" name="test"
|
||||
type="xsd:string" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
<xsd:element name="testElementNestedExtension" type="tns:testComplexNestedExtension" />
|
||||
<xsd:element name="testElementString" type="xsd:string" />
|
||||
<xsd:element name="testElementInt" type="xsd:int" />
|
||||
@@ -272,6 +310,27 @@ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xm
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="abstractComplexType" abstract="true">
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="intermediateComplexType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="abstractComplexType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Name" type="xsd:string"/>
|
||||
<xsd:element name="GivenName" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="finalComplexType">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="intermediateComplexType">
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="completelyEmptyComplexType">
|
||||
</xsd:complexType>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
|
||||
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
|
||||
targetNamespace="urn:HelloWorld"
|
||||
xmlns:tns="urn:HelloWorld"
|
||||
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||
<types>
|
||||
<s:schema elementFormDefault="qualified"
|
||||
@@ -37,6 +38,53 @@
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
|
||||
|
||||
<s:complexType name="testAbstract" abstract="true">
|
||||
<s:sequence>
|
||||
<s:element name="abstract" type="s:string"/>
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="testAbstractChild" abstract="true">
|
||||
<s:complexContent>
|
||||
<s:extension base="tns:testAbstract">
|
||||
<s:sequence>
|
||||
<s:element name="abstractChild" type="s:string"/>
|
||||
</s:sequence>
|
||||
</s:extension>
|
||||
</s:complexContent>
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="testAbstractGrandChild">
|
||||
<s:complexContent>
|
||||
<s:extension base="tns:testAbstractChild">
|
||||
<s:sequence>
|
||||
<s:element name="abstractGrandChild" type="s:string"/>
|
||||
</s:sequence>
|
||||
</s:extension>
|
||||
</s:complexContent>
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="GrandParent" abstract="true">
|
||||
</s:complexType>
|
||||
|
||||
<s:complexType name="Parent" abstract="true">
|
||||
<s:complexContent>
|
||||
<s:extension base="tns:GrandParent"/>
|
||||
</s:complexContent>
|
||||
</s:complexType>
|
||||
<s:complexType name="Child">
|
||||
<s:complexContent>
|
||||
<s:extension base="tns:Parent">
|
||||
<s:sequence>
|
||||
<s:element name="foo" type="s:string"/>
|
||||
</s:sequence>
|
||||
</s:extension>
|
||||
</s:complexContent>
|
||||
</s:complexType>
|
||||
|
||||
|
||||
</s:schema>
|
||||
</types>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user