Skip Menu |
 

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

Report information
The Basics
Id: 34714
Status: resolved
Priority: 0/
Queue: SOAP-WSDL

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 2.00.01



Subject: MessageParser misses character data in elements just below SOAP-ENV:Body
Download (untitled) / with headers
text/plain 636b
This bug is triggered by the same WSDL as in bug 34688. After running wsdl2perl.pl, I use the attached helloWorld.pl to query the webservice. The output is "Use of uninitialized value in concatenation (.) or string at ./helloWorld.pl line 9" instead of the expected result. The problem seems to be that the relevant character data is contained in the helloWorldResponse element directly below the SOAP-ENV:Body element, and the MessageParser misses it there. The attached patch fixes the bug for me, but please check if it is really the correct way to do it because my understanding of SOAP::WSDL is not that good. Thank you.
Subject: MessageParser.diff
Download MessageParser.diff
text/x-diff 1.2k
--- SOAP-WSDL-2.00_33/lib/SOAP/WSDL/Expat/MessageParser.pm +++ SOAP-WSDL-2.00_33/lib/SOAP/WSDL/Expat/MessageParser.pm @@ -194,13 +194,6 @@ sub _initialize { $depth--; - # return if there's only one elment - can't set it in parent ;-) - # but set as root element if we don't have one already. - if (not defined $list->[-1]) { - $self->{ data } = $current if (not exists $self->{ data }); - return; - }; - # we only set character values in leaf nodes if ($_leaf) { # Use dirty but fast access via global variables. @@ -216,6 +209,13 @@ sub _initialize { # empty characters $characters = q{}; + # return if there's only one elment - can't set it in parent ;-) + # but set as root element if we don't have one already. + if (not defined $list->[-1]) { + $self->{ data } = $current if (not exists $self->{ data }); + return; + }; + # set appropriate attribute in last element # multiple values must be implemented in base class # $_method = "add_$_localname";
Subject: helloWorld.pl
Download helloWorld.pl
text/x-perl 270b
#!/usr/bin/perl $^W = 1; # like perl -w use strict; use MyInterfaces::TestService::TestPort; my $interface = MyInterfaces::TestService::TestPort->new(); my $response = $interface->helloWorld({value => 'hello'}, {value => 'world'}); print $response->get_value()."\n";
Subject: Re: [rt.cpan.org #34714] MessageParser misses character data in elements just below SOAP-ENV:Body
Date: Sun, 06 Apr 2008 09:37:55 +0200
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Download (untitled) / with headers
text/plain 1.2k
Both bug report and patch are correct. Applied in SVN. BTW: Can I include the WSDL you provided in the distribution (for tests)? Martin Am Samstag, den 05.04.2008, 20:46 -0400 schrieb http://www.jkg.in/openid/ds8tbj1k via RT: Show quoted text
> Sat Apr 05 20:46:34 2008: Request 34714 was acted upon. > Transaction: Ticket created by http://www.jkg.in/openid/ds8tbj1k > Queue: SOAP-WSDL > Subject: MessageParser misses character data in elements just below > SOAP-ENV:Body > Broken in: (no value) > Severity: Normal > Owner: Nobody > Requestors: > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=34714 > > > > This bug is triggered by the same WSDL as in bug 34688. After running > wsdl2perl.pl, I use the attached helloWorld.pl to query the > webservice. The output is "Use of uninitialized value in concatenation > (.) or string at ./helloWorld.pl line 9" instead of the expected > result. > > The problem seems to be that the relevant character data is contained > in the helloWorldResponse element directly below the SOAP-ENV:Body > element, and the MessageParser misses it there. The attached patch > fixes the bug for me, but please check if it is really the correct way > to do it because my understanding of SOAP::WSDL is not that good. > Thank you. >
Subject: Re: [rt.cpan.org #34714] MessageParser misses character data in elements just below SOAP-ENV:Body
Date: Sun, 06 Apr 2008 09:37:55 +0200
To: bug-SOAP-WSDL [...] rt.cpan.org
From: Martin Kutter <martin.kutter [...] fen-net.de>
Download (untitled) / with headers
text/plain 1.2k
Both bug report and patch are correct. Applied in SVN. BTW: Can I include the WSDL you provided in the distribution (for tests)? Martin Am Samstag, den 05.04.2008, 20:46 -0400 schrieb http://www.jkg.in/openid/ds8tbj1k via RT: Show quoted text
> Sat Apr 05 20:46:34 2008: Request 34714 was acted upon. > Transaction: Ticket created by http://www.jkg.in/openid/ds8tbj1k > Queue: SOAP-WSDL > Subject: MessageParser misses character data in elements just below > SOAP-ENV:Body > Broken in: (no value) > Severity: Normal > Owner: Nobody > Requestors: > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=34714 > > > > This bug is triggered by the same WSDL as in bug 34688. After running > wsdl2perl.pl, I use the attached helloWorld.pl to query the > webservice. The output is "Use of uninitialized value in concatenation > (.) or string at ./helloWorld.pl line 9" instead of the expected > result. > > The problem seems to be that the relevant character data is contained > in the helloWorldResponse element directly below the SOAP-ENV:Body > element, and the MessageParser misses it there. The attached patch > fixes the bug for me, but please check if it is really the correct way > to do it because my understanding of SOAP::WSDL is not that good. > Thank you. >
Download (untitled) / with headers
text/plain 126b
I hereby place the WSDL (test.wsdl attached to bug 34688) into the public domain. You may do whatever you want to do with it.


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.