From: daniel dot seif at castex dot cc Operating system: Red Hat 5 EL PHP version: 5.2.5 PHP Bug Type: SOAP related Bug description: SoapEnc Arrays and Single Element Arrays
Description: ------------ If a SoapServer-Object is instantiated with the option SOAP_SINGLE_ELEMENT_ARRAYS (to automatically get an array if defined in the wsdl) together with SOAP_USE_XSI_ARRAY_TYPE (to allow array types instead of wsdl types), an request sent with an SOAPEnc:Array will be transformed to an array with a "deepness" of 2. Reproduce code: --------------- class SoapHandler { function getSomething($arguments) { print_r($arguments); } } /** * SoapServer */ $server = new SoapServer($wsdl, array( 'uri' => $uri, 'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)); $server->setClass('SoapHandler'); $server->handle(); /** * request **/ <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns4848:getSomething> <arguments xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[2]"> <item xsi:type="xsd:string">String 1</item> <item xsi:type="xsd:string">String 2</item> </arguments> </ns4848:getRouteMiles> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Expected result: ---------------- Array ( [0] => String 1 [1] => String 2 ) Actual result: -------------- Array ( [0] => Array ( [0] => String 1 [1] => String 2 ) ) -- Edit bug report at http://bugs.php.net/?id=43338&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43338&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43338&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43338&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43338&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43338&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43338&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43338&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43338&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43338&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43338&r=support Expected behavior: http://bugs.php.net/fix.php?id=43338&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43338&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43338&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43338&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43338&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43338&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43338&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43338&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43338&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43338&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43338&r=mysqlcfg