php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47624 SOAP response has int type for a key value that is out of range
Submitted: 2009-03-11 14:49 UTC Modified: 2015-07-21 19:47 UTC
Votes:15
Avg. Score:4.5 ± 0.8
Reproduced:13 of 13 (100.0%)
Same Version:6 (46.2%)
Same OS:9 (69.2%)
From: akshah123 at hotmail dot com Assigned:
Status: Verified Package: SOAP related
PHP Version: 5.6.11 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: akshah123 at hotmail dot com
New email:
PHP Version: OS:

 

 [2009-03-11 14:49 UTC] akshah123 at hotmail dot com
Description:
------------
It seems that instead of string, new version of PHP (5.2.9) has 

<key xsi:type="xsd:int">884385070380</key>

as opposed to for old version of PHP (5.2.2) returning 

<key xsi:type="xsd:string">884385070380</key>

for arrays in SOAP services.

This causes the client to throw a soap fault error with "SOAP-ERROR: 
Encoding: Can't decode apache map, only Strings or Longs are allowd 
as keys".


Patches

bug47624.patch (last revision 2014-05-07 13:58 UTC by nbk at sitadelle dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-20 15:06 UTC] akshah123 at hotmail dot com
Is there any additional information that I can provide to perhaps 
speed up the process to resolve this ticket?
 [2009-09-01 21:26 UTC] akshah123 at hotmail dot com
Hello, 

I have confirmed that this issue is in 5.3.0 and 5.2.10.
 [2009-09-07 20:22 UTC] sjoerd@php.net
Thank you for your bug report.

Could you please supply us with a piece of WSDL describing the array? Also, which client are you using which gives this error?

If I understand correctly, the problem occurs with the soapenc:array type and the Axis 1 SOAP library.
 [2009-09-10 19:33 UTC] akshah123 at hotmail dot com
The sample WSDL:

http://pastie.org/612742

I am getting this error with another php script i run on a different 
servers. I have been able to reproduce this error on several machines 
with php version ranging from 5.2.2 to 
5.3.0
 [2009-09-10 20:00 UTC] akshah123 at hotmail dot com
The script on server side (temp.php): http://pastie.org/612784
The client side script to test:  http://pastie.org/612787
Again, the error is: 

/Reports/test.php line 5 - SOAP-ERROR: Encoding: Can't decode apache 
map, only Strings or Longs are allowd as keys.

Using the __getLastResponse() function I received following xml: 
http://pastie.org/612791
 [2009-11-10 15:42 UTC] akshah123 at hotmail dot com
I have tested this with 5.2.11 and the issue is there as well.  Please 
let me know if I can provide any additional information that would help 
resolve this issue.

I cannot upgrade my system and use cool new features in PHP 5.3 as this 
is blocking a major functionality in the application.

Thanks.
 [2010-02-04 22:50 UTC] akshah123 at hotmail dot com
The problem persists with php 5.3.1 as well.
 [2010-12-20 14:58 UTC] dmitry dot revenko at gmail dot com
Just encountered the same problem. It's a shame this not fixed till now. Don't even know - what should I do with it now.
 [2013-02-18 14:21 UTC] exander77 at gmail dot com
What the hell is wrong with this project, four years and it is not fixed?
 [2015-07-21 19:47 UTC] cmb@php.net
-Status: Open +Status: Verified -Operating System: Linux +Operating System: * -PHP Version: 5.3.1 +PHP Version: 5.6.11
 [2015-07-21 19:47 UTC] cmb@php.net
I've made some tests with recent PHP versions (5.6.11 and
7.0.0beta1). On architectures where a PHP integer is 64bit, the
argument has type xsd:int in the request envelope. This is clearly
wrong, as xsd:int is a 32bit integer; it should be xsd:long. Where
a PHP integer is 32bit, the argument has type xsd:float, what is
not necessarly wrong per se. So much about the client.

The server obviously can't deal with xsd:float here. On 5.6.11 Win
x86, the error that has been reported is thrown; on 7.0.0beta1 Win
x86 PHP crashes.

When the argument is encoded as xsd:int, we see an overflow
(3916774700) (PHP 7.0.0beta1 on Win x64 and PHP 5.6.11 on Linux
x64), whereby PHP 5.6.11 additionally raises "Function
("getAssetPathInfo") is not a valid method for this service)".
Only PHP 7 on Linux x64 yields the "expected" result.

Related to bug #48717.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 20:01:29 2024 UTC