note 94700 added to soapclient.dorequest

From: Date: Thu, 19 Nov 2009 10:59:44 +0000
Subject: note 94700 added to soapclient.dorequest
Groups: php.notes 
Request: Send a blank email to php-notes+get-163070@lists.php.net to get a copy of this message
If you happen to get an error during your request which says "SOAP-ERROR: Encoding: Can't decode apache map, only Strings or Longs are allowd as keys", the reason seems to be the response xml using integer for keys and php failling to understand them Here is something that worked for me (converts integer keys to strings): class mySoap extends SoapClient { public function __doRequest($request, $location, $action, $version) { $result = parent::__doRequest($request, $location, $action, $version); $result = str_replace('<key xsi:type="xsd:int">', '<key xsi:type="xsd:string">', $result); return $result; } } $soap = new mySoap(... ---- Server IP: 89.31.146.176 Probable Submitter: 83.167.62.196 ---- Manual Page -- http://www.php.net/manual/en/soapclient.dorequest.php Edit -- https://master.php.net/note/edit/94700 Del: integrated -- https://master.php.net/note/delete/94700/integrated Del: useless -- https://master.php.net/note/delete/94700/useless Del: bad code -- https://master.php.net/note/delete/94700/bad+code Del: spam -- https://master.php.net/note/delete/94700/spam Del: non-english -- https://master.php.net/note/delete/94700/non-english Del: in docs -- https://master.php.net/note/delete/94700/in+docs Del: other reasons-- https://master.php.net/note/delete/94700 Reject -- https://master.php.net/note/reject/94700 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#163070) next »