ConFoo Montreal 2026: Call for Papers

Voting

: min(six, five)?
(Example: nine)

The Note You're Voting On

lepidosteus
15 years ago
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):

<?php
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(...
?>

<< Back to user notes page

To Top