Bug #73237 [Opn]: Nested object in "any" element overwrites other fields
| From: | ksmiley at salesforce dot com | Date: | Mon, 03 Oct 2016 22:12:54 +0000 |
| Subject: | Bug #73237 [Opn]: Nested object in "any" element overwrites other fields | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204434@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73237&edit=1
ID: 73237
User updated by: ksmiley at salesforce dot com
Reported by: ksmiley at salesforce dot com
Summary: Nested object in "any" element overwrites other
fields
Status: Open
Type: Bug
Package: SOAP related
Operating System: Any
PHP Version: 7.0.11
Block user comment: N
Private report: N
New Comment:
I didn't realize I wouldn't be able to edit the "test script" section.
Here's the PR with a test: https://github.com/php/php-src/pull/2153
Previous Comments:
------------------------------------------------------------------------
[2016-10-03 21:48:38] ksmiley at salesforce dot com
Description:
------------
When a WSDL declares a complex type with an "any" element and the SOAP response includes
multiple fields that will all be placed under the generic "any" element, if one of the
response fields is another complex type, it will overwrite the other fields.
Test script:
---------------
Will link to a pull request with a test case after submitting this.
Expected result:
----------------
["any"]=>
array(2) {
[0]=>
string(175)
"<sf:CampaignId>701i0000001lreeAAA</sf:CampaignId><sf:Status>Sent</sf:Status><sf:ContactId
xsi:nil="true"/><sf:LeadId>1UrbYFEAZ</sf:LeadId><sf:Contact
xsi:nil="true"/>"
["Lead"]=>
object(stdClass)#5 (3) {
["type"]=>
string(4) "Lead"
["Id"]=>
NULL
["any"]=>
string(44) "<sf:Email>angela.lansbury@cbs.com</sf:Email>"
}
}
Actual result:
--------------
["any"]=>
array(2) {
[0]=>
object(stdClass)#5 (3) {
["type"]=>
string(4) "Lead"
["Id"]=>
NULL
["any"]=>
string(44) "<sf:Email>angela.lansbury@cbs.com</sf:Email>"
}
["Lead"]=>
object(stdClass)#5 (3) {
["type"]=>
string(4) "Lead"
["Id"]=>
NULL
["any"]=>
string(44) "<sf:Email>angela.lansbury@cbs.com</sf:Email>"
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73237&edit=1