Web service Access control exception

If you are creating or using a web service in Moodle and see the following message: { “exception”: “webservice_access_exception”, “errorcode”: “accessexception”, “message”: “Access control exception” } It can be a bit hard to troubleshoot. Generally there is a 4th item with debugging info, but this will only appear if you have the correct Moodle debugging…

Undefined Property $webserviceprotocols

When this occurs, there is no result from a web service call and undefined property $webserviceprotocols. In the PHP error log the following appears: Undefined property: stdClass::$webserviceprotocols Check your web service protocols and ensure that the appropriate protocol is enabled. Site administration > Plugins > Web services > Manage protocols.