import SOAP-WSDL 2.00_22 from CPAN

git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_22
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_22.tar.gz
This commit is contained in:
Martin Kutter authored and Michael G. Schwern committed 2009-12-12 19:48:06 -08:00
1 parent fa4d5dd884
commit 080b211e4e
22 files changed
+166 -67

No files matched your search

+7 -3
View File
@@ -4,11 +4,15 @@ $build = Module::Build->new(
create_makefile_pl => 'passthrough',
dist_abstract => 'SOAP with WSDL support',
dist_name => 'SOAP-WSDL',
dist_version => '2.00_20',
dist_version => '2.00_22',
module_name => 'SOAP::WSDL',
license => 'artistic',
requires => {
'Class::Std' => q/v0.0.8/,
# 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' => '5.8.0',
'Class::Std' => q/v0.0.8/,
'Class::Std::Storable' => 0,
'Data::Dumper' => 0,
'Date::Parse' => 0,
@@ -42,7 +46,7 @@ $build = Module::Build->new(
recursive_test_files => 1,
meta_add => {
no_index => {
namespace => 'SOAP::WSDL::Generator::Template::XSD',
directory => 'lib/SOAP/WSDL/Generator/Template/XSD/',
},
}
);
+29 -1
View File
@@ -1,4 +1,4 @@
Release notes for SOAP::WSDL 2.00_20
Release notes for SOAP::WSDL 2.00_22
-------
I'm proud to present a new pre-release version of SOAP::WSDL.
@@ -33,6 +33,34 @@ Features:
The following changes have been made:
2.00_22
----
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):
* [ 1817697 ] Dots in service/port names lead to broken interfaces
* [ 1817699 ] Templates not found on all OS
The following uncategorized improvements have been made:
* Code cleanup. The XSD library has been cleaned up a bit. Should result
in a minor speedup in serializing and deserializing XML messages,
2.00_21 - not released
----
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):
* [ 1810058 ] .tt's pod indexed on CPAN (again)
* [ 1809284 ] Rename SOAP::WSDL::Deserializer::SOAP11 to ::XSD
The following uncategorized improvements have been made:
* Requires at least perl 5.8.0. This is due to a bug in perls before -
see http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/929746
2.00_20
----
The following features were added (the numbers in square brackets are the
+5 -2
View File
@@ -40,7 +40,7 @@ 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/SOAP11.pm
lib/SOAP/WSDL/Deserializer/XSD.pm
lib/SOAP/WSDL/Deserializer/SOM.pm
lib/SOAP/WSDL/Expat/Base.pm
lib/SOAP/WSDL/Expat/Message2Hash.pm
@@ -102,7 +102,7 @@ lib/SOAP/WSDL/OpMessage.pm
lib/SOAP/WSDL/Part.pm
lib/SOAP/WSDL/Port.pm
lib/SOAP/WSDL/PortType.pm
lib/SOAP/WSDL/Serializer/SOAP11.pm
lib/SOAP/WSDL/Serializer/XSD.pm
lib/SOAP/WSDL/Service.pm
lib/SOAP/WSDL/SOAP/Address.pm
lib/SOAP/WSDL/SOAP/Body.pm
@@ -314,3 +314,6 @@ t/SOAP/WSDL/XSD/Typelib/Builtin/unsignedShort.t
t/test.wsdl
TEST_COVERAGE
TODO
SOAP-WSDL-2.00_21.ppd
SOAP-WSDL-2.00_21.zip
+19 -18
View File
@@ -1,9 +1,11 @@
---
name: SOAP-WSDL
version: 2.00_20
author:
version: 2.00_22
author: []
abstract: SOAP with WSDL support
license: artistic
resources:
license: http://opensource.org/licenses/artistic-license.php
requires:
Class::Std: v0.0.8
Class::Std::Storable: 0
@@ -18,12 +20,7 @@ requires:
Template: 0
Term::ReadKey: 0
XML::Parser::Expat: 0
generated_by: Module::Build version 0.2808
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.2.html
version: 1.2
no_index:
namespace: SOAP::WSDL::Generator::Template::XSD
perl: 5.8.0
provides:
SOAP::WSDL:
file: lib/SOAP/WSDL.pm
@@ -45,12 +42,12 @@ provides:
SOAP::WSDL::Deserializer::Hash:
file: lib/SOAP/WSDL/Deserializer/Hash.pm
version: 2.00_17
SOAP::WSDL::Deserializer::SOAP11:
file: lib/SOAP/WSDL/Deserializer/SOAP11.pm
version: 2.00_17
SOAP::WSDL::Deserializer::SOM:
file: lib/SOAP/WSDL/Deserializer/SOM.pm
version: 2.00_15
SOAP::WSDL::Deserializer::XSD:
file: lib/SOAP/WSDL/Deserializer/XSD.pm
version: 2.00_21
SOAP::WSDL::Expat::Base:
file: lib/SOAP/WSDL/Expat/Base.pm
SOAP::WSDL::Expat::Message2Hash:
@@ -108,9 +105,9 @@ provides:
SOAP::WSDL::SOAP::Typelib::Fault11:
file: lib/SOAP/WSDL/SOAP/Typelib/Fault11.pm
version: 2.00_17
SOAP::WSDL::Serializer::SOAP11:
file: lib/SOAP/WSDL/Serializer/SOAP11.pm
version: 2.00_13
SOAP::WSDL::Serializer::XSD:
file: lib/SOAP/WSDL/Serializer/XSD.pm
version: 2.00_21
SOAP::WSDL::Service:
file: lib/SOAP/WSDL/Service.pm
SOAP::WSDL::Transport::HTTP:
@@ -132,7 +129,7 @@ provides:
version: 2.00_17
SOAP::WSDL::XSD::Element:
file: lib/SOAP/WSDL/XSD/Element.pm
version: 2.00_17
version: 2.00_22
SOAP::WSDL::XSD::Schema:
file: lib/SOAP/WSDL/XSD/Schema.pm
SOAP::WSDL::XSD::Schema::Builtin:
@@ -239,12 +236,16 @@ provides:
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_16
version: 2.00_22
SOAP::WSDL::XSD::Typelib::Element:
file: lib/SOAP/WSDL/XSD/Typelib/Element.pm
SOAP::WSDL::XSD::Typelib::SimpleType:
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
SOAP::WSDL::XSD::Typelib::SimpleType::restriction:
file: lib/SOAP/WSDL/XSD/Typelib/SimpleType.pm
resources:
license: http://opensource.org/licenses/artistic-license.php
generated_by: Module::Build version 0.2808
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/
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<SOFTPKG NAME="SOAP-WSDL-2.00_21" VERSION="2,00_21,0,0">
<TITLE>SOAP-WSDL-2.00_21</TITLE>
<ABSTRACT>SOAP with WSDL support</ABSTRACT>
<AUTHOR>Martin Kutter &lt;MKUTTER@cpan.org&gt;</AUTHOR>
<IMPLEMENTATION>
<DEPENDENCY NAME="Class-Std" VERSION="v0,0,8,0" />
<DEPENDENCY NAME="Class-Std-Storable" VERSION="0,0,0,0" />
<DEPENDENCY NAME="Template-Toolkit" VERSION="0,0,0,0" />
<DEPENDENCY NAME="TimeDate" VERSION="0,0,0,0" />
<OS NAME="MSWin32" />
<ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" />
<CODEBASE HREF="SOAP-WSDL-2.00_21.zip" />
</IMPLEMENTATION>
</SOFTPKG>
Binary file not shown.
+7 -2
View File
@@ -604,6 +604,11 @@ details.
=over
=item * perl 5.8.0 or higher required
SOAP::WSDL needs perl 5.8.0 or higher. This is due to a bug in perls
before - see http://aspn.activestate.com/ASPN/Mail/Message/perl5-porters/929746 for details.
=item * Apache SOAP datatypes are not supported
You currently can't use SOAP::WSDL with Apache SOAP datatypes like map.
@@ -731,9 +736,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION
$Rev: 308 $
$Rev: 332 $
$LastChangedBy: kutterma $
$Id: WSDL.pm 308 2007-10-05 17:35:28Z kutterma $
$Id: WSDL.pm 332 2007-10-19 07:29:03Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL.pm $
=cut
@@ -1,11 +1,11 @@
package SOAP::WSDL::Deserializer::SOAP11;
package SOAP::WSDL::Deserializer::XSD;
use strict;
use warnings;
use Class::Std::Storable;
use SOAP::WSDL::SOAP::Typelib::Fault11;
use SOAP::WSDL::Expat::MessageParser;
our $VERSION='2.00_17';
our $VERSION='2.00_21';
my %class_resolver_of :ATTR(:name<class_resolver> :default<()>);
+2 -2
View File
@@ -3,7 +3,7 @@ use strict;
use warnings;
my %DESERIALIZER = (
'1.1' => 'SOAP::WSDL::Deserializer::SOAP11',
'1.1' => 'SOAP::WSDL::Deserializer::XSD',
);
# class method
@@ -64,7 +64,7 @@ SOAP::WSDL::Deserializer tries to load one of the following classes:
=back
By default, L<SOAP::WSDL::Deserializer::SOAP11|SOAP::WSDL::Deserializer::SOAP11>
By default, L<SOAP::WSDL::Deserializer::XSD|SOAP::WSDL::Deserializer::XSD>
is registered for SOAP1.1 messages.
=head1 METHODS
+3 -3
View File
@@ -5,7 +5,7 @@ use warnings;
our $VERSION='2.00_17';
my %SERIALIZER = (
'1.1' => 'SOAP::WSDL::Serializer::SOAP11',
'1.1' => 'SOAP::WSDL::Serializer::XSD',
);
# class method
@@ -138,9 +138,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION
$Rev: 325 $
$Rev: 329 $
$LastChangedBy: kutterma $
$Id: Serializer.pm 325 2007-10-18 10:27:46Z kutterma $
$Id: Serializer.pm 329 2007-10-18 19:42:09Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Factory/Serializer.pm $
=cut
+1 -1
View File
@@ -42,7 +42,7 @@ sub _process :PROTECTED {
%{ $arg_ref }
},
$output)
or die $tt->error();
or die $INCLUDE_PATH_of{ $ident }, '\\', $template, ' ', $tt->error();
}
+27 -1
View File
@@ -18,7 +18,29 @@ sub BUILD {
$self->set_RECURSION(1);
$self->set_INCLUDE_PATH( exists $arg_ref->{INCLUDE_PATH}
? $arg_ref->{INCLUDE_PATH}
: File::Spec->rel2abs( dirname __FILE__ ). '/XSD/'
: do {
# ignore uninitialized warnings - File::Spec warns about
# uninitialized values, probably because we have no filename
local $SIG{__WARN__} = sub {
return if ($_[0]=~m{\buninitialized\b});
CORE::warn @_;
};
# makeup path for the OS we're running on
my ($volume, $dir, $file) = File::Spec->splitpath(
File::Spec->rel2abs( dirname __FILE__ )
);
$dir = File::Spec->catdir($dir, $file, 'XSD');
# return path put together...
my $path = File::Spec->catpath( $volume, $dir );
# Fixup path for windows - / works fine, \ does
# not...
if ( eval { &Win32::BuildNumber } ) {
$path =~s{\\}{/}g;
}
$path;
}
);
}
@@ -64,6 +86,8 @@ sub generate_interface {
$service->get_name(),
$port_name,
);
print "Creating interface class $output\n";
$self->_process('Interface.tt',
{
service => $service,
@@ -96,6 +120,8 @@ sub generate_typemap {
my $output = $arg_ref->{ output }
? $arg_ref->{ output }
: $self->_generate_filename( $self->get_typemap_prefix(), $service->get_name() );
print "Creating typemap class $output\n";
$self->_process('Typemap.tt',
{
service => $service,
@@ -1,11 +1,10 @@
#!/usr/bin/perl -w
# TODO rename to ::XSD
package SOAP::WSDL::Serializer::SOAP11;
package SOAP::WSDL::Serializer::XSD;
use strict;
use warnings;
use Class::Std::Storable;
our $VERSION='2.00_13';
our $VERSION='2.00_21';
my $SOAP_NS = 'http://schemas.xmlsoap.org/soap/envelope/';
my $XML_INSTANCE_NS = 'http://www.w3.org/2001/XMLSchema-instance';
+1 -1
View File
@@ -4,7 +4,7 @@ use warnings;
use Class::Std::Storable;
use base qw(SOAP::WSDL::Base);
our $VERSION='2.00_17';
our $VERSION='2.00_22';
my %annotation_of :ATTR(:name<annotation> :default<()>);
my %simpleType_of :ATTR(:name<simpleType> :default<()>);
@@ -3,9 +3,6 @@ use strict;
use warnings;
use Class::Std::Storable;
# my %xmlns_of :ATTR(:get<xmlns> :init_arg<xmlns> :default<()>);
# sub set_xmlns { $xmlns_of{ ident $_[0] } = $_[1] };
sub get_xmlns { 'http://www.w3.org/2001/XMLSchema' };
# use $_[1] for performance
@@ -41,6 +41,7 @@ BEGIN {
sub set_value {
# use set_value from base class if we have a XML-DateTime format
#2037-12-31T00:00:00.0000000+01:00
return if not $_[1];
return $_[0]->SUPER::set_value($_[1]) if (
$_[1] =~ m{ ^\d{4} \- \d{2} \- \d{2}
T \d{2} \: \d{2} \: \d{2} (:? \. \d{1,7} )?
@@ -50,7 +51,8 @@ sub set_value {
# strptime sets empty values to undef - and strftime doesn't like that...
my @time_from = map { ! defined $_ ? 0 : $_ } strptime($_[1]);
undef $time_from[-1];
return if not (@time_from);
undef $time_from[$#time_from];
my $time_str = strftime( '%Y-%m-%dT%H:%M:%S%z', @time_from );
substr $time_str, -2, 0, ':';
+19 -15
View File
@@ -9,7 +9,7 @@ use Class::Std::Storable;
use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType);
our $VERSION = '2.00_16';
our $VERSION = '2.00_22';
my %ELEMENTS_FROM;
my %ATTRIBUTES_OF;
@@ -117,6 +117,7 @@ sub _factory {
? $_[1]
: die croak "cannot use $is_ref reference as value for $name - $type required"
: $type->new({ value => $_[1] });
return;
};
*{ "$class\::add_$name" } = sub {
@@ -125,15 +126,20 @@ sub _factory {
if not defined $_[1];
# first call
return $attribute_ref->{ $ident } = $_[1]
if not defined $attribute_ref->{ $ident };
if (not defined $attribute_ref->{ $ident }) {
$attribute_ref->{ $ident } = $_[1];
return;
}
# second call: listify previous value if it's no list
$attribute_ref->{ $ident } = [ $attribute_ref->{ $ident } ]
if not ref $attribute_ref->{ $ident } eq 'ARRAY';
if (not ref $attribute_ref->{ $ident } eq 'ARRAY') {
# second call: listify previous value if it's no list
$attribute_ref->{ $ident } = [ $attribute_ref->{ $ident } ];
return;
}
# second and following: add to list
return push @{ $attribute_ref->{ $ident } }, $_[1];
push @{ $attribute_ref->{ $ident } }, $_[1];
return;
};
*{ "$class\::$name" } = *{ "$class\::add_$name" };
@@ -175,7 +181,6 @@ sub _factory {
# But what about choice, extension ?
*{ "$class\::_serialize" } = sub {
my $ident = ident $_[0];
# my $class = ref $_[0];
# return concatenated return value of serialize call of all
# elements retrieved from get_elements expanding list refs.
# get_elements is inlined for performance.
@@ -210,14 +215,13 @@ sub _factory {
};
*{ "$class\::serialize" } = sub {
my ($self, $opt) = @_;
$opt ||= {};
$_[1] ||= {}; # maybe even replace by assigning a constant var
# do we have a empty element ?
return $self->start_tag({ %$opt, empty => 1 })
return $_[0]->start_tag({ %{ $_[1] }, empty => 1 })
if not defined $ELEMENTS_FROM{ $class } or not @{ $ELEMENTS_FROM{ $class } };
return join q{}, $self->start_tag($opt),
$self->_serialize(), $self->end_tag();
return join q{}, $_[0]->start_tag($_[1]),
$_[0]->_serialize(), $_[0]->end_tag();
}
}
@@ -377,9 +381,9 @@ Martin Kutter E<lt>martin.kutter fen-net.deE<gt>
=head1 REPOSITORY INFORMATION
$Rev: 323 $
$Rev: 337 $
$LastChangedBy: kutterma $
$Id: ComplexType.pm 323 2007-10-17 15:23:05Z kutterma $
$Id: ComplexType.pm 337 2007-10-22 20:04:59Z kutterma $
$HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm $
=cut
+8
View File
@@ -8,6 +8,8 @@ my %REF;
my %MIN_OCCURS;
my %MAX_OCCURS;
# TODO replace by generated methods?
#
# Class data - remember, we're the base class for a class factory or for
# generated code...
# use BLOCK: for scoping
@@ -48,6 +50,9 @@ sub start_tag {
if ($_[1]->{qualified}) {
push @attr_from, 'xmlns="' . $_[0]->get_xmlns . '"';
}
# do we need to check for name ? Element ref="" should have it's own
# start_tag. If we don't need to check, we can speed things up
return join q{ }, "<$_[1]->{ name }" , @attr_from , $ending if $_[1]->{ name };
return join q{ }, "<$NAME{ ref $_[0]}" , @attr_from , $ending;
}
@@ -61,6 +66,9 @@ sub start_tag {
# return "</$opt->{name}>" if $opt->{name};
# return "</"$NAME{$class}>";
#
# do we need to check for name ? Element ref="" should have it's own
# end_tag. If we don't need to check, we can speed things up by defining
# end tag with () prototype - perl will inline it for us if we do...
sub end_tag {
return "</$_[1]->{name}>" if $_[1]->{name};
return "</$NAME{ ref $_[0] }>";
+2 -2
View File
@@ -7,8 +7,8 @@ use lib '../lib';
my @modules = qw(
SOAP::WSDL
SOAP::WSDL::Client
SOAP::WSDL::Serializer::SOAP11
SOAP::WSDL::Deserializer::SOAP11
SOAP::WSDL::Serializer::XSD
SOAP::WSDL::Deserializer::XSD
SOAP::WSDL::Transport::HTTP
SOAP::WSDL::Definitions
SOAP::WSDL::Message
+2 -2
View File
@@ -10,7 +10,7 @@ eval {
import Test::XML;
};
use_ok qw/SOAP::WSDL::Serializer::SOAP11/;
use_ok qw/SOAP::WSDL::Serializer::XSD/;
my $opt = {
readable => 1,
@@ -18,7 +18,7 @@ my $opt = {
},
};
my $xml;
ok( $xml = SOAP::WSDL::Serializer::SOAP11->serialize(
ok( $xml = SOAP::WSDL::Serializer::XSD->serialize(
undef, undef, $opt
),
"serialize empty envelope"
+9 -2
View File
@@ -1,9 +1,12 @@
use Test::More;
use SOAP::Lite;
eval { require SOAP::Lite } or do {
plan skip_all => 'SOAP::Lite not available';
exit 0;
};
print "# Using SOAP::Lite $SOAP::Lite::VERSION\n";
use lib '../../../lib';
plan tests => 10;
use_ok qw(SOAP::WSDL::Deserializer::SOM);
@@ -14,8 +17,12 @@ ok my $som = $deserializer->deserialize(q{<a><b>1</b><b>2</b><c>3</c></a>});
my $data = $som->match('/a')->valueof;
is $data->{ c } , 3;
is $data->{ b }->[0] , 1;
is $data->{ b }->[1] , 2;
SKIP: {
skip "SOAP::Lite > 0.69 required" , 2 if ($SOAP::Lite::VERSION < 0.69);
is $data->{ b }->[0] , 1, "array values - SOAP::Lite $SOAP::Lite::VERSION";;
is $data->{ b }->[1] , 2, "array values - SOAP::Lite $SOAP::Lite::VERSION";;
}
eval { $deserializer->generate_fault({
role => 'soap:Server',
+3 -3
View File
@@ -2,12 +2,12 @@ use strict;
use warnings;
use Test::More tests => 5;
use SOAP::WSDL::Deserializer::SOAP11;
use SOAP::WSDL::Deserializer::XSD;
my $obj;
ok $obj = SOAP::WSDL::Deserializer::SOAP11->new();
ok $obj = SOAP::WSDL::Deserializer::SOAP11->new({
ok $obj = SOAP::WSDL::Deserializer::XSD->new();
ok $obj = SOAP::WSDL::Deserializer::XSD->new({
class_resolver => 'TestResolver',
some_other_option => 'ignored',
});