ID:               29830
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Assigned
 Bug Type:         SOAP related
 Operating System: WinXP SP2
 PHP Version:      5.0.1
 Assigned To:      dmitry


Previous Comments:
------------------------------------------------------------------------

[2004-08-25 07:26:49] [EMAIL PROTECTED]

Description:
------------
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:
---------------
<?php

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));
$server->setClass('hello_world');

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:
hello
goodBye

Actual result:
--------------
This SOAP server can handle following functions:
hello
goodBye
constructMsg


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29830&edit=1

Reply via email to