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

View File

@@ -2,7 +2,7 @@ use Module::Build;
Module::Build->new(
dist_abstract => 'SOAP with WSDL support',
dist_name => 'SOAP-WSDL',
dist_version => '2.00_03',
dist_version => '2.00_04',
module_name => 'SOAP::WSDL',
license => 'artistic',
requires => {

View File

@@ -1,6 +1,6 @@
---
name: SOAP-WSDL
version: 2.00_03
version: 2.00_04
author:
abstract: SOAP with WSDL support
license: artistic
@@ -19,7 +19,7 @@ meta-spec:
provides:
SOAP::WSDL:
file: lib/SOAP/WSDL.pm
version: 2.00_03
version: 2.00_04
SOAP::WSDL::Base:
file: lib/SOAP/WSDL/Base.pm
SOAP::WSDL::Binding:

View File

@@ -8,7 +8,7 @@ use SOAP::WSDL::SAX::WSDLHandler;
use base qw(SOAP::Lite);
use Data::Dumper;
our $VERSION='2.00_03';
our $VERSION='2.00_04';
BEGIN {
eval {

View File

@@ -6,6 +6,7 @@ use SOAP::WSDL::Envelope;
use SOAP::Lite;
use Class::Std::Storable;
use SOAP::WSDL::SAX::MessageHandler;
use SOAP::WSDL::SOAP::Typelib::Fault11;
# Package globals for speed...
my $PARSER;

View File

@@ -25,6 +25,8 @@ sub serialize {
sub as_bool :BOOLIFY {
return $value_of { ident $_[0] };
}
Class::Std::initialize(); # make :BOOLIFY overloading serializable
1;

View File

@@ -3,6 +3,8 @@ use strict;
use warnings;
use Class::Std::Storable;
my %xmlns_of :ATTR(:name<xmlns> :default<()>);
# use $_[1] for performance
sub start_tag {
my $opt = $_[1] ||= {};
@@ -20,6 +22,8 @@ sub end_tag {
sub serialize_qualified :STRINGIFY {
return $_[0]->serialize( { qualified => 1 } );
}
Class::Std::initialize(); # make :STRINGIFY overloading serializable
1;

View File

@@ -33,6 +33,8 @@ sub set_value {
: 0;
}
Class::Std::initialize(); # make :BOOLIFY overloading serializable
1;
__END__

View File

@@ -18,6 +18,7 @@ sub as_num :NUMERIFY :BOOLIFY {
return $_[0]->get_value();
}
Class::Std::initialize(); # make :NUMERIFY :BOOLIFY overloading serializable
1;

View File

@@ -8,6 +8,7 @@ sub as_num :NUMERIFY {
return $_[0]->get_value();
}
Class::Std::initialize(); # make :NUMERIFY overloading serializable
1;

View File

@@ -16,6 +16,8 @@ my %minExclusive_of :ATTR(:name<minExclusive> :default<()>);
sub as_num :NUMERIFY {
return $_[0]->get_value();
}
Class::Std::initialize(); # make :NUMERIFY overloading serializable
1;

View File

@@ -7,6 +7,8 @@ use base qw(SOAP::WSDL::XSD::Typelib::Builtin::decimal);
sub as_num :NUMERIFY {
return $_[0]->get_value();
}
Class::Std::initialize(); # make :NUMERIFY overloading serializable
1;

View File

@@ -84,12 +84,14 @@ sub START {
# iterate over keys of arguments
# and call set appropriate field in clase
map { ($ATTRIBUTES_OF{ $class }->{ $_ }) ?
do {
map { ($ATTRIBUTES_OF{ $class }->{ $_ })
? do {
my $method = "set_$_";
$self->$method( $args_of->{ $_ } );
}
: croak "unknown field $_"
: $_ eq 'xmlns'
? do {}
: croak "unknown field $_ in $class";
} keys %$args_of;
};
@@ -114,24 +116,30 @@ sub _serialize {
# get_elements is inlined for performance.
return join q{} , map {
my $element = $ATTRIBUTES_OF{ $class }->{ $_ }->{ $ident };
$element = [ $element ]
if not ref $element eq 'ARRAY';
my $name = $_;
map {
# serialize element elements with their own serializer
# but name them like they're named here.
if ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) {
$_->serialize( { name => $_ } );
}
# serialize complextype elments (of other types) with their
# serializer, but add element tags around.
else {
join q{}, $_->start_tag({ name => $name })
, $_->serialize()
, $_->end_tag({ name => $name });
}
} @{ $element }
if (defined $element) {
$element = [ $element ]
if not ref $element eq 'ARRAY';
my $name = $_;
map {
# serialize element elements with their own serializer
# but name them like they're named here.
if ( $_->isa( 'SOAP::WSDL::XSD::Typelib::Element' ) ) {
$_->serialize( { name => $_ } );
}
# serialize complextype elments (of other types) with their
# serializer, but add element tags around.
else {
join q{}, $_->start_tag({ name => $name })
, $_->serialize()
, $_->end_tag({ name => $name });
}
} @{ $element }
}
else {
q{};
}
} (@{ $ELEMENTS_FROM{ $class } });
}