|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62952 Methods from ServerClient cannot be used with ReflectionMethod
Submitted: 2012-08-27 14:36 UTC Modified: 2013-02-18 00:36 UTC
Avg. Score:4.6 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:0 (0.0%)
Same OS:4 (100.0%)
From: gabriel dot heming at hotmail dot com Assigned:
Status: No Feedback Package: Reflection related
PHP Version: Irrelevant OS: Windows
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
11 + 12 = ?
Subscribe to this entry?

 [2012-08-27 14:36 UTC] gabriel dot heming at hotmail dot com
Well, I'm trying reflect a client of web service. When I use call_user_func_array 
it works fine. But when I use ReflectionMethod, doesn't work. Is better you see:

Test script:
My variables:
$client = new SoapClient('http://localhost/webservice?wsdl');
$method = 'someMethod';
arguments = array('argument one' , 'argument two');

This code work fine:
return call_user_func_array(array($client , $method) , $arguments);

This code doesn't work
$reflectionMethod = new ReflectionMethod($client , $method);
return $reflectionMethod->invokeArgs($client , $arguments);

Expected result:
Return of function from ServerClient.

Actual result:
Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML 
document in...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-19 15:08 UTC]
-Status: Open +Status: Feedback
 [2012-09-19 15:08 UTC]
  since call methods from a webservice like $client->method($args) is
a proxy method, it didn't exist in Soapclient, it use the magic method
Soapclient::__call() to the really work, so th method didn't exist at all

see:, it should been a fatal error complain
method didn't exists.

could you please try the test script from the gist above?
 [2012-09-19 15:14 UTC]
An extra comma was appended to the url, please try this:

In short:
" The ReflectionMethod class reports information about a method."
if method didn't exists an exception was thrown when construct ReflectionMethod.
 [2013-02-18 00:36 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jun 06 04:03:38 2023 UTC