|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29830 SoapServer::setClass() should not export non-public methods
Submitted: 2004-08-25 07:26 UTC Modified: 2004-08-26 14:26 UTC
From: Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.0.1 OS: WinXP SP2
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:
31 + 37 = ?
Subscribe to this entry?

 [2004-08-25 07:26 UTC]
SoapServer::setClass will export all class methods, including private and protected ones, this should not be the case as they should be used internally only.

Even better, would be to only export methods named in the supplied WSDL, but I think that would just take too long :)

- Davey

Reproduce code:

class hello_world {
     * Say Hello to Somebody
     * @param string $to The person to say Hello to
     * @return string The greeting
    public function hello($to)
        return $this->constructMsg($to);
    public function goodBye($to)
        return "Goodbye $to";
     * Construct Greeting
     * @param string $to
     * @return string
    private function constructMsg($to)
        return 'Hello ' . $to;

$server = new SoapServer('HelloWorld.wsdl', array('trace' => 1));

echo "This SOAP server can handle following functions: \n";
$functions = $server->getFunctions();
foreach($functions as $func) {
    echo $func . "\n";


Expected result:
This SOAP server can handle following functions:

Actual result:
This SOAP server can handle following functions:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-26 14:26 UTC]
Fixed in CVS (PHP_5_0 & HEAD)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Sep 22 23:03:39 2021 UTC