A web service call we use in an application for Moodle seems to no longer work with Moodle 3.3. And I can't *quite* work out why...
Example of the call is;
$ServiceURL = $MoodleDomain . '/webservice/xmlrpc/server.php'. '?wstoken=' . $WSToken . '&wsfunction=' . $FunctionName;
$curl = new curl;
$post = xmlrpc_encode_request($FunctionName, array($params));
$resp = xmlrpc_decode($curl->post($ServiceURL, $post));
Each variable is defined correctly. But the response is NULL.
I found how to do the same call via curl in CLI;
$ curl 'http://<domain>/webservice/xmlrpc/server.php?wstoken=<token>&wsfunction=core_course_get_courses' -H "Content-Type: text/xml" --data "<?xml version='1.0' encoding='UTF-8'?><methodCall><methodName>core_course_get_courses</methodName><params> </params></methodCall>"and got a response as expected!
Tried a number of things such as setting curl_setopt to set the header for text/xml... but having no joy anywhere.
I can't see that anything has changed in the webservices for Moodle 3.3. But I might be going blind.
Anyone with any thoughts?