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.