|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33631 SOAP-RPC calls with parameters only succeed when __call() invoked explicitly
Submitted: 2005-07-10 12:14 UTC Modified: 2005-07-11 09:41 UTC
From: jw at jwscripts dot com Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5.1.0b2 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
20 - 3 = ?
Subscribe to this entry?

 [2005-07-10 12:14 UTC] jw at jwscripts dot com
SOAP-RPC calls with parameters only succeed when __call() invoked explicitly; when no parameters are required, $soapclient->functionName() succeed as expected.

In the reproduce code below, when replacing:

$result = $client->getRate($params);


$result = $client->__call('getRate', $params);

everything works...

Reproduce code:
$wsdl = '';

// Parameters to send
$params = array(
   'country1' => 'USA',
   'country2' => 'UK'

$client = new SoapClient($wsdl);
$result = $client->getRate($params);

Expected result:
No output

Actual result:
Notice: Array to string conversion in G:\Apache Group\Apache2\htdocs\xins-soap\rpc-test.php on line 13

Notice: Undefined property: SoapFault::$faultstring in Unknown on line 0

Fatal error: Uncaught SoapFault exception: [soap:Server] (null) in G:\Apache Group\Apache2\htdocs\xins-soap\rpc-test.php:13 Stack trace: #0 G:\Apache Group\Apache2\htdocs\xins-soap\rpc-test.php(13): SoapClient->__call('getRate', Array) #1 G:\Apache Group\Apache2\htdocs\xins-soap\rpc-test.php(13): SoapClient->getRate(Array) #2 {main} thrown in G:\Apache Group\Apache2\htdocs\xins-soap\rpc-test.php on line 13


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-11 09:41 UTC]
getRate() SOAP method accepts two arguments. You pass them proper using __call() because it accepts array of argument.
Using getRate() you shouldn't pass array but just one by one.

$client->getRate('USA', 'UK');

I got float(0.5736)
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Nov 29 18:05:52 2022 UTC