diff --git servers/xmlrpc_server/xmlrpc_server.module servers/xmlrpc_server/xmlrpc_server.module
index b51025c..5387115 100644
--- servers/xmlrpc_server/xmlrpc_server.module
+++ servers/xmlrpc_server/xmlrpc_server.module
@@ -3,11 +3,12 @@
  * @file
  *  Enable XML-RPC for services module.
  *
- * Most of the work here is converting the REST-style resource definitions
- * to XMLRPC-style procedure calls. These procedures are renamed as 
- * <resource>.<method>. So the node resource's retrieve method has an XMLRPC
- * procedure name of node.retrieve. Actions prepend 'action_' to the procedure
- * name. So the login action of the user resource becomes user.action_login. 
+ * Resource definitions get converted to RPC-style procedure names, but
+ * otherwise this is really just a wrapper around the core xmlrpc server.
+ * These procedures are renamed as <resource>.<method>. So the node
+ * resource's retrieve method has an XMLRPC procedure name of node.retrieve,
+ * the user resource's login action has an XMLRPC procedure name of
+ * user.login, etc.
  */
 
 /**
@@ -26,7 +27,7 @@ function xmlrpc_server_server() {
   require_once './includes/xmlrpc.inc';
   require_once './includes/xmlrpcs.inc';
 
-  // 
+  //
   return xmlrpc_server(xmlrpc_server_xmlrpc());
 }
 
@@ -37,12 +38,12 @@ function xmlrpc_server_server() {
  */
 function xmlrpc_server_xmlrpc() {
   $callbacks = array();
-  
-  $resources = services_get_resources();
+
+  $resources = services_get_resources(services_get_server_info('endpoint', ''));
   if (!empty($resources)) {
     // Translate all resources
     foreach ($resources as $name => $def) {
-      foreach (_xmlrpc_server_resources_as_procedures($def) as $method) {
+      foreach (services_resources_as_procedures($def) as $method) {
         $callbacks[$method['method']] = 'xmlrpc_server_call_wrapper';
       }
     }
@@ -55,7 +56,7 @@ function xmlrpc_server_xmlrpc() {
  * Pass XMLRPC server requests to the appropriate services method.
  *
  * This function can take varying parameters as are appropriate to
- * the service in question. 
+ * the service in question.
  */
 function xmlrpc_server_call_wrapper() {
   $xmlrpc_server = xmlrpc_server_get();
@@ -65,8 +66,8 @@ function xmlrpc_server_call_wrapper() {
   $controller = services_controller_get($method_name, $endpoint);
 
   try {
-    return services_controller_execute($controller, $args);  
-  } 
+    return services_controller_execute($controller, $args);
+  }
   catch (Exception $e) {
     $code = $e->getCode();
     switch($code) {
@@ -90,69 +91,3 @@ function xmlrpc_server_call_wrapper() {
     }
   }
 }
-
-/**
- * Convert a resource to XMLRPC-style methods.
- *
- * @param array $resource
- *   A resource definition.
- *
- * @return array
- *   An array of XMLRPC method definitions
- */
-function _xmlrpc_server_resources_as_procedures($resource) {
-  static $controllers = array(
-    'create' => 'create',
-    'delete' => 'delete',
-    'retrieve' => 'retrieve',
-    'update' => 'update',
-    'index' => 'index',
-  ), $subcontrollers = array(
-    'relationships' => 'related',
-    'targeted actions' => 'targeted_action',
-  );
-
-  $methods = array();
-
-  foreach ($controllers as $attr => $name) {
-    if (isset($resource[$attr])) {
-      $methods[] = _xmlrpc_server_resource_controller_as_procedure($resource['name'], $name, $resource[$attr]);
-    }
-  }
-
-  foreach ($subcontrollers as $attr => $name) {
-    if (isset($resource[$attr])) {
-      foreach ($resource[$attr] as $sc_name => $controller) {
-        $methods[] = _xmlrpc_server_resource_controller_as_procedure($resource['name'], $name .'_'. $sc_name, $controller);
-      }
-    }
-  }
-
-  if (isset($resource['actions'])) {
-    foreach ($resource['actions'] as $sc_name => $controller) {
-      $methods[] = _xmlrpc_server_resource_controller_as_procedure($resource['name'], 'action_'. $sc_name, $controller);
-    }
-  }
-
-  return $methods;
-}
-
-/**
- * Helper function for _xmlrpc_server_resources_as_procedures() that turns a resource
- * controller into an XMLRPC method.
- *
- * @param $resource
- *   The resource being converted (node, user, etc.)
- * @param $name
- *   The method name (retrieve, create, etc.)
- * @param $controller
- *   Associative array defining the method's properties and callbacks.
- *
- */
-function _xmlrpc_server_resource_controller_as_procedure($resource, $name, $controller) {
-  $method = array_merge($controller, array(
-    'method' => $resource .'.'. $name,
-  ));
-
-  return $method;
-}
diff --git services.info services.info
index 4b79c43..03e04f6 100644
--- services.info
+++ services.info
@@ -18,5 +18,6 @@ files[] = tests/functional/ServicesResourceSystemTests.test
 files[] = tests/functional/ServicesEndpointTests.test
 files[] = tests/unit/TestServicesModule.test
 files[] = tests/services.test
+files[] = tests/functional/ServicesXMLRPCTests.test
 
 dependencies[] = ctools
diff --git services.module services.module
index 3423345..f6da3a2 100644
--- services.module
+++ services.module
@@ -455,3 +455,55 @@ function services_controller_get($name, $endpoint) {
     }
   }
 }
+
+/**
+ * Convert a resource to RPC-style methods.
+ *
+ * @param array $resource
+ *   A resource definition.
+ *
+ * @return array
+ *   An array of RPC method definitions
+ */
+function services_resources_as_procedures($resource) {
+  static $controllers = array('create', 'retrieve', 'update', 'delete', 'index');
+  static $subcontrollers = array('actions', 'relationships', 'targeted actions');
+
+  $methods = array();
+
+  foreach ($controllers as $name) {
+    if (isset($resource[$name])) {
+      $methods[] = _services_resource_controller_as_procedure($resource['name'], $name, $resource[$name]);
+    }
+  }
+
+  foreach ($subcontrollers as $name) {
+    if (isset($resource[$name])) {
+      foreach ($resource[$name] as $sc_name => $controller) {
+        $methods[] = _services_resource_controller_as_procedure($resource['name'], $sc_name, $controller);
+      }
+    }
+  }
+
+  return $methods;
+}
+
+/**
+ * Helper function for _services_resources_as_procedures() that turns a resource
+ * controller into an RPC method.
+ *
+ * @param $resource
+ *   The resource being converted (node, user, etc.)
+ * @param $name
+ *   The method name (retrieve, create, etc.)
+ * @param $controller
+ *   Associative array defining the method's properties and callbacks.
+ *
+ */
+function _services_resource_controller_as_procedure($resource, $name, $controller) {
+  $method = array_merge($controller, array(
+    'method' => $resource . '.' . $name,
+  ));
+
+  return $method;
+}
diff --git tests/functional/ServicesXMLRPCTests.test tests/functional/ServicesXMLRPCTests.test
new file mode 100644
index 0000000..f812972
--- /dev/null
+++ tests/functional/ServicesXMLRPCTests.test
@@ -0,0 +1,201 @@
+<?php
+
+class ServicesXMLRPCTestCase extends DrupalWebTestCase {
+  // Endpoint details.
+  protected $endpoint = NULL;
+  // Session ID.
+  protected $sessid = NULL;
+  // Session name.
+  protected $session_name = NULL;
+
+  /**
+   * Implements getInfo().
+   */
+  public static function getInfo() {
+   return array(
+     'name'        => t('XMLRPC Server'),
+     'description' => t('Test XMLRPC server.'),
+     'group'       => t('Services'),
+   );
+  }
+
+  public function setUp() {
+    parent::setUp('ctools', 'services', 'xmlrpc_server', 'services_test_resource');
+    // Set up endpoint.
+    $this->endpoint =  $this->saveNewEndpoint();
+  }
+
+  /**
+   * Test list.Methods call.
+   *
+   * Regression http://drupal.org/node/1072844.
+   */
+  function testlistMethods() {
+    $result = $this->servicesXMLRPC('system.listMethods', array());
+    $this->assertFalse(in_array('node.index', $result['body']), t('Not able to find not enabled node.index method.'), 'XMLRPC: listMethods');
+  }
+
+  /**
+   * Test user login.
+   */
+  function testUserLogin() {
+    // Create user.
+    $user = $this->drupalCreateUser(array('access user profiles'));
+    $args = array(
+      'username' => $user->name,
+      'password' => $user->pass_raw,
+    );
+    $result = $this->servicesXMLRPC('user.login', $args);
+    $this->assertEqual($result['body']['user']['uid'], $user->uid,
+      t('User %user logged in successfully.', array('%user' => $user->name)), 'XMLRPC: UserLogin');
+
+    $this->sessid = $result['body']['sessid'];
+    $this->session_name = $result['body']['session_name'];
+
+    // Call index method as logged in user.
+    $result = $this->servicesXMLRPC('user.index');
+    // There should be three users available: anonymous, admin and newly created.
+    $this->assertTrue(count($result['body']) == 3, t('Users listed properly.'), 'XMLRPC: UserLogin');
+  }
+
+  /**
+   * Precedence CRUD methods > Actions > Relations > Targeted Actions
+   *
+   * @see http://drupal.org/node/1016350
+   */
+  function testPrecedence() {
+    $args = array('arg1' => $this->randomName());
+    $result = $this->servicesXMLRPC('services_test.retrieve', $args);
+    $this->assertEqual($result['body'], 'CRUD Retrieve ' . $args['arg1'], t('XMLRPC precedence works properly (CRUD higher priority than action).'), 'XMLRPC: Precedence');
+  }
+
+  public function saveNewEndpoint() {
+    $edit = $this->populateEndpointFAPI() ;
+    $endpoint = new stdClass;
+    $endpoint->disabled = FALSE; /* Edit this to true to make a default endpoint disabled initially */
+    $endpoint->api_version = 3;
+    $endpoint->name = $edit['name'];
+    $endpoint->title = $edit['title'];
+    $endpoint->server = $edit['server'];
+    $endpoint->path = $edit['path'];
+    $endpoint->authentication = array();
+    $endpoint->resources = array(
+      'system' => array(
+        'alias' => '',
+        'actions' => array(
+          'connect' => array(
+            'enabled' => 1,
+          ),
+          'get_variable' => array(
+            'enabled' => 1,
+          ),
+          'set_variable' => array(
+            'enabled' => 1,
+          ),
+        ),
+      ),
+      'user' => array(
+        'alias' => '',
+        'operations' => array(
+          'create' => array(
+            'enabled' => 1,
+          ),
+          'retrieve' => array(
+            'enabled' => 1,
+          ),
+          'update' => array(
+            'enabled' => 1,
+          ),
+          'delete' => array(
+            'enabled' => 1,
+          ),
+          'index' => array(
+            'enabled' => 1,
+          ),
+        ),
+        'actions' => array(
+          'login' => array(
+            'enabled' => 1,
+          ),
+          'logout' => array(
+            'enabled' => 1,
+          ),
+        ),
+      ),
+      'services_test' => array(
+        'alias' => '',
+        'operations' => array(
+          'retrieve' => array(
+            'enabled' => 1,
+          ),
+        ),
+        'actions' => array(
+          'retrieve' => array(
+            'enabled' => 1,
+          ),
+        ),
+      ),
+    );
+    $endpoint->debug = 1;
+    services_endpoint_save($endpoint);
+    $endpoint = services_endpoint_load($endpoint->name);
+    $this->assertTrue($endpoint->name == $edit['name'], t('Endpoint successfully created'));
+    return $endpoint;
+  }
+
+  public function populateEndpointFAPI() {
+    return array(
+      'name'   => 'machinename',
+      'title'  => $this->randomName(20),
+      'path'   => $this->randomName(10),
+      'server' => 'xmlrpc_server',
+    );
+  }
+
+  /**
+   * Do XMLRPC call.
+   *
+   * @param string $method
+   *   Name of method to call.
+   * @param array $args
+   *   Arguments to pass to call.
+   * @param bool $sessid
+   *   Add cookies in order to log in.
+   * @param bool $assert_no_error
+   *   Whether assert that no error returned.
+   * @return array
+   *   array(
+   *     'body' -- answer of call
+   *     'error_message' -- error message if any
+   *   )
+   */
+  public function servicesXMLRPC($method, $args = array(), $sessid = TRUE, $assert_no_error = TRUE) {
+    if (!is_array($args)) {
+      $args = array($args);
+    }
+
+    // Set up cookies.
+    $options = array();
+    if ($sessid && !empty($this->sessid)) {
+      $options = array('headers' => array('Cookie' => $this->session_name . '=' . $this->sessid));
+    }
+
+    $output = xmlrpc(url($this->endpoint->path, array('absolute' => TRUE)), array($method => $args), $options);
+
+    $error_message = xmlrpc_error_msg();
+
+    if ($assert_no_error) {
+      $this->assertTrue(empty($error_message), t('XMLRPC call %method run without errors.', array('%method' => $method)), 'XMLRPC call');
+    }
+    $this->verbose('XMLRPC request to: ' . $method .
+                   '<hr />Arguments: ' . highlight_string('<?php ' . var_export($args, TRUE), TRUE) .
+                   '<hr />Response: ' . highlight_string('<?php ' . var_export($output, TRUE), TRUE) .
+                   '<hr />Error: ' . $error_message);
+
+    if (!empty($error_message)) {
+      return array('error_message' => $error_message, 'body' => '');
+    }
+
+    return array('error_message' => '', 'body' => $output);
+  }
+}
diff --git tests/services_test_resource/services_test_resource.info tests/services_test_resource/services_test_resource.info
new file mode 100644
index 0000000..8967a1b
--- /dev/null
+++ tests/services_test_resource/services_test_resource.info
@@ -0,0 +1,9 @@
+name = Services Test Resource
+description = Provide test methods to check different situations.
+package = Services
+core = 7.x
+php = 5.x
+
+files[] = services_test_resource.module
+
+dependencies[] = services
\ No newline at end of file
diff --git tests/services_test_resource/services_test_resource.module tests/services_test_resource/services_test_resource.module
new file mode 100644
index 0000000..e6b21d8
--- /dev/null
+++ tests/services_test_resource/services_test_resource.module
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * Implements hook_services_resources().
+ */
+function services_test_resource_services_resources() {
+  return array(
+    'services_test' => array(
+      'retrieve' => array(
+        'callback' => '_services_test_resource_retrieve',
+        'args' => array(
+          array(
+            'name' => 'arg1',
+            'optional' => FALSE,
+            'source' => array('path' => 0),
+            'type' => 'int',
+            'description' => 'Test argument 1.',
+          ),
+        ),
+        'access callback' => '_services_test_resource_access',
+        'access arguments' => array('view'),
+        'access arguments append' => TRUE,
+      ),
+      'actions' => array(
+        'retrieve' => array(
+          'access callback' => '_services_test_resource_access',
+          'access arguments' => array('view'),
+          'access arguments append' => TRUE,
+          'callback' => '_services_test_resource_action_retrieve',
+          'args' => array(
+            array(
+              'name' => 'arg1',
+              'optional' => FALSE,
+              'source' => array('path' => 0),
+              'type' => 'int',
+              'description' => 'Test argument 1.',
+            ),
+          ),
+        ),
+      ),
+    ),
+  );
+}
+
+/**
+ * CRUD retrieve callback.
+ */
+function _services_test_resource_retrieve($arg1) {
+  return 'CRUD Retrieve ' . $arg1;
+}
+
+/**
+ * Action retrieve callback.
+ */
+function _services_test_resource_action_retrieve($arg1) {
+  return 'Action retrieve' . $arg1;
+}
+
+/**
+ * Access callback.
+ */
+function _services_test_resource_access($op) {
+  return TRUE;
+}
\ No newline at end of file
