ID:               34178
 Comment by:       lists at andyfowler dot com
 Reported By:      php at virtualmonet dot com
 Status:           No Feedback
 Bug Type:         SOAP related
 Operating System: redhat
 PHP Version:      5.1.0b3
 New Comment:

I can confirm ab at crossconcept's report.

The bug has nothing to do with SoapServer but is in WSDL-mode 
SoapClient, which sets NULL for parameters which have not been 
specified. Should this be resubmitted with a proper subject?


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

[2010-02-03 12:39:22] ab at crossconcept dot de

<?php
/**
 * Serverside
 */

if(isset($_GET['wsdl'])) {
        $autodiscover = new Zend_Soap_AutoDiscover();
        $autodiscover->setClass('Test1');
        $autodiscover->handle();
    } else {
        $soap = new Zend_Soap_Server(HOST.URL."/api.php?wsdl");
        $soap->setClass('Test1');
        $soap->setPersistence(SOAP_PERSISTENCE_SESSION);
        $soap->handle();
    }
?>

correct one, sorry for the mistake I posted. well bug still exists.
Looks like SoapClient sends NULL for parameters which were not set.

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

[2010-02-03 12:33:42] ab at crossconcept dot de

This bug still occurs after moren than 4 years..

<?php
/**
 * Serverside
 * /
class Test1 {
    /**
     *
     * @param string $me
     * @return string
     */
   function sayHello($me='x'){
      $s = "sayhello to $me";
      return $s;
   }
}

$soap = new Zend_Soap_Server(HOST.URL."/api.php?wsdl");
$soap->setClass('Test1');
$soap->setPersistence(SOAP_PERSISTENCE_SESSION);
$soap->handle();
?>

<?php
/**
 * Client
 */
$o=new SoapClient($url); 
echo $o->sayhello() . "<br>";
?>

Expected result:
----------------
sayhello to x

Actual result:
--------------
sayhello to


I am wondering why this was closed. Just because of the non given
"<?php ?>"?

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

[2005-08-25 01:00:04] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2005-08-17 21:47:32] [email protected]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.



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

[2005-08-17 21:46:49] php at virtualmonet dot com

Description:
------------
It seems PHP soap server does not set the default parameter values of
the called method.




#===================================================

Line 1 should return "sayhello to x"
but instead returns "sayhello to"


Reproduce code:
---------------
#--------------------------------------------------
# on the server side

class Test1 {
    /**
     *
     * @param string $me
     * @return string
     */
   function sayHello($me='x'){
      $s = "sayhello to $me";
      return $s;
   }
}

#--------------------------------------------------
# on the client side

$o=new SoapClient($url); 

echo $o->sayhello() . "<br>";




Expected result:
----------------
sayhello to x


Actual result:
--------------
sayhello to


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


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

Reply via email to