[libsoap-wsdl-perl] 01/08: add patch fixing reversing of namespace hashes

Damyan Ivanov dmn at moszumanska.debian.org
Wed Jan 15 09:50:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository libsoap-wsdl-perl.

commit 07e7a4f8346d90c0c5cc212c5990aabb1b858f81
Author: Damyan Ivanov <dmn at debian.org>
Date:   Wed Jan 15 09:11:57 2014 +0000

    add patch fixing reversing of namespace hashes
---
 debian/changelog                                 |  1 +
 debian/patches/003_wsdl_based_serializer.t.patch | 62 ++++++++++++++++++++++++
 debian/patches/series                            |  1 +
 3 files changed, 64 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 760a724..b8d69c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,7 @@ libsoap-wsdl-perl (2.00.10-2) UNRELEASED; urgency=low
   * add libtest-xml-perl to build-dependencies enabling additional tests
   * add patch fixing class loading in _factory()
     adds additional dependency on libclass-load-perl
+  * add patch fixing reversing of namespace hashes
 
  -- Ansgar Burchardt <ansgar at debian.org>  Wed, 27 Jul 2011 18:47:44 +0200
 
diff --git a/debian/patches/003_wsdl_based_serializer.t.patch b/debian/patches/003_wsdl_based_serializer.t.patch
new file mode 100644
index 0000000..79fd315
--- /dev/null
+++ b/debian/patches/003_wsdl_based_serializer.t.patch
@@ -0,0 +1,62 @@
+--- a/lib/SOAP/WSDL/Base.pm
++++ b/lib/SOAP/WSDL/Base.pm
+@@ -174,6 +174,19 @@ sub schema {
+     return $parent->schema();
+ }
+ 
++sub prefix_from_namespace {
++    my ( $self, $ns ) = @_;
++
++    my %prefix;
++
++    while ( my ( $prefix, $ns ) = each %$ns ) {
++        next if $prefix eq '#default';
++        $prefix{$ns} = $prefix;
++    }
++
++    return \%prefix;
++}
++
+ 1;
+ 
+ __END__
+--- a/lib/SOAP/WSDL/XSD/Builtin.pm
++++ b/lib/SOAP/WSDL/XSD/Builtin.pm
+@@ -19,8 +19,8 @@ sub serialize {
+     $xml .= '<' . join ' ', $name, @{ $opt->{ attributes } };
+     if ( $opt->{ autotype }) {
+         my $ns = $self->get_targetNamespace();
+-        my %prefix_of = reverse %{ $opt->{ namespace } };
+-        my $prefix = $prefix_of{ $ns }
++        my $prefix_of = $self->prefix_from_namespace( $opt->{ namespace } );
++        my $prefix = $prefix_of->{ $ns }
+             || die 'No prefix found for namespace '. $ns;
+         $xml .= ' type="' . $prefix . ':'
+           . $self->get_name() . '"';
+--- a/lib/SOAP/WSDL/XSD/ComplexType.pm
++++ b/lib/SOAP/WSDL/XSD/ComplexType.pm
+@@ -98,8 +98,8 @@ sub serialize {
+     if ( $opt->{ autotype }) {
+         my $ns = $self->get_targetNamespace();
+         # reverse namespace by prefix hash
+-        my %prefix_of = reverse %{ $opt->{ namespace } };
+-        my $prefix = $prefix_of{ $ns }
++        my $prefix_of = $self->prefix_from_namespace( $opt->{ namespace } );
++        my $prefix = $prefix_of->{ $ns }
+             || die 'No prefix found for namespace '. $ns;
+         $xml .= join q{}, " type=\"$prefix:", $self->get_name(), '" '
+             if ($self->get_name() );
+--- a/lib/SOAP/WSDL/XSD/SimpleType.pm
++++ b/lib/SOAP/WSDL/XSD/SimpleType.pm
+@@ -100,9 +100,9 @@ sub _serialize_single {
+     $xml .= '<' . join ' ', $name, @{ $opt->{ attributes } };
+     if ( $opt->{ autotype }) {
+         # reverse namespace by prefix hash
+-        my %prefix_of = reverse %{ $opt->{ namespace } };
++        my $prefix_of = $self->prefix_from_namespace( $opt->{namespace} );
+         my $ns = $self->get_targetNamespace();
+-        my $prefix = $prefix_of{ $ns }
++        my $prefix = $prefix_of->{ $ns }
+            || die 'No prefix found for namespace '. $ns;
+         $xml .= ' type="' . $prefix . ':' . $self->get_name() .'"';
+     }
diff --git a/debian/patches/series b/debian/patches/series
index 6659c77..dcf473e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ pod-whatis.patch
 pod-spelling.patch
 lvalue-modification-5.18.patch
 isa_UNIVERSAL.patch
+003_wsdl_based_serializer.t.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libsoap-wsdl-perl.git



More information about the Pkg-perl-cvs-commits mailing list