-
Bug
-
Resolution: Fixed
-
Major
-
4.2
-
MOODLE_402_STABLE
-
MOODLE_402_STABLE
-
MDL-78094-master -
Soap protocol is broken in Moodle 4.2 because of a class rename. external_api was renamed to \core_external\external_api
webservice/soap/locallib.php contains:
external_api::set_timeout();
|
should be:
\core_external\external_api::set_timeout();
|
Replication steps
- Enable web services (admin > adv. features)
- Enable SOAP (admin > server > webservices > overview > protocols)
- Create a new external service (don't use the mobile one)
- Add the method core_get_string to the service
- Create a token for the admin user for this service (copy this, we'll use it in a few steps' time)
- Go to the "Test the service" (the bottom option in web services overview)
- Set method = token, protocol = SOAP, function = core_get_string and click "Select"
- On the next page, set:
Token: the token you created from admin
stringid: error
component: moodle
lang: en - Execute it
Expected: You see "Error" returned.
Actual: You see this:
URL: http://localhost/master/webservice/soap/server.php?wstoken=02b5f4bf7f6f2bc3e332b2c9a2944c99SoapFault |
exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from
|
'http://localhost/master/webservice/soap/server.php?wstoken=02b5f4bf7f6f2bc3e332b2c9a2944c99&wsdl=1'
|
: failed to load external entity
|
"http://localhost/master/webservice/soap/server.php?wstoken=02b5f4bf7f6f2bc3e332b2c9a2944c99&wsdl=1"
|
in /home/jake/moodledata/master/moodle/webservice/soap/lib.php:89 |
Stack trace:
|
#0 /home/jake/moodledata/master/moodle/webservice/soap/lib.php(89): SoapClient->__construct() |
#1 /home/jake/moodledata/master/moodle/webservice/soap/locallib.php(334): webservice_soap_client->call() |
#2 /home/jake/moodledata/master/moodle/admin/webservice/testclient.php(151): webservice_soap_test_client->simpletest() |
#3 {main} |
- is a regression caused by
-
MDL-76583 Move lib/externallib.php to namespaced classes and fix coding style, etc.
- Closed