/** * Set up zend service class * @return void */ protected function init_zend_server() { parent::init_zend_server(); // this exception indicates request failed Zend_XmlRpc_Server_Fault::attachFaultException('moodle_exception'); //when DEBUG >= NORMAL then the thrown exceptions are "casted" into a plain PHP Exception class //in order to display the $debuginfo (see moodle_zend_xmlrpc_server class - MDL-29435) if (debugging()) { Zend_XmlRpc_Server_Fault::attachFaultException('Exception'); } }
/** * Set up zend service class * @return void */ protected function init_zend_server() { parent::init_zend_server(); // this exception indicates request failed Zend_XmlRpc_Server_Fault::attachFaultException('moodle_exception'); }
/** * This method parses the $_POST and $_GET superglobals and looks for * the following information: * user authentication - username+password or token (wsusername, wspassword and wstoken parameters) */ protected function parse_request() { parent::parse_request(); if (!$this->username or !$this->password) { //note: this is the workaround for the trouble with & in soap urls $authdata = get_file_argument(); $authdata = explode('/', trim($authdata, '/')); if (count($authdata) == 2) { list($this->username, $this->password) = $authdata; } } }
/** * Set up zend service class */ protected function init_zend_server() { parent::init_zend_server(); $this->zend_server->setProduction(false); //set to false for development mode //(complete error message displayed into your AMF client) }
/** * Set up zend service class - mainly about fault handling * * @return void */ protected function init_zend_server() { parent::init_zend_server(); // this exception indicates request failed Zend_XmlRpc_Server_Fault::attachFaultException('WebserviceException'); Zend_XmlRpc_Server_Fault::attachFaultException('MaharaException'); Zend_XmlRpc_Server_Fault::attachFaultException('UserException'); Zend_XmlRpc_Server_Fault::attachFaultException('NotFoundException'); Zend_XmlRpc_Server_Fault::attachFaultException('SystemException'); Zend_XmlRpc_Server_Fault::attachFaultException('InvalidArgumentException'); Zend_XmlRpc_Server_Fault::attachFaultException('AccessDeniedException'); Zend_XmlRpc_Server_Fault::attachFaultException('ParameterException'); Zend_XmlRpc_Server_Fault::attachFaultException('WebserviceParameterException'); Zend_XmlRpc_Server_Fault::attachFaultException('WebserviceInvalidParameterException'); Zend_XmlRpc_Server_Fault::attachFaultException('WebserviceInvalidResponseException'); if (ws_debugging()) { Zend_XmlRpc_Server_Fault::attachFaultException('Exception'); } }