ID: 34178
Comment by: ab at crossconcept dot de
Reported By: php at virtualmonet dot com
Status: No Feedback
Bug Type: SOAP related
Operating System: redhat
PHP Version: 5.1.0b3
New Comment:
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 ?>"?
Previous Comments:
------------------------------------------------------------------------
[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