ID: 46616 User updated by: justin dot hendrickson at gmail dot com Reported By: justin dot hendrickson at gmail dot com -Status: Feedback +Status: Open Bug Type: SOAP related Operating System: Ubuntu 8.04 PHP Version: 5.2.6 New Comment:
No good. The descriptions are still missing the relevant information. ["descriptions"]=> object(stdClass)#17 (1) { ["pd"]=> array(4) { [0]=> object(stdClass)#18 (1) { ["t"]=> int(1) } [1]=> object(stdClass)#19 (1) { ["t"]=> int(2) } [2]=> object(stdClass)#20 (1) { ["t"]=> int(3) } [3]=> object(stdClass)#21 (1) { ["t"]=> int(0) } } } $> php -v PHP 5.2.12RC4-dev (cli) (built: Dec 9 2009 09:56:13) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies Previous Comments: ------------------------------------------------------------------------ [2009-12-08 20:48:52] fel...@php.net Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2009-06-15 09:58:06] darkservant at gmail dot com Also happens on Windows and PHP 5.2.9 where a soap response contains a namespace: SOAP Response containing <TOKEN xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="false">xyz</TOKEN> produces a TOKEN => NULL instead of TOKEN => xyz inside the response object. ------------------------------------------------------------------------ [2008-11-19 14:49:52] justin dot hendrickson at gmail dot com Description: ------------ When casting a Soap response to a PHP value, if a node containing both attributes and a value is encountered, the value is dropped. There's not much information about what is suppose to happen in this case, but from what I gathered, the value is suppose to end up in a property named "_". Reproduce code: --------------- The service is private, so I cannot provide the URL, but I can supply the WSDL file upon email request. I can provide the result of the Soap request: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <SearchResult xmlns="http://com.etilize.spexlive" count="921"> <products> <productSummary id="1011038602"><manufacturer sku="MFC-9440CN" name="Brother Industries, Ltd" id="10328"/> <skus> <sku val="MFC-9440CN" type="MFGPARTNUMBER"/> <sku val="BRT MFC9440CN" type="SP Richards Catalog"/> <sku val="BRTMFC9440CN" type="SP Richards"/> <sku val="BRTMFC9440CN" type="United"/> <sku val="BRTMFC9440CN" type="IS Group"/> <sku val="BRTMFC9440CN" type="TriMega"/> </skus> <descriptions> <pd t="2">Brother MFC-9440CN Multifunction Printer</pd> <pd t="1">Brother MFC-9440CN Multifunction Printer - Color Laser - 21 ppm Mono - 21 ppm Color - 2400 x 600 dpi - Fax, Copier, Scanner, Printer - PictBridge - Mac</pd> <pd t="3">Multifunction Network Printer - Color Laser - 21 ppm Mono - 21 ppm Color - 2400 x 600 dpi - Fax, Copier, Scanner, Printer - PictBridge - Mac</pd> <pd t="0">MFC-9440CN CLR LASER P/S/C/F USB 2400X600 64MB 21PPM</pd> </descriptions> </productSummary> </products> </SearchResult> </soap:Body> </soap:Envelope> Expected result: ---------------- object(stdClass)#2 (2) { ["products"]=> object(stdClass)#3 (1) { ["productSummary"]=> array(1) { [0]=> object(stdClass)#4 (4) { ["manufacturer"]=> object(stdClass)#5 (3) { ["id"]=> int(10328) ["name"]=> string(23) "Brother Industries, Ltd" ["sku"]=> string(10) "MFC-9440CN" } ["skus"]=> object(stdClass)#6 (1) { ["sku"]=> array(6) { [0]=> object(stdClass)#7 (2) { ["val"]=> string(10) "MFC-9440CN" ["type"]=> string(13) "MFGPARTNUMBER" } [1]=> object(stdClass)#8 (2) { ["val"]=> string(13) "BRT MFC9440CN" ["type"]=> string(19) "SP Richards Catalog" } [2]=> object(stdClass)#9 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(11) "SP Richards" } [3]=> object(stdClass)#10 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(6) "United" } [4]=> object(stdClass)#11 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(8) "IS Group" } [5]=> object(stdClass)#12 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(7) "TriMega" } } } ["descriptions"]=> object(stdClass)#13 (1) { ["pd"]=> array(4) { [0]=> object(stdClass)#14 (1) { ["_"]=> "Brother MFC-9440CN Multifunction Printer" ["t"]=> int(2) } [1]=> object(stdClass)#15 (1) { ["_"]=> "Brother MFC-9440CN Multifunction Printer - Color Laser - 21 ppm Mono - 21 ppm Color - 2400 x 600 dpi - Fax, Copier, Scanner, Printer - PictBridge - Mac" ["t"]=> int(1) } [2]=> object(stdClass)#16 (1) { ["_"]=> "Multifunction Network Printer - Color Laser - 21 ppm Mono - 21 ppm Color - 2400 x 600 dpi - Fax, Copier, Scanner, Printer - PictBridge - Mac" ["t"]=> int(3) } [3]=> object(stdClass)#17 (1) { ["_"]=> "MFC-9440CN CLR LASER P/S/C/F USB 2400X600 64MB 21PPM" ["t"]=> int(0) } } } ["id"]=> int(1011038602) } } } ["count"]=> int(921) } Actual result: -------------- object(stdClass)#2 (2) { ["products"]=> object(stdClass)#3 (1) { ["productSummary"]=> array(1) { [0]=> object(stdClass)#4 (4) { ["manufacturer"]=> object(stdClass)#5 (3) { ["id"]=> int(10328) ["name"]=> string(23) "Brother Industries, Ltd" ["sku"]=> string(10) "MFC-9440CN" } ["skus"]=> object(stdClass)#6 (1) { ["sku"]=> array(6) { [0]=> object(stdClass)#7 (2) { ["val"]=> string(10) "MFC-9440CN" ["type"]=> string(13) "MFGPARTNUMBER" } [1]=> object(stdClass)#8 (2) { ["val"]=> string(13) "BRT MFC9440CN" ["type"]=> string(19) "SP Richards Catalog" } [2]=> object(stdClass)#9 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(11) "SP Richards" } [3]=> object(stdClass)#10 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(6) "United" } [4]=> object(stdClass)#11 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(8) "IS Group" } [5]=> object(stdClass)#12 (2) { ["val"]=> string(12) "BRTMFC9440CN" ["type"]=> string(7) "TriMega" } } } ["descriptions"]=> object(stdClass)#13 (1) { ["pd"]=> array(4) { [0]=> object(stdClass)#14 (1) { ["t"]=> int(2) } [1]=> object(stdClass)#15 (1) { ["t"]=> int(1) } [2]=> object(stdClass)#16 (1) { ["t"]=> int(3) } [3]=> object(stdClass)#17 (1) { ["t"]=> int(0) } } } ["id"]=> int(1011038602) } } } ["count"]=> int(921) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46616&edit=1