#37355 [Asn->Bgs]: SOAP uses deprecated __call method by default
ID: 37355
Updated by: dmitry@php.net
Reported By: daniel dot oconnor at gmail dot com
-Status: Assigned
+Status: Bogus
Bug Type: SOAP related
Operating System: Windows
PHP Version: 5.1.4
Assigned To: dmitry
New Comment:
This is not a bug.
__call() is a magic function that used for method call overloading. So
when you call login() PHP calls __call().
SoapClient::__call() and SoapClient::__soapCall() are different names
of the same function.
The fault that you have is generated by server. Probably server tries
send a SoapFault, but does somthing wrong. It calls SoapFault
constructor with wrong arguments.
Previous Comments:
------------------------------------------------------------------------
[2006-05-08 03:23:08] daniel dot oconnor at gmail dot com
Description:
------------
5.1.4 appears to be still using __call instead of __soapCall, in at
least one place this causes exceptions without error codes to be
thrown.
Reproduce code:
---------------
<?php
$wsdl = 'http://vx.valex.com.au/soap/vxsoap.wsdl';
$client = new SoapClient($wsdl);
$result = $client->login(array("username" => "fake", "password"
=>
"user"));
?>
Expected result:
----------------
No SoapFaults thrown, or a SoapFault is thrown with a meaningful error.
Actual result:
--------------
---------- php ----------
Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server]
SoapFault::__construct() [<a
href='function.SoapFault---construct'>function.SoapFault---construct</a>]:
Invalid parameters. Invalid fault code. in
C:\vx\tests\unit\soap\LoginTest.php:42
Stack trace:
#0 [internal function]: SoapClient->__call('login', Array)
#1 C:\vx\tests\unit\soap\LoginTest.php(42): SoapClient->login(Array)
#2 {main}
thrown in C:\vx\tests\unit\soap\LoginTest.php on line 42
Output completed (0 sec consumed) - Normal Termination
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37355&edit=1
Thread (3 messages)