Compare commits

..
1 Commits
Author SHA1 Message Date
Martin Kutter 5c42b1d8f6 import SOAP-WSDL 2.00_04 from CPAN
git-cpan-module:   SOAP-WSDL
git-cpan-version:  2.00_04
git-cpan-authorid: MKUTTER
git-cpan-file:     authors/id/M/MK/MKUTTER/SOAP-WSDL-2.00_04.tar.gz
2009-12-12 19:47:43 -08:00
12 changed files with 48 additions and 25 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ use Module::Build;
Module::Build->new( Module::Build->new(
dist_abstract => 'SOAP with WSDL support', dist_abstract => 'SOAP with WSDL support',
dist_name => 'SOAP-WSDL', dist_name => 'SOAP-WSDL',
dist_version => '2.00_03', dist_version => '2.00_04',
module_name => 'SOAP::WSDL', module_name => 'SOAP::WSDL',
license => 'artistic', license => 'artistic',
requires => { requires => {
+2 -2
View File
@@ -1,6 +1,6 @@
--- ---
name: SOAP-WSDL name: SOAP-WSDL
version: 2.00_03 version: 2.00_04
author: author:
abstract: SOAP with WSDL support abstract: SOAP with WSDL support
license: artistic license: artistic
@@ -19,7 +19,7 @@ meta-spec:
provides: provides:
SOAP::WSDL: SOAP::WSDL:
file: lib/SOAP/WSDL.pm file: lib/SOAP/WSDL.pm
version: 2.00_03 version: 2.00_04
SOAP::WSDL::Base: SOAP::WSDL::Base:
file: lib/SOAP/WSDL/Base.pm file: lib/SOAP/WSDL/Base.pm
SOAP::WSDL::Binding: SOAP::WSDL::Binding:
+1 -1
View File
@@ -8,7 +8,7 @@ use SOAP::WSDL::SAX::WSDLHandler;
use base qw(SOAP::Lite); use base qw(SOAP::Lite);
use Data::Dumper; use Data::Dumper;
our $VERSION='2.00_03'; our $VERSION='2.00_04';
BEGIN { BEGIN {
eval { eval {
+1
View File
@@ -6,6 +6,7 @@ use SOAP::WSDL::Envelope;
use SOAP::Lite; use SOAP::Lite;
use Class::Std::Storable; use Class::Std::Storable;
use SOAP::WSDL::SAX::MessageHandler; use SOAP::WSDL::SAX::MessageHandler;
use SOAP::WSDL::SOAP::Typelib::Fault11;
# Package globals for speed... # Package globals for speed...
my $PARSER; my $PARSER;
@@ -25,6 +25,8 @@ sub serialize {
sub as_bool :BOOLIFY { sub as_bool :BOOLIFY {
return $value_of { ident $_[0] }; return $value_of { ident $_[0] };
} }
Class::Std::initialize(); # make :BOOLIFY overloading serializable
1; 1;
@@ -3,6 +3,8 @@ use strict;
use warnings; use warnings;
use Class::Std::Storable; use Class::Std::Storable;
my %xmlns_of :ATTR(:name<xmlns> :default<()>);
# use $_[1] for performance # use $_[1] for performance
sub start_tag { sub start_tag {
my $opt = $_[1] ||= {}; my $opt = $_[1] ||= {};
@@ -20,6 +22,8 @@ sub end_tag {
sub serialize_qualified :STRINGIFY { sub serialize_qualified :STRINGIFY {
return $_[0]->serialize( { qualified => 1 } ); return $_[0]->serialize( { qualified => 1 } );
} }
Class::Std::initialize(); # make :STRINGIFY overloading serializable
1; 1;
@@ -33,6 +33,8 @@ sub set_value {
: 0; : 0;
} }
Class::Std::initialize(); # make :BOOLIFY overloading serializable
1; 1;
__END__ __END__
@@ -18,6 +18,7 @@ sub as_num :NUMERIFY :BOOLIFY {
return $_[0]->get_value(); return $_[0]->get_value();
} }
Class::Std::initialize(); # make :NUMERIFY :BOOLIFY overloading serializable
1; 1;
@@ -8,6 +8,7 @@ sub as_num :NUMERIFY {
return $_[0]->get_value(); return $_[0]->get_value();
} }
Class::Std::initialize(); # make :NUMERIFY overloading serializable
1; 1;
@@ -16,6 +16,8 @@ my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
sub as_num :NUMERIFY { sub as_num :NUMERIFY {
return $_[0]->get_value(); return $_[0]->get_value();
} }
Class::Std::initialize(); # make :NUMERIFY overloading serializable
1; 1;
@@ -7,6 +7,8 @@ use base qw(SOAP::WSDL::XSD::Typelib::Builtin::decimal);
sub as_num :NUMERIFY { sub as_num :NUMERIFY {
return $_[0]->get_value(); return $_[0]->get_value();
} }
Class::Std::initialize(); # make :NUMERIFY overloading serializable
1; 1;
+29 -21
View File
@@ -84,12 +84,14 @@ sub START {
# iterate over keys of arguments # iterate over keys of arguments
# and call set appropriate field in clase # and call set appropriate field in clase
map { ($ATTRIBUTES_OF{ $class }->{ $_ }) ? map { ($ATTRIBUTES_OF{ $class }->{ $_ })
do { ? do {
my $method = "set_$_"; my $method = "set_$_";
$self->$method( $args_of->{ $_ } ); $self->$method( $args_of->{ $_ } );
} }
: croak "unknown field $_" : $_ eq 'xmlns'
? do {}
: croak "unknown field $_ in $class";
} keys %$args_of; } keys %$args_of;
}; };
@@ -114,24 +116,30 @@ sub _serialize {
# get_elements is inlined for performance. # get_elements is inlined for performance.
return join q{} , map { return join q{} , map {
my $element = $ATTRIBUTES_OF{ $class }->{ $_ }->{ $ident }; my $element = $ATTRIBUTES_OF{ $class }->{ $_ }->{ $ident };
$element = [ $element ]
if not ref $element eq 'ARRAY'; if (defined $element) {
my $name = $_; $element = [ $element ]
if not ref $element eq 'ARRAY';
map { my $name = $_;
# serialize element elements with their own serializer
# but name them like they're named here. map {
if ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) { # serialize element elements with their own serializer
$_->serialize( { name => $_ } ); # but name them like they're named here.
} if ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) {
# serialize complextype elments (of other types) with their $_->serialize( { name => $_ } );
# serializer, but add element tags around. }
else { # serialize complextype elments (of other types) with their
join q{}, $_->start_tag({ name => $name }) # serializer, but add element tags around.
, $_->serialize() else {
, $_->end_tag({ name => $name }); join q{}, $_->start_tag({ name => $name })
} , $_->serialize()
} @{ $element } , $_->end_tag({ name => $name });
}
} @{ $element }
}
else {
q{};
}
} (@{ $ELEMENTS_FROM{ $class } }); } (@{ $ELEMENTS_FROM{ $class } });
} }