From:             [EMAIL PROTECTED]
Operating system: WinXP SP2
PHP version:      5.0.1
PHP Bug Type:     SOAP related
Bug description:  SoapServer::setClass() should not export non-public methods

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 bug report at http://bugs.php.net/?id=29830&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=29830&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29830&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29830&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=29830&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=29830&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=29830&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=29830&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=29830&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=29830&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=29830&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=29830&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=29830&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=29830&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=29830&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=29830&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=29830&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=29830&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=29830&r=float

Reply via email to