Skip Menu |
 

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

Report information
The Basics
Id: 59705
Status: rejected
Priority: 0/
Queue: SOAP-Lite

People
Owner: Nobody in particular
Requestors: alex.peeters [...] citap.be
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.710.09
Fixed in: (no value)



Subject: HASHES changed since SOAP-Lite-0.710.09, and this gives problems!
Download (untitled) / with headers
text/plain 87.8k

Message body is not shown because it is too large.

And broken in all later versions!
From: brendan [...] collegenet.com
Download (untitled) / with headers
text/plain 8.6k
I have experienced something like this as well while testing a migration of our software from CentOS (SOAP::Lite v. 0.710) to Debian (SOAP::Lite v. 0.712). Sample Soap envelope: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <qas:QASearchResult xmlns:qas="http://www.qas.com/web-2007-08" VerifyLevel="PremisesPartial"> <qas:QAPicklist> <qas:FullPicklistMoniker>bSUSADwXbBwUBODA1IFNXIEJyb2Fkd2F5LCwsUG9ydGxhbmQsT1IsOTcyMDUAKgMAAA--</qas:FullPicklistMoniker> <qas:PicklistEntry Multiples="true" UnresolvableRange="true"> <qas:Moniker>_OUSADwXbBwMDAQAGE6oaQAAAAAAAQgA-</qas:Moniker> <qas:PartialAddress>805 SW Broadway Ste 900 ... 930, Portland OR [even] 97205-3349</qas:PartialAddress> <qas:Picklist>805 SW Broadway Ste 900 ... 930, Portland OR [even]</qas:Picklist> <qas:Postcode>97205-3349</qas:Postcode> <qas:Score>66</qas:Score> </qas:PicklistEntry> <qas:PicklistEntry FullAddress="true"> <qas:Moniker>tOUSADwXbBwMDAQAGE6odQAAAAAAAQgA-</qas:Moniker> <qas:PartialAddress>805 SW Broadway Ste 1000, Portland OR 97205-3350</qas:PartialAddress> <qas:Picklist>805 SW Broadway Ste 1000, Portland OR</qas:Picklist> <qas:Postcode>97205-3350</qas:Postcode> <qas:Score>66</qas:Score> </qas:PicklistEntry> [...] <qas:Prompt>Enter selection</qas:Prompt> <qas:Total>47</qas:Total> </qas:QAPicklist> </qas:QASearchResult> </soap:Body> </soap:Envelope> The previous code would iterate over the PicklistEntry nodes using dataof, since I need to access both attributes like FullAddress="true" and the "values" (the nodes inside). In 0.710 (not sure which sub-iteration of 0.710), each SOAP::Data object for a PicklistEntry node would have a 'value' that was a hash of node names pointing at their values. In 0.712 I'm not surprised to now see the inner nodes (like qas:Moniker) now represented as SOAP::Data objects, but I am surprised to find them wrapped as values inside a reference to a SOAP::Data object with no 'name' (see the Data::Dumper output below). excerpts of code to iterate over and print PicklistEntry nodes: my $somPicklist = $somResult->match("//QASearchResult/QAPicklist/"); [...] foreach my $pick ( $somPicklist->dataof('//QAPicklist/PicklistEntry') ) { print Dumper($pick), "\n"; } ===================== Dumper of $pick (PicklistEntry) in CentOS version: .710: $VAR1 = bless( { '_name' => 'PicklistEntry', '_uri' => 'http://www.qas.com/web-2007-08', '_signature' => [], '_value' => [ { 'Score' => '66', 'Moniker' => 'EOUSADwXbBwMDAQAGE6nZQAAAAAAAQgA-', 'Picklist' => '805 SW Broadway, Portland OR', 'Postcode' => '97205-3303', 'PartialAddress' => '805 SW Broadway, Portland OR 97205-3303' } ], '_prefix' => 'qas', '_attr' => { 'FullAddress' => 'true' } }, 'SOAP::Data' ); ----- ref $pick->value eq 'HASH' access Moniker with: $pick->value->{'Moniker'} ===================== Dumper of $pick (PicklistEntry) in Debian version: .712: $VAR1 = bless( { '_name' => 'PicklistEntry', '_uri' => 'http://www.qas.com/web-2007-08', '_signature' => [], '_value' => [ \bless( { '_signature' => [], '_value' => [ bless( { '_name' => 'Moniker', '_uri' => 'http://www.qas.com/web-2007-08', '_signature' => [], '_value' => [ 'EOUSADwXbBwMDAQAGE6nZQAAAAAAAQgA-' ], '_prefix' => 'qas', '_attr' => {} }, 'SOAP::Data' ), bless( { '_name' => 'PartialAddress', '_uri' => 'http://www.qas.com/web-2007-08', '_signature' => [], '_value' => [ '805 SW Broadway, Portland OR 97205-3303' ], '_prefix' => 'qas', '_attr' => {} }, 'SOAP::Data' ), bless( { '_name' => 'Picklist', '_uri' => 'http://www.qas.com/web-2007-08', '_signature' => [], '_value' => [ '805 SW Broadway, Portland OR' ], '_prefix' => 'qas', '_attr' => {} }, 'SOAP::Data' ), bless( { '_name' => 'Postcode', '_uri' => 'http://www.qas.com/web-2007-08', '_signature' => [], '_value' => [ '97205-3303' ], '_prefix' => 'qas', '_attr' => {} }, 'SOAP::Data' ), bless( { '_name' => 'Score', '_uri' => 'http://www.qas.com/web-2007-08', '_signature' => [], '_value' => [ '66' ], '_prefix' => 'qas', '_attr' => {} }, 'SOAP::Data' ) ], '_attr' => {} }, 'SOAP::Data' ) ], '_prefix' => 'qas', '_attr' => { 'FullAddress' => 'true' } }, 'SOAP::Data' ); ---- ref $pick->value eq 'REF' access Moniker with: ${$pick->value}->value->name('Moniker')->value ==== I don't see anything in the change log that advertises this sort of API change, so I'm seeing it as a bug. I am interested in workarounds, too, if anyone has any. Code examples also attached as a text file to preserve formatting.
Subject: QAS SOAP Notes
Download QAS SOAP Notes
application/octet-stream 7.6k

Message body not shown because it is not plain text.

Hi, to make a long story short: You've been relying on a bug. The rt ticket in question is #39672 So why is this a bug? The example XML is <qas:PicklistEntry Multiples="true" UnresolvableRange="true"> <qas:Moniker>_OUSADwXbBwMDAQAGE6oaQAAAAAAAQgA-</qas:Moniker> <qas:PartialAddress>805 SW Broadway Ste 900 ... 930, Portland OR [even] 97205-3349</qas:PartialAddress> <qas:Picklist>805 SW Broadway Ste 900 ... 930, Portland OR [even]</qas:Picklist> <qas:Postcode>97205-3349</qas:Postcode> <qas:Score>66</qas:Score> </qas:PicklistEntry> and in former versions SOAP::Lite returned a has ref. If you look closer at the XML (and the hash ref, and the SOAP::Data object tree), the difference is, that the Hash elements are (erroneously) not namespace-qualified, while the SOAP::Data objects are. By returning a hash ref, SOAP::Lite ignored the namespaces, and returned a slightly incorrect result. "Fixing" this would break every client relying on correct namespace processing. Best regards, Martin


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.