Skip Menu |
 

This queue is for tickets about the SOAP-WSDL CPAN distribution.

Report information
The Basics
Id: 74257
Status: open
Priority: 0/
Queue: SOAP-WSDL

People
Owner: Nobody in particular
Requestors: d.thomas [...] its.uq.edu.au
Cc: dam [...] cpan.org
AdminCc:

Bug Information
Severity: Important
Broken in: 2.00.10
Fixed in: (no value)



Subject: 2.00.10 tests FAIL under bleadperl 5.15.7
Download (untitled) / with headers
text/plain 812b
unlike building with same module set under 5.14.2, several tests fail with "Can't modify non- lvalue subroutine call at .../blib/lib/SOAP/WSDL.pm line 167" NB line 167 is the 'return' sub _wsdl_get_service :PRIVATE { my $ident = ident shift; my $wsdl = $definitions_of{ $ident }; return $service_of{ $ident } = $servicename_of{ $ident } ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; } ## end sub _wsdl_get_service tests PASS in 2.00.99_3 (28-Mar-2010), but marked DEVELOPER RELEASE Changes file doesn't mention anything past _1, but SOAP/WSDL.pm is only 12K compared with 24K in 2.00.10, so there have been significant code changes. Is it OK to use 2.00.99_3 or should 2.00.10 be patched ?
Subject: 2.00.10 tests FAIL under perl-5.16.0-RC2
From: cpan698301 [...] mstier.de
Download (untitled) / with headers
text/plain 140b
Bug confirmed also for official perl 5.16.0-RC2 on Debian 6 (i586/x86_64) and SLES 10 SP3, SLES 11 SP1, Ubuntu 11.04, Ubuntu 11.10 (x86_64).
From: cpan698301 [...] mstier.de
Download (untitled) / with headers
text/plain 17.9k

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #74257] 2.00.10 tests FAIL under bleadperl 5.15.7
Date: Tue, 29 May 2012 19:18:20 +0200
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Download (untitled) / with headers
text/plain 1.6k
Hi, 2.0.99_3 is going to become 2.1 - there's significant change from the 2.0 releases. I'm not sure whether the reported bug is an error in SOAP::WSDL or an error in perl itself (lvalue handling changed with 5.16 - and I actually don't see an lvalue in the code reported), so I'll have to look into it. Martin Am Montag, den 23.01.2012, 03:02 -0500 schrieb d.thomas@its.uq.edu.au via RT: Show quoted text
> Mon Jan 23 03:02:18 2012: Request 74257 was acted upon. > Transaction: Ticket created by d.thomas@its.uq.edu.au > Queue: SOAP-WSDL > Subject: 2.00.10 tests FAIL under bleadperl 5.15.7 > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: d.thomas@its.uq.edu.au > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=74257 > > > > unlike building with same module set under 5.14.2, several tests fail with "Can't modify non- > lvalue subroutine call at .../blib/lib/SOAP/WSDL.pm line 167" > > NB line 167 is the 'return' > sub _wsdl_get_service :PRIVATE { > my $ident = ident shift; > my $wsdl = $definitions_of{ $ident }; > return $service_of{ $ident } = $servicename_of{ $ident } > ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) > : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; > } ## end sub _wsdl_get_service > > tests PASS in 2.00.99_3 (28-Mar-2010), but marked DEVELOPER RELEASE > Changes file doesn't mention anything past _1, but SOAP/WSDL.pm is only > 12K compared with 24K in 2.00.10, so there have been significant code changes. > > Is it OK to use 2.00.99_3 or should 2.00.10 be patched ? > >
Subject: Re: [rt.cpan.org #74257] 2.00.10 tests FAIL under bleadperl 5.15.7
Date: Tue, 29 May 2012 20:32:51 +0000
To: "<bug-SOAP-WSDL [...] rt.cpan.org>" <bug-SOAP-WSDL [...] rt.cpan.org>
From: Danny Thomas <d.thomas [...] its.uq.edu.au>
Download (untitled) / with headers
text/plain 240b
On 30/05/2012, at 3:18 AM, Martin Kutter via RT wrote: Show quoted text
> don't see an lvalue in the code reported), so I'll have to look into it
I didn't either, Thanks for having a look. A posting to perl5-porters list might be helpful. thanks Danny
Download (untitled) / with headers
text/plain 987b
On Tue May 29 13:18:34 2012, martin.kutter@fen-net.de wrote: Show quoted text
> Hi, > > 2.0.99_3 is going to become 2.1 - there's significant change from the > 2.0 releases. > > I'm not sure whether the reported bug is an error in SOAP::WSDL or an > error in perl itself (lvalue handling changed with 5.16 - and I > actually > don't see an lvalue in the code reported), so I'll have to look into > it.
?: has higher precedence than = so $wsdl->find_service() is assigned to when $servicename_of{ $ident } is true, because this: return $service_of{ $ident } = $servicename_of{ $ident } ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; means this: return $service_of{ $ident } = ( $servicename_of{ $ident } ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) : $service_of{ $ident } ) = $wsdl->get_service()->[ 0 ];
Is there any progress with this issue? I saw mention of a 2.1 release.
Subject: [PATCH] Workaround for passing tests in Perl verisons >= 5.16
RT-Send-CC: martin.kutter [...] fen-net.de
remove code that have never worked, but causes described problem
Subject: 0001-Workaround-for-passing-tests-in-Perl-verisons-5.16.patch
From: Alexander Orlovskiy <nordicdyno@gmail.com> Date: Wed, 15 Aug 2012 14:48:31 +0400 Subject: [PATCH] Workaround for passing tests in Perl verisons >= 5.16 - remove code that never works, but caused problem with warning message "Can't modify non-lvalue subroutine" in tests --- lib/SOAP/WSDL.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/SOAP/WSDL.pm b/lib/SOAP/WSDL.pm index 6a753ea..b11b5f5 100644 --- a/lib/SOAP/WSDL.pm +++ b/lib/SOAP/WSDL.pm @@ -164,18 +164,14 @@ sub wsdlinit { sub _wsdl_get_service :PRIVATE { my $ident = ident shift; my $wsdl = $definitions_of{ $ident }; - return $service_of{ $ident } = $servicename_of{ $ident } - ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) - : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; + return $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; } ## end sub _wsdl_get_service sub _wsdl_get_port :PRIVATE { my $ident = ident shift; my $wsdl = $definitions_of{ $ident }; my $ns = $wsdl->get_targetNamespace(); - return $port_of{ $ident } = $portname_of{ $ident } - ? $service_of{ $ident }->get_port( $ns, $portname_of{ $ident } ) - : $port_of{ $ident } = $service_of{ $ident }->get_port()->[ 0 ]; + return $port_of{ $ident } = $service_of{ $ident }->get_port()->[ 0 ]; } sub _wsdl_get_binding :PRIVATE { -- 1.7.11.4
From: Tod McQuillin
Download (untitled) / with headers
text/plain 232b
On Wed Aug 08 13:57:05 2012, ETHER wrote: Show quoted text
> Is there any progress with this issue? I saw mention of a 2.1 release.
I can't comment on the 2.1 release, but for now I am using the attached patch and it fixes the test failures for me.
Subject: SOAP-WSDL-patch.txt
+++ SOAP-WSDL-2.00.10/lib/SOAP/WSDL.pm 2012-09-27 04:48:08.703876166 +0200 @@ -166,7 +166,7 @@ my $wsdl = $definitions_of{ $ident }; return $service_of{ $ident } = $servicename_of{ $ident } ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) - : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; + : ( $service_of{ $ident } = $wsdl->get_service()->[ 0 ] ); } ## end sub _wsdl_get_service sub _wsdl_get_port :PRIVATE {
From: Tod McQuillin
Download (untitled) / with headers
text/plain 412b
On Wed Sep 26 23:05:12 2012, https://me.yahoo.com/a/ttRfJqMLg8VqUXspbHxFNDN1JyfrZ1M-#62b4c wrote: Show quoted text
> On Wed Aug 08 13:57:05 2012, ETHER wrote:
> > Is there any progress with this issue? I saw mention of a 2.1 release.
> > I can't comment on the 2.1 release, but for now I am using the attached > patch and it fixes the test failures for me.
Sorry, previous patch was incomplete; please use the attached instead.
Subject: SOAP-WSDL-patch.txt
diff -ru SOAP-WSDL-2.00.10-/lib/SOAP/WSDL.pm SOAP-WSDL-2.00.10/lib/SOAP/WSDL.pm --- SOAP-WSDL-2.00.10-/lib/SOAP/WSDL.pm 2009-05-16 00:51:04.000000000 +0200 +++ SOAP-WSDL-2.00.10/lib/SOAP/WSDL.pm 2012-09-27 07:36:11.465877550 +0200 @@ -166,7 +166,7 @@ my $wsdl = $definitions_of{ $ident }; return $service_of{ $ident } = $servicename_of{ $ident } ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) - : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; + : ( $service_of{ $ident } = $wsdl->get_service()->[ 0 ] ); } ## end sub _wsdl_get_service sub _wsdl_get_port :PRIVATE { @@ -175,7 +175,7 @@ my $ns = $wsdl->get_targetNamespace(); return $port_of{ $ident } = $portname_of{ $ident } ? $service_of{ $ident }->get_port( $ns, $portname_of{ $ident } ) - : $port_of{ $ident } = $service_of{ $ident }->get_port()->[ 0 ]; + : ( $port_of{ $ident } = $service_of{ $ident }->get_port()->[ 0 ] ); } sub _wsdl_get_binding :PRIVATE {
Download (untitled) / with headers
text/plain 1.6k
On Thu Sep 27 01:39:29 2012, https://me.yahoo.com/a/ttRfJqMLg8VqUXspbHxFNDN1JyfrZ1M-#62b4c wrote: Show quoted text
> On Wed Sep 26 23:05:12 2012, > https://me.yahoo.com/a/ttRfJqMLg8VqUXspbHxFNDN1JyfrZ1M-#62b4c wrote:
> > On Wed Aug 08 13:57:05 2012, ETHER wrote:
> > > Is there any progress with this issue? I saw mention of a 2.1 release.
> > > > I can't comment on the 2.1 release, but for now I am using the attached > > patch and it fixes the test failures for me.
> > Sorry, previous patch was incomplete; please use the attached instead.
This patch didn't work for me, although looking at the code that is being patched it seems to be rather verbose. Here is my patch that allows tests to pass (perl 5.16.3) diff -u lib/SOAP/WSDL.pm ../WSDL.pm --- lib/SOAP/WSDL.pm 2009-05-16 00:51:04.000000000 +0200 +++ ../WSDL.pm 2013-08-08 14:38:35.000000000 +0200 @@ -166,7 +166,7 @@ my $wsdl = $definitions_of{ $ident }; return $service_of{ $ident } = $servicename_of{ $ident } ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) - : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; + : $wsdl->get_service()->[ 0 ]; } ## end sub _wsdl_get_service sub _wsdl_get_port :PRIVATE { @@ -174,8 +174,8 @@ my $wsdl = $definitions_of{ $ident }; my $ns = $wsdl->get_targetNamespace(); return $port_of{ $ident } = $portname_of{ $ident } - ? $service_of{ $ident }->get_port( $ns, $portname_of{ $ident } ) - : $port_of{ $ident } = $service_of{ $ident }->get_port()->[ 0 ]; + ? $service_of{ $ident }->get_port( $ns, $portname_of{ $ident } )->[ 0 ] + : $service_of{ $ident }->get_port()->[ 0 ]; } sub _wsdl_get_binding :PRIVATE {
Download (untitled) / with headers
text/plain 394b
На 23 ян. 2012, пн 10:02:18, d.thomas@its.uq.edu.au написа: Show quoted text
> unlike building with same module set under 5.14.2, several tests fail > with "Can't modify non- > lvalue subroutine call at .../blib/lib/SOAP/WSDL.pm line 167"
With perl 5.18 even more fail due to hash randomization. Attached are patches that make the whole test suite to pass, repeatedly (on current Debian unstable).
Subject: load-with-Class::Load.patch
Description: fix class loading with Perl 5.18 In Perl 5.18 everything is an object, so $type->isa('UNIVERSAL') succeeds even when $type is a plain string representng a class that was never loaded. . Deferring the check and the actual class loading to Class::Load fixes the issue. Author: Damyan Ivanov <dmn@debian.org> Bug: https://rt.cpan.org/Ticket/Display.html?id=74257 Bug-Debian: http://bugs.debian.org/720964 --- a/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm +++ b/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm @@ -7,6 +7,7 @@ use SOAP::WSDL::XSD::Typelib::Builtin; use Scalar::Util qw(blessed); use Data::Dumper; require Class::Std::Fast::Storable; +use Class::Load (); use base qw(SOAP::WSDL::XSD::Typelib::Builtin::anyType); @@ -155,9 +156,8 @@ sub _factory { my $type = $CLASSES_OF{ $class }->{ $name } or croak "No class given for $name"; - # require all types here - $type->isa('UNIVERSAL') - or eval "require $type" + Class::Load::is_class_loaded($type) + or eval { Class::Load::load_class $type } or croak $@; # check now, so we don't need to do it later. --- a/META.yml +++ b/META.yml @@ -8,6 +8,7 @@ license: artistic resources: license: http://opensource.org/licenses/artistic-license.php requires: + Class::Load: 0 Class::Std::Fast: 0.0.5 Data::Dumper: 0 Date::Format: 0
Subject: lvalue-modification-5.18.patch
Description: fix invalid lvalue assignments with perl 5.18 also fixes a missing ->[0] after get_port() Author: Lee Johnson <leejo@cpan.org> Bug: https://rt.cpan.org/Ticket/Display.html?id=74257 Bug-Debian: http://bugs.debian.org/720964 --- a/lib/SOAP/WSDL.pm +++ b/lib/SOAP/WSDL.pm @@ -166,7 +166,7 @@ sub _wsdl_get_service :PRIVATE { my $wsdl = $definitions_of{ $ident }; return $service_of{ $ident } = $servicename_of{ $ident } ? $wsdl->find_service( $wsdl->get_targetNamespace() , $servicename_of{ $ident } ) - : $service_of{ $ident } = $wsdl->get_service()->[ 0 ]; + : $wsdl->get_service()->[ 0 ]; } ## end sub _wsdl_get_service sub _wsdl_get_port :PRIVATE { @@ -174,8 +174,8 @@ sub _wsdl_get_port :PRIVATE { my $wsdl = $definitions_of{ $ident }; my $ns = $wsdl->get_targetNamespace(); return $port_of{ $ident } = $portname_of{ $ident } - ? $service_of{ $ident }->get_port( $ns, $portname_of{ $ident } ) - : $port_of{ $ident } = $service_of{ $ident }->get_port()->[ 0 ]; + ? $service_of{ $ident }->get_port( $ns, $portname_of{ $ident } )->[0] + : $service_of{ $ident }->get_port()->[ 0 ]; } sub _wsdl_get_binding :PRIVATE {
Subject: prefix_from_namespace.patch
Description: fix reversal of namespace hashes to get a prefix hash Author: Damyan Ivanov <dmn@debian.org> Bug: https://rt.cpan.org/Ticket/Display.html?id=74257 Bug-Debian: http://bugs.debian.org/720964 --- a/lib/SOAP/WSDL/Base.pm +++ b/lib/SOAP/WSDL/Base.pm @@ -174,6 +174,38 @@ sub schema { return $parent->schema(); } +# this is used when we have a namespaces hash, but need to find the prefix to +# some namespace +# using %prefix = reverse %namespace; can break, as %namespace may contain +# duplicate values, due to the '#default' key: +# +# '#default' => 'urn:myNamespace', +# 'tns' => 'urn:myNamespace', +# 'xml' => 'http://www.w3.org/XML/1998/namespace', +# 'wsdl' => 'http://schemas.xmlsoap.org/wsdl/', +# 'xsd' => 'http://www.w3.org/2001/XMLSchema', +# 'soap' => 'http://schemas.xmlsoap.org/wsdl/soap/' +# +# 'reverse'-ing that with Perl 5.18 gives 'urn:myNamespace' => '#default' or +# 'urn:myNamespace' => 'tns' with 50% probability due to the hash randomization +# feature. +# Using reverse causes t/003_wsdl_based_serializer.t to fail most of the time +# because the prefix for 'urn:myNamespace' is sometimes '#default' (wrong), +# sometimes 'tns' (right) + +sub prefix_from_namespace { + my ( $self, $ns ) = @_; + + my %prefix; + + while ( my ( $prefix, $ns ) = each %$ns ) { + $prefix{$ns} = $prefix + unless $prefix eq '#default' and exists $prefix{$ns}; + } + + 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() .'"'; }
Subject: use-Test::XML.patch
Download use-Test::XML.patch
text/x-diff 834b
Description: use Test::XML for comparing XML instead of 'eq' 'eq' works most of the time, until you have XML structures which have more than one attribute. Their serialization is non-deterministic since the order of the attributes is not predictable. Author: Damyan Ivanov <dmn@debian.org> Bug: https://rt.cpan.org/Ticket/Display.html?id=74257 Bug-Debian: http://bugs.debian.org/720964 --- a/t/SOAP/WSDL/05_simpleType-list.t +++ b/t/SOAP/WSDL/05_simpleType-list.t @@ -36,7 +36,11 @@ ok $xml = $soap->call('test', testAll => #5 ok ( $xml2 = $soap->call('test', testAll => "1 2" ) , 'Serialized scalar call' ); #6 -ok( $xml eq $xml2, 'Got expected result'); +SKIP: { + skip "Test::XML needed for comparing XML", 1 + unless eval { require Text::XML }; + is_xml( $xml, $xml2, 'Got expected result'); +} #7 TODO: {
Subject: [rt.cpan.org #74257] 2.00.10 tests FAIL under bleadperl 5.15.7
Date: Wed, 16 Jul 2014 13:35:38 +0200
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Sven Schober <sven.schober [...] uni-ulm.de>
Download (untitled) / with headers
text/plain 157b
For the lazy ones: I took the sources for 2.00.10 and applied d.thomas' patches and put all in a github repo: https://github.com/sschober/perl-soap-wsdl
Download smime.p7s
application/pkcs7-signature 4.6k

Message body not shown because it is not plain text.

Subject: [rt.cpan.org #74257] 2.00.10 tests FAIL under bleadperl 5.15.7
Date: Wed, 16 Jul 2014 13:35:38 +0200
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Sven Schober <sven.schober [...] uni-ulm.de>
Download (untitled) / with headers
text/plain 157b
For the lazy ones: I took the sources for 2.00.10 and applied d.thomas' patches and put all in a github repo: https://github.com/sschober/perl-soap-wsdl
Download smime.p7s
application/pkcs7-signature 4.6k

Message body not shown because it is not plain text.

RT-Send-CC: cpan698301 [...] mstier.de, sven.schober [...] uni-ulm.de, martin.kutter [...] fen-net.de
Download (untitled) / with headers
text/plain 1.3k
On Wed Jul 16 07:45:20 2014, sven.schober@uni-ulm.de wrote: Show quoted text
> For the lazy ones: I took the sources for 2.00.10 and applied d.thomas' > patches and put all in a github repo: > > https://github.com/sschober/perl-soap-wsdl >
I just uploaded SOAP-WSDL-3.00.0_1.tar.gz to PAUSE. The CPAN admins were kind enough to grant me co-maint on this module. I didn't see this ticket with all of the compiled patches, and that git repo, so I wound up re-doing most of this work myself. Whoops. Perhaps some of those implementations are less hackish than mine. Mine was a rush job. I don't plan to fix everything wrong with this module, but it's heavily used and a common dependency, so I'd like to keep it basically running and installing on new Perls. d.thomas and everyone else: Please let me know if you'd like commit access to that repo. I'd appreciate the help. I could see if I have permission as co-maintainer to add other co-maintainers, too. That's a developer release. The _1 on the end will keep it from going into the master CPAN index. I would appreciate help testing, and I want to see how it does in smoke tests. If things look basically good (or not worse than 2.x), I'll do non-developer release. To find it, you have to search for me ("SWALTERS") on search.cpan.org and then click over to my list of modules: http://search.cpan.org/~swalters/
Download (untitled) / with headers
text/plain 194b
The most recent version of the module does not have the issues described in the ticket. May I suggest it to be closed, to clear the queue? -- Cheers, ZZ [ https://metacpan.org/author/ZOFFIX ]


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.