Req #31248 [Com]: SOAP-Client: mapping of overloaded functions fail
| From: | dlagtapon at gmail dot com | Date: | Fri, 11 May 2012 22:49:22 +0000 |
| Subject: | Req #31248 [Com]: SOAP-Client: mapping of overloaded functions fail | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-170391@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=31248&edit=1
ID: 31248
Comment by: dlagtapon at gmail dot com
Reported by: andreas dot filsinger at cargobay dot de
Summary: SOAP-Client: mapping of overloaded functions fail
Status: Assigned
Type: Feature/Change Request
Package: SOAP related
Operating System: *
PHP Version: 5CVS-2005-03-29
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Encountered in PHP 5.3.9
Previous Comments:
------------------------------------------------------------------------
[2008-11-28 14:40:03] dmitry@php.net
See also #43868
------------------------------------------------------------------------
[2005-07-01 11:34:30] andreas dot filsinger at cargobay dot de
* I just checked it against Version 5.1.0b2. Sorry it is NOT fixed.
* I was forced to change the login acount details. So that the sample above do not work any more! If
your want a updated sample code - please email me directly. Thanks.
* If somebody is familar with AXIS, please put a class online, with publishes "foo(char c) AND
foo(int i)" so we have a better test environment. I am not that kind of java guru which can do
this i a minute. Thank you!
Andreas
------------------------------------------------------------------------
[2005-03-29 11:14:20] andreas dot filsinger at cargobay dot de
I just checked it against
PHP 5.1.0-dev (cli) (built: Mar 29 2005 08:40:25)
SORRY: It is all the same as 5.0.3: All function Prototyps are listed identical. Bug is still open!
Andreas Filsinger
------------------------------------------------------------------------
[2005-03-26 13:30:46] andreas dot filsinger at cargobay dot de
26 Mar 2005
"latest" seems to be late enough. It has a timestamp from 23 Mar 2005 at 08:50. Anyway I
check it again this version with no succes. I will check again when CVS can make builds again.
Andreas Filsinger
------------------------------------------------------------------------
[2004-12-22 16:03:34] andreas dot filsinger at cargobay dot de
Description:
------------
the WSDL of "Apache.AXIS for Java" implements sort of function-overloading. If you have 3
published functions:
int foo (int a,b);
int foo (string a,b);
int foo (int x);
in XML this is done by extending the Function-Names by numbers:
<fooRequest ...
<fooRequest1 ...
<fooRequest2 ...
the Bug: with __getFunctions foo is formulated 3 times identical:
int foo(int $a,int $b);
int foo(int $a,int $b);
int foo(int $a,int $b);
if i call "foo" it its mapped to the first function with this name.
Reproduce code:
---------------
$user = "filsinger;Default";
$pwd = "WWO6C4vg";
$ip = "217.160.221.231:6666";
$service = "mapping/Mapping?wsdl";
$client = new SoapClient("http://$user:$pwd@$ip/ws/services/$service",
array(
"login" => "$user",
"password" => "$pwd",
"trace" => 1,
"exceptions" => 0) );
$r = $client->__getFunctions();
foreach($r as $v)
echo $v . "<br /><br />";
Expected result:
----------------
a) Quick Patch
make a function name mapping to
getMap(...
getMap1(...
getMap2(...
so i can use getMap2(.. and be happy!
b) php 6.0.0 ;-)
true identical function names, if this is called try to fill the function-parameters from the first
function with this name, if this fails, take the next with this name ...
take that implemetation where filling the parameter does not fail. If there no implementation fits:
create an error. If more than one parameter fits: create an error:
Actual result:
--------------
* all the overloaded functions have the parameter set of the most top-function.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=31248&edit=1