Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.14.0

Bug #6042 Handling xsd:long
Submitted: 2005-11-23 10:18 UTC
From: simunek at vol dot cz Assigned: yunosh
Status: Closed Package: SOAP
PHP Version: 4.4.1 OS: FreeBSD
Roadmaps: (Not assigned)    
Subscription  


 [2005-11-23 10:18 UTC] simunek at vol dot cz
Description: ------------ Per specifications, datatype xsd:long is a 64-bit integer. It's casted into integer PHP type in this PEAR class. PHP integer type is only 32-bit. That results in trimming the value down to MAXINT. Bad news is that PHP don't have 64-bit integer (long long) type. Possible solutions would be to cast the value into string. That works for me. Index: Base.php =================================================================== RCS file: /repository/pear/SOAP/Base.php,v retrieving revision 1.51 diff -a -u -r1.51 Base.php --- Base.php 8 Oct 2005 23:44:22 -0000 1.51 +++ Base.php 23 Nov 2005 09:58:33 -0000 @@ -301,7 +301,7 @@ 'integer' => 'integer', 'nonPositiveInteger' => 'integer', 'negativeInteger' => 'integer', - 'long' => 'integer', + 'long' => 'string', 'int' => 'integer', 'short' => 'integer', 'byte' => 'string', Test script: --------------- <item><invoice_number xsi:type="xsd:long">6105003037</invoice_number></item> Expected result: ---------------- 6105003037 Actual result: -------------- 2147483647

Comments

 [2007-01-20 01:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!