|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-25 10:34 UTC] daniel dot seif at castex dot de
[2010-07-22 02:47 UTC] daniel dot seif at castex dot de
[2010-07-22 03:01 UTC] daniel dot seif at castex dot de
-PHP Version: 5.2CVS-2009-04-25
+PHP Version: 5.*
[2010-07-22 03:01 UTC] daniel dot seif at castex dot de
[2012-06-13 06:49 UTC] daniel dot seif at castex dot de
[2021-03-25 11:19 UTC] cmb@php.net
-Type: Bug
+Type: Documentation Problem
[2021-03-25 11:19 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 10:00:01 2025 UTC |
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 ) )