#46616 [NEW]: Value dropped when Soap response with nodes containing attributes and value
| From: | justin dot hendrickson at gmail dot com | Date: | Wed, 19 Nov 2008 14:49:52 +0000 |
| Subject: | #46616 [NEW]: Value dropped when Soap response with nodes containing attributes and value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-131111@lists.php.net to get a copy of this message | ||
From: justin dot hendrickson at gmail dot com
Operating system: Ubuntu 8.04
PHP version: 5.2.6
PHP Bug Type: SOAP related
Bug description: Value dropped when Soap response with nodes containing attributes and value
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 bug report at http://bugs.php.net/?id=46616&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46616&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46616&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46616&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46616&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46616&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=46616&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46616&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46616&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46616&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46616&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46616&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46616&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46616&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46616&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46616&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46616&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46616&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46616&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46616&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46616&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46616&r=mysqlcfg