diff --git services.info services.info
index 9f86623..6e2c1cc 100644
--- services.info
+++ services.info
@@ -18,5 +18,6 @@ files[] = tests/functional/ServicesResourceUserTests.test
 files[] = tests/functional/ServicesEndpointTests.test
 files[] = tests/unit/TestServicesModule.test
 files[] = tests/services.test
+files[] = tests/functional/ServicesXMLRPCTests.test
 
-dependencies[] = ctools
\ No newline at end of file
+dependencies[] = ctools
diff --git tests/functional/ServicesXMLRPCTests.test tests/functional/ServicesXMLRPCTests.test
new file mode 100644
index 0000000..ed9bd87
--- /dev/null
+++ tests/functional/ServicesXMLRPCTests.test
@@ -0,0 +1,114 @@
+<?php
+
+class ServicesXMLRPCTestCase extends DrupalWebTestCase {
+  // Endpoint details.
+  protected $endpoint = NULL;
+  // Session ID.
+  protected $sessid = NULL;
+  // Authorized user.
+  protected $user = 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');
+    // Set up endpoint.
+    $this->endpoint =  $this->saveNewEndpoint();
+    // Create user.
+    $this->user = $this->drupalCreateUser();
+  }
+
+  function dsm($var) {
+    $this->verbose(highlight_string('<?php ' . var_export($var, TRUE), TRUE));
+  }
+
+  function testPrefix() {
+    $result = $this->servicesXMLRPC('system.listMethods', array());
+    $this->dsm($result);
+    $result = $this->servicesXMLRPC('node.index', array());
+    $this->dsm($result);
+  }
+
+  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,
+          ),
+        ),
+      ),
+    );
+    $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',
+    );
+  }
+
+  public function servicesXMLRPC($method, $args = array(), $noerror = FALSE) {
+    if (!is_array($args)) {
+      $args = array($args);
+    }
+    // In the end $protocol_args needs to be URL of XMLRPC endpoint, function name, session ID.
+    // The one exception to this is system.connect, which never requires a session id (it is the
+    // equivalent of your first page hit to a drupal site, establishing an anonymous session).
+//    if ($method == 'system.connect') {
+      $arguments = array(url($this->endpoint->path, array('absolute' => TRUE)), array($method => $args));
+//    }
+//    else {
+//      $arguments = array(url($this->endpoint->path, array('absolute' => TRUE)), array($method => $args), $this->sessid);
+//    }
+
+    $output = call_user_func_array('xmlrpc', $arguments);
+
+    if (!$noerror) {
+      // Error logging.
+      $error_message = xmlrpc_error_msg();
+      if (!empty($error_message)) {
+        if (module_exists('devel')) {
+          //dsm($error_message);
+        }
+        watchdog('gem_sync_xmlrpcsend', $error_message);
+        return array('error' => TRUE, 'message' => $error_message);
+      }
+    }
+
+    return $output;
+  }
+
+}
