You are here

function xmlrpc_server_xmlrpc in Services 7.3

Same name and namespace in other branches
  1. 5 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_xmlrpc()
  2. 6.3 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_xmlrpc()
  3. 6 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_xmlrpc()
  4. 6.2 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_xmlrpc()
  5. 7 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_xmlrpc()

Return an array of all defined services methods and callbacks.

See also

xmlrpc_server()

1 call to xmlrpc_server_xmlrpc()
xmlrpc_server_server in servers/xmlrpc_server/xmlrpc_server.module
Implementation of hook_server().

File

servers/xmlrpc_server/xmlrpc_server.module, line 38
Enable XML-RPC for services module.

Code

function xmlrpc_server_xmlrpc() {
  $callbacks = array();
  module_load_include('inc', 'services', 'includes/services.runtime');
  module_load_include('inc', 'services', 'includes/services.resource_build');
  $endpoint_name = services_get_server_info('endpoint', '');
  $endpoint = services_endpoint_load($endpoint_name);
  $resources = services_get_resources($endpoint_name);
  _services_apply_endpoint($resources, $endpoint, TRUE);
  if (!empty($resources)) {

    // Translate all resources
    foreach ($resources as $name => $def) {
      foreach (services_resources_as_procedures($def, $name) as $method) {
        $callbacks[$method['method']] = 'xmlrpc_server_call_wrapper';
      }
    }
  }
  return $callbacks;
}