Edit report at https://bugs.php.net/bug.php?id=49013&edit=1

 ID:                 49013
 Updated by:         cwei...@php.net
 Reported by:        egos at biz-club dot biz
 Summary:            SOAPClient interprets the parameters array
                     incorrectly
-Status:             No Feedback
+Status:             Re-Opened
 Type:               Bug
 Package:            SOAP related
 Operating System:   debian Lenny
-PHP Version:        5.2.6
+PHP Version:        5.5.1
 Block user comment: N
 Private report:     N

 New Comment:

We can reproduce the issue on PHP 5.1, see the files at http://p.cweiske.de/53:

SoapClient: http://p.cweiske.de/53/raw/soapclienttest.php
WSDL: http://p.cweiske.de/53/raw/test.wsdl

We give an associative array of parameters:

$arguments = array(
    'password' => 'password-value',
    'username' => 'username-value',
);

But the SOAP request has the values in wrong order:

<username xsi:type="xsd:string">password-value</username>
<password xsi:type="xsd:string">username-value</password>


Previous Comments:
------------------------------------------------------------------------
[2009-08-11 01:00:00] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------
[2009-08-03 15:17:46] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/



------------------------------------------------------------------------
[2009-07-22 07:20:03] egos at biz-club dot biz

Description:
------------
on Debian Lenny (php 5.2.6.dfsg.1-1+lenny3) i run the simple call.

please, take a look at var_dump of the parameters variable and at the generated 
xml code

Before xml is generated, it sorts the parameters, so that values loose bindings 
to the keys of the array.

Reproduce code:
---------------
$client->__soapCall("updateMonitoring", $parameters);
var_dump($parameters);
echo "<br><hr>";
echo " REQUEST:\n" . $client->__getLastRequest() . "\n<br><hr>";




Expected result:
----------------
correct xml, based on $parameters. Here,s the var_dump of it $parameters I put 
there

  ["login"]=>
  string(4) "***"
  ["password"]=>
  string(32) "***"
  ["monitoring_id"]=>
  string(5) "18700"
  ["plan_budget_total"]=>
  string(2) "70"
  ["plan_budget_navigation"]=>
  string(1) "0"
  ["plan_pay"]=>
  string(2) "25"
  ["total"]=>
  int(66)
  ["task_training"]=>
  int(0)
  ["without_preliminary_examination"]=>
  int(0)
  ["without_competition"]=>
  int(0)
  ["city_0_59"]=>
  int(0)
  ["city_60_100"]=>
  int(0)
  ["city_101_110"]=>
  int(0)
  ["city_111_120"]=>
  int(0)
  ["city_121_130"]=>
  int(0)
  ["city_131_140"]=>
  int(0)
  ["city_141_150"]=>
  int(1)
  ["city_151_160"]=>
  int(1)
  ["city_161_170"]=>
  int(2)
  ["city_171_180"]=>
  int(0)
  ["city_181_190"]=>
  int(2)
  ["city_191_200"]=>
  int(2)
  ["city_201_210"]=>
  int(5)
  ["city_211_220"]=>
  int(3)
  ["city_221_230"]=>
  int(1)
  ["city_231_240"]=>
  int(8)
  ["city_241_250"]=>
  int(1)
  ["city_251_260"]=>
  int(4)
  ["city_261_270"]=>
  int(2)
  ["city_271_280"]=>
  int(5)
  ["city_281_290"]=>
  int(5)
  ["city_291_300"]=>
  int(3)
  ["city_301_310"]=>
  int(10)
  ["city_311_320"]=>
  int(3)
  ["city_321_330"]=>
  int(2)
  ["city_331_340"]=>
  int(2)
  ["city_341_400"]=>
  int(1)
  ["country_0_59"]=>
  int(0)
  ["country_60_100"]=>
  int(0)
  ["country_101_110"]=>
  int(0)
  ["country_111_120"]=>
  int(0)
  ["country_121_130"]=>
  int(0)
  ["country_131_140"]=>
  int(0)
  ["country_141_150"]=>
  int(0)
  ["country_151_160"]=>
  int(0)
  ["country_161_170"]=>
  int(0)
  ["country_171_180"]=>
  int(0)
  ["country_181_190"]=>
  int(0)
  ["country_191_200"]=>
  int(0)
  ["country_201_210"]=>
  int(1)
  ["country_211_220"]=>
  int(1)
  ["country_221_230"]=>
  int(0)
  ["country_231_240"]=>
  int(0)
  ["country_241_250"]=>
  int(1)
  ["country_251_260"]=>
  int(0)
  ["country_261_270"]=>
  int(0)
  ["country_271_280"]=>
  int(0)
  ["country_281_290"]=>
  int(0)
  ["country_291_300"]=>
  int(0)
  ["country_301_310"]=>
  int(0)
  ["country_311_320"]=>
  int(0)
  ["country_321_330"]=>
  int(0)
  ["country_331_340"]=>
  int(0)
  ["country_341_400"]=>
  int(0)
}

