From: potyomkine at gmail dot com Operating system: FreeBSD PHP version: 5.2.5 PHP Bug Type: SOAP related Bug description: problems with creating xml from array(SOAPCLIENT)
Description: ------------ problem with creating xml from array I call function $client = new SoapClient(WSDL); $client->function($arr); where var_dump($arr) === array(1) { ["Items"]=> array(1) { ["BatchFileItem"]=> array(1) { [0]=> array(9) { ["ProgMFG"]=> string(13) "progmfg-00000" ["ProdLine"]=> string(14) "prodline-00000" ["ArtNumber"]=> string(9) "art-00000" ["Vendor"]=> string(5) "Luval" ["Measure"]=> string(2) "kg" ["Group"]=> string(10) "skovorodki" ["Cube"]=> string(8) "232.5655" ["Weight"]=> string(9) "2323.2323" ["DescriptionList"]=> array(1) { ["LocalizedDescription"]=> array(3) { [0]=> array(2) { ["Language"]=> string(2) "EN" ["Description"]=> array(2) { ["Short"]=> string(15) "eng short descr" ["Long"]=> string(24) "english long description" } } [1]=> array(2) { ["Language"]=> string(2) "RU" ["Description"]=> array(2) { ["Short"]=> string(15) "rus short descr" ["Long"]=> string(24) "russian long description" } } [2]=> array(2) { ["Language"]=> string(2) "RU" ["Description"]=> array(2) { ["Short"]=> string(15) "rus short descr" ["Long"]=> string(24) "russian long description" } } } } } } } } but when I see request it is look like this <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/"> <SOAP-ENV:Body> <ns1:function> <ns1:Items> <ns1:BatchFileItem> <ns1:ProgMFG>progmfg-00000</ns1:ProgMFG> <ns1:ProdLine>prodline-00000</ns1:ProdLine> <ns1:ArtNumber>art-00000</ns1:ArtNumber> <ns1:Vendor>Luval</ns1:Vendor> <ns1:Measure>kg</ns1:Measure> <ns1:Group>skovorodki</ns1:Group> <ns1:Cube>232.5655</ns1:Cube> <ns1:Weight>2323.2323</ns1:Weight> </ns1:BatchFileItem> </ns1:Items> </ns1:function> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Reproduce code: --------------- $client->function($arr); where var_dump($arr) === array(1) { ["Items"]=> array(1) { ["BatchFileItem"]=> array(1) { [0]=> array(9) { ["ProgMFG"]=> string(13) "progmfg-00000" ["ProdLine"]=> string(14) "prodline-00000" ["ArtNumber"]=> string(9) "art-00000" ["Vendor"]=> string(5) "Luval" ["Measure"]=> string(2) "kg" ["Group"]=> string(10) "skovorodki" ["Cube"]=> string(8) "232.5655" ["Weight"]=> string(9) "2323.2323" ["DescriptionList"]=> array(1) { ["LocalizedDescription"]=> array(3) { [0]=> array(2) { ["Language"]=> string(2) "EN" ["Description"]=> array(2) { ["Short"]=> string(15) "eng short descr" ["Long"]=> string(24) "english long description" } } [1]=> array(2) { ["Language"]=> string(2) "RU" ["Description"]=> array(2) { ["Short"]=> string(15) "rus short descr" ["Long"]=> string(24) "russian long description" } } [2]=> array(2) { ["Language"]=> string(2) "RU" ["Description"]=> array(2) { ["Short"]=> string(15) "rus short descr" ["Long"]=> string(24) "russian long description" } } } } } } } } Expected result: ---------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/"> <SOAP-ENV:Body> <ns1:function> <ns1:Items> <ns1:BatchFileItem> <ns1:ProgMFG>progmfg-00000</ns1:ProgMFG> <ns1:ProdLine>prodline-00000</ns1:ProdLine> <ns1:ArtNumber>art-00000</ns1:ArtNumber> <ns1:Vendor>Luval</ns1:Vendor> <ns1:Measure>kg</ns1:Measure> <ns1:Group>skovorodki</ns1:Group> <ns1:Cube>232.5655</ns1:Cube> <ns1:Weight>2323.2323</ns1:Weight> <ns1:DescriptionList> <ns1:LocalizedDescription> <ns1:Language>EN</ns1:Language> <ns1:Description> <ns1:Short>eng short descr</ns1:Short> <ns1:Long>english long description</ns1:Long> </ns1:Description> </ns1:LocalizedDescription> <ns1:LocalizedDescription> <ns1:Language>RU</ns1:Language> <ns1:Description> <ns1:Short>rus short descr</ns1:Short> <ns1:Long>russian long description</ns1:Long> </ns1:Description> </ns1:LocalizedDescription> <ns1:LocalizedDescription> <ns1:Language>RU</ns1:Language> <ns1:Description> <ns1:Short>rus short descr</ns1:Short> <ns1:Long>russian long description</ns1:Long> </ns1:Description> </ns1:LocalizedDescription> </ns1:DescriptionList> </ns1:BatchFileItem> </ns1:Items> </ns1:function> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Actual result: -------------- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://localhost/"> <SOAP-ENV:Body> <ns1:function> <ns1:Items> <ns1:BatchFileItem> <ns1:ProgMFG>progmfg-00000</ns1:ProgMFG> <ns1:ProdLine>prodline-00000</ns1:ProdLine> <ns1:ArtNumber>art-00000</ns1:ArtNumber> <ns1:Vendor>Luval</ns1:Vendor> <ns1:Measure>kg</ns1:Measure> <ns1:Group>skovorodki</ns1:Group> <ns1:Cube>232.5655</ns1:Cube> <ns1:Weight>2323.2323</ns1:Weight> </ns1:BatchFileItem> </ns1:Items> </ns1:function> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- Edit bug report at http://bugs.php.net/?id=44469&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44469&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44469&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44469&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44469&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44469&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44469&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44469&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44469&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44469&r=support Expected behavior: http://bugs.php.net/fix.php?id=44469&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44469&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44469&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44469&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44469&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44469&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44469&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44469&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44469&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44469&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44469&r=mysqlcfg