-
Bug
-
Resolution: Won't Do
-
Critical
-
None
-
2.1.2, 2.2.5, 2.3.2
-
MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
Get the ws template (https://github.com/moodlehq/moodle-local_wstemplate), and try to call it with SOAP. I can not find a way to call the web service function with the parameter being set to its default value. In the best case SOAP seems to set to null when no parameter. XMLRPC and REST protocol do set the correct default values.
My SOAP client code:
$token = 'caab56bd1c66c2d08c92c22a41ecde64';
|
$domainname = 'http://jerome.moodle.local/~jerome/Moodle_wstemplate';
|
|
/// FUNCTION NAME
|
$functionname = 'local_wstemplate_hello_world';
|
|
/// PARAMETERS
|
$welcomemsg = 'Hello, ';
|
|
///// SOAP CALL
|
ini_set("soap.wsdl_cache_enabled", "0"); // no WSDL cache
|
$serverurl = $domainname . '/webservice/soap/server.php'. '?wsdl=1&wstoken=' . $token;
|
$client = new SoapClient($serverurl);
|
try {
|
$resp = $client->__soapCall($functionname, array()); //here there is no parameter, I'm expecting the default value.
|
} catch (Exception $e) {
|
print_r($e);
|
exit();
|
}
|
print_r($resp);
|
- will help resolve
-
MDL-29276 META- Web service improvements for 2.2
-
- Closed
-