'XMLRPC', '#path' => 'xmlrpc' ); } function xmlrpc_server_server() { require_once './includes/xmlrpc.inc'; require_once './includes/xmlrpcs.inc'; return xmlrpc_server(xmlrpc_server_xmlrpc()); } function xmlrpc_server_xmlrpc() { $callbacks = array(); foreach (services_get_all() as $method) { $callbacks[$method['#method']] = 'xmlrpc_server_call_wrapper'; } return $callbacks; } function xmlrpc_server_call_wrapper() { $xmlrpc_server = xmlrpc_server_get(); $method_name = $xmlrpc_server->message->methodname; $args = func_get_args(); return services_method_call($method_name, $args); } function xmlrpc_server_server_error($message) { if (!is_array($message)) { $message = array($message); } $message = implode(' ', $message); $matches = array(); if (preg_match("/\#(\d+)/", $message, $matches)) { $code = $matches[1]; } else { $code = 1; } return xmlrpc_error($code, strip_tags($message)); }