Actual result:
--------------
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:ns1="urn:abiturient" xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"; 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";><SOAP-ENV:Body><ns1:updateMonitoring><login
 xsi:type="xsd:string">***</login><password 
xsi:type="xsd:string">***</password><monitoring_id 
xsi:type="xsd:int">18700</monitoring_id><plan_budget_total 
xsi:type="xsd:int">70</plan_budget_total><plan_budget_navigation 
xsi:type="xsd:int">0</plan_budget_navigation><plan_pay 
xsi:type="xsd:int">25</plan_pay><total 
xsi:type="xsd:int">66</total><task_training 
xsi:type="xsd:int">0</task_training><without_preliminary_examination 
xsi:type="xsd:int">0</without_preliminary_examination><without_competition 
xsi:type="xsd:int">0</without_competition><city_341_400 
xsi:type="xsd:int">0</city_341_400><country_341_400 xsi:type="xsd:in
 t">0</country_341_400><city_331_340 
xsi:type="xsd:int">0</city_331_340><country_331_340 
xsi:type="xsd:int">0</country_331_340><city_321_330 
xsi:type="xsd:int">0</city_321_330><country_321_330 
xsi:type="xsd:int">0</country_321_330><city_311_320 
xsi:type="xsd:int">1</city_311_320><country_311_320 
xsi:type="xsd:int">1</country_311_320><city_301_310 
xsi:type="xsd:int">2</city_301_310><country_301_310 
xsi:type="xsd:int">0</country_301_310><city_291_300 
xsi:type="xsd:int">2</city_291_300><country_291_300 
xsi:type="xsd:int">2</country_291_300><city_281_290 
xsi:type="xsd:int">5</city_281_290><country_281_290 
xsi:type="xsd:int">3</country_281_290><city_271_280 
xsi:type="xsd:int">1</city_271_280><country_271_280 
xsi:type="xsd:int">8</country_271_280><city_261_270 
xsi:type="xsd:int">1</city_261_270><country_261_270 
xsi:type="xsd:int">4</country_261_270><city_251_260 
xsi:type="xsd:int">2</city_251_260><country_251_260 
xsi:type="xsd:int">5</country_251_260><city_241_250 xsi:type="xsd:int">5</cit
 y_241_250><country_241_250 xsi:type="xsd:int">3</country_241_250><city_231_240 
xsi:type="xsd:int">10</city_231_240><country_231_240 
xsi:type="xsd:int">3</country_231_240><city_221_230 
xsi:type="xsd:int">2</city_221_230><country_221_230 
xsi:type="xsd:int">2</country_221_230><city_211_220 
xsi:type="xsd:int">1</city_211_220><country_211_220 
xsi:type="xsd:int">0</country_211_220><city_201_210 
xsi:type="xsd:int">0</city_201_210><country_201_210 
xsi:type="xsd:int">0</country_201_210><city_191_200 
xsi:type="xsd:int">0</city_191_200><country_191_200 
xsi:type="xsd:int">0</country_191_200><city_181_190 
xsi:type="xsd:int">0</city_181_190><country_181_190 
xsi:type="xsd:int">0</country_181_190><city_171_180 
xsi:type="xsd:int">0</city_171_180><country_171_180 
xsi:type="xsd:int">0</country_171_180><city_161_170 
xsi:type="xsd:int">0</city_161_170><country_161_170 
xsi:type="xsd:int">0</country_161_170><city_151_160 
xsi:type="xsd:int">0</city_151_160><country_151_160 
xsi:type="xsd:int">1</country_151
 _160><city_141_150 xsi:type="xsd:int">1</city_141_150><country_141_150 
xsi:type="xsd:int">0</country_141_150><city_131_140 
xsi:type="xsd:int">0</city_131_140><country_131_140 
xsi:type="xsd:int">1</country_131_140><city_121_130 
xsi:type="xsd:int">0</city_121_130><country_121_130 
xsi:type="xsd:int">0</country_121_130><city_111_120 
xsi:type="xsd:int">0</city_111_120><country_111_120 
xsi:type="xsd:int">0</country_111_120><city_101_110 
xsi:type="xsd:int">0</city_101_110><country_101_110 
xsi:type="xsd:int">0</country_101_110><city_60_100 
xsi:type="xsd:int">0</city_60_100><country_60_100 
xsi:type="xsd:int">0</country_60_100><city_0_59 
xsi:type="xsd:int">0</city_0_59><country_0_59 
xsi:type="xsd:int">0</country_0_59></ns1:updateMonitoring></SOAP-ENV:Body></SOAP-ENV:Envelope>



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=49013&edit=1

Reply via email to