php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37355 SOAP uses deprecated __call method by default
Submitted: 2006-05-08 03:23 UTC Modified: 2006-05-25 09:37 UTC
From: daniel dot oconnor at gmail dot com Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.1.4 OS: Windows
Private report: No CVE-ID: None
 [2006-05-08 03:23 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-25 09:37 UTC] dmitry@php.net
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.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jul 17 09:01:26 2019 UTC