getCfg('xmlrpc_server')) { JError::raiseError(403, 'XML-RPC Server not enabled.'); } // Includes the required class file for the XML-RPC Server jimport('phpxmlrpc.xmlrpc'); jimport('phpxmlrpc.xmlrpcs'); // load all available remote calls JPluginHelper::importPlugin( 'xmlrpc' ); $allCalls = $mainframe->triggerEvent( 'onGetWebServices' ); $methodsArray = array(); foreach ($allCalls as $calls) { $methodsArray = array_merge($methodsArray, $calls); } $xmlrpcServer = new xmlrpc_server($methodsArray, false); // allow casting to be defined by that actual values passed $xmlrpcServer->functions_parameters_type = 'phpvals'; // define UTF-8 as the internal encoding for the XML-RPC server $xmlrpcServer->xml_header($mainframe->getEncoding()); $xmlrpc_internalencoding = $mainframe->getEncoding(); // debug level $xmlrpcServer->setDebug(0); // start the service $xmlrpcServer->service(); ?>