note 81867 added to ref.soap
| From: | bananos at dev dot co dot ua | Date: | Mon, 17 Mar 2008 12:12:39 +0000 |
| Subject: | note 81867 added to ref.soap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137121@lists.php.net to get a copy of this message | ||
Be aware when working with long integers in SOAP requests (PHP supports only 32-bit signed int with
upper limit of
2147483647 )
If you need to make requests with 64-bit integers consider following code:
<?php
$ID = (float) "6146109011";
$params["campaignID"] = new SoapVar($ID, XSD_STRING, "string", "http://www.w3.org/2001/XMLSchema");
$res = $client->getCampaign(new SoapParam($params, "getCampaign"));
?>
If you'll try to pass such $ID in a direct way:
<?
$ID = (float) "6146109011";
$res = $client->getCampaign(array('campaignID' => $ID));
?>
the request will fail, because php_soap.dll will generate
<campaignID>2147483647</campaignID>
and not
<campaignID>6146109011</campaignID>
as expected
----
Server IP: 91.196.196.241
Probable Submitter: 91.124.158.184
----
Manual Page -- http://www.php.net/manual/en/ref.soap.php
Edit -- https://master.php.net/note/edit/81867
Del: integrated -- https://master.php.net/note/delete/81867/integrated
Del: useless -- https://master.php.net/note/delete/81867/useless
Del: bad code -- https://master.php.net/note/delete/81867/bad+code
Del: spam -- https://master.php.net/note/delete/81867/spam
Del: non-english -- https://master.php.net/note/delete/81867/non-english
Del: in docs -- https://master.php.net/note/delete/81867/in+docs
Del: other reasons-- https://master.php.net/note/delete/81867
Reject -- https://master.php.net/note/reject/81867
Search -- https://master.php.net/manage/user-notes.php