From:             paulmonk at shaw dot ca
Operating system: Windows 2000
PHP version:      5.0.1
PHP Bug Type:     SOAP related
Bug description:  Cannot pass big integers (> 2147483647) in SOAP requests 

Description:
------------
It seems that xsd:long values > 2147483647 are not represented correctly
in SOAP requests/responses. Looks like they are being treated as PHP
integers. (Unsigned longs work fine.)

Reproduce code:
---------------
When I pass the following parameters in a SoapClient::__call():

$long1 = new SoapVar(2147483647, XSD_LONG);
$long2 = new SoapVar(2147483648, XSD_LONG);
$long3 = new SoapVar(4294967296, XSD_LONG);
$long4 = new SoapVar(8589934592, XSD_LONG);
$long5 = new SoapVar(17179869184, XSD_LONG); 

$ulong1 = new SoapVar(2147483647, XSD_UNSIGNEDLONG);
$ulong2 = new SoapVar(2147483648, XSD_UNSIGNEDLONG);
$ulong3 = new SoapVar(4294967296, XSD_UNSIGNEDLONG);
$ulong4 = new SoapVar(8589934592, XSD_UNSIGNEDLONG);
$ulong5 = new SoapVar(17179869184, XSD_UNSIGNEDLONG);



Expected result:
----------------
The parameters in the SOAP request should be:
...
<long1 xsi:type="xsd:long">2147483647</long1>
<long2 xsi:type="xsd:long">2147483648</long2>
<long3 xsi:type="xsd:long">4294967296</long3>
<long4 xsi:type="xsd:long">8589934592</long4>
<long5 xsi:type="xsd:long">17179869184</long5>

<ulong1 xsi:type="xsd:unsignedLong">2147483647</ulong1>
<ulong2 xsi:type="xsd:unsignedLong">2147483648</ulong2>
<ulong3 xsi:type="xsd:unsignedLong">4294967296</ulong3>
<ulong4 xsi:type="xsd:unsignedLong">8589934592</ulong4>
<ulong5 xsi:type="xsd:unsignedLong">17179869184</ulong5>

Actual result:
--------------
The actual parameters in the SOAP request are:
...
<long1 xsi:type="xsd:long">2147483647</long1>
<long2 xsi:type="xsd:long">-2147483648</long2>
<long3 xsi:type="xsd:long">0</long3>
<long4 xsi:type="xsd:long">0</long4>
<long5 xsi:type="xsd:long">0</long5>

<ulong1 xsi:type="xsd:unsignedLong">2147483647</ulong1>
<ulong2 xsi:type="xsd:unsignedLong">2147483648</ulong2>
<ulong3 xsi:type="xsd:unsignedLong">4294967296</ulong3>
<ulong4 xsi:type="xsd:unsignedLong">8589934592</ulong4>
<ulong5 xsi:type="xsd:unsignedLong">17179869184</ulong5>

-- 
Edit bug report at http://bugs.php.net/?id=30045&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30045&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30045&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30045&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30045&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30045&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30045&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30045&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30045&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30045&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30045&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30045&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30045&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30045&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30045&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30045&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30045&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30045&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30045&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30045&r=mysqlcfg

Reply via email to