diff --git a/includes/common.inc b/includes/common.inc
index 95e03e8..baac66c 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -7665,39 +7665,6 @@ function entity_form_submit_build_entity($entity_type, $entity, $form, &$form_st
 }
 
 /**
- * Performs one or more XML-RPC request(s).
- *
- * Usage example:
- * @code
- * $result = xmlrpc('http://example.com/xmlrpc.php', array(
- *   'service.methodName' => array($parameter, $second, $third),
- * ));
- * @endcode
- *
- * @param $url
- *   An absolute URL of the XML-RPC endpoint.
- * @param $args
- *   An associative array whose keys are the methods to call and whose values
- *   are the arguments to pass to the respective method. If multiple methods
- *   are specified, a system.multicall is performed.
- * @param $options
- *   (optional) An array of options to pass along to drupal_http_request().
- *
- * @return
- *   For one request:
- *     Either the return value of the method on success, or FALSE.
- *     If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
- *   For multiple requests:
- *     An array of results. Each result will either be the result
- *     returned by the method called, or an xmlrpc_error object if the call
- *     failed. See xmlrpc_error().
- */
-function xmlrpc($url, $args, $options = array()) {
-  require_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
-  return _xmlrpc($url, $args, $options);
-}
-
-/**
  * Retrieves a list of all available archivers.
  *
  * @see hook_archiver_info()
diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
deleted file mode 100644
index 92e5d14..0000000
--- a/includes/xmlrpc.inc
+++ /dev/null
@@ -1,625 +0,0 @@
-<?php
-
-/**
- * @file
- * Drupal XML-RPC library.
- *
- * Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
- * Version 1.7 (beta) - Simon Willison, 23rd May 2005
- * Site:   http://scripts.incutio.com/xmlrpc/
- * Manual: http://scripts.incutio.com/xmlrpc/manual.php
- * This version is made available under the GNU GPL License
- */
-
-/**
- * Turns a data structure into objects with 'data' and 'type' attributes.
- *
- * @param $data
- *   The data structure.
- * @param $type
- *   Optional type to assign to $data.
- *
- * @return object
- *   An XML-RPC data object containing the input $data.
- */
-function xmlrpc_value($data, $type = FALSE) {
-  $xmlrpc_value = new stdClass();
-  $xmlrpc_value->data = $data;
-  if (!$type) {
-    $type = xmlrpc_value_calculate_type($xmlrpc_value);
-  }
-  $xmlrpc_value->type = $type;
-  if ($type == 'struct') {
-    // Turn all the values in the array into new xmlrpc_values
-    foreach ($xmlrpc_value->data as $key => $value) {
-      $xmlrpc_value->data[$key] = xmlrpc_value($value);
-    }
-  }
-  if ($type == 'array') {
-    for ($i = 0, $j = count($xmlrpc_value->data); $i < $j; $i++) {
-      $xmlrpc_value->data[$i] = xmlrpc_value($xmlrpc_value->data[$i]);
-    }
-  }
-  return $xmlrpc_value;
-}
-
-/**
- * Maps a PHP type to an XML-RPC type.
- *
- * @param $xmlrpc_value
- *   Variable whose type should be mapped.
- *
- * @return string
- *   The corresponding XML-RPC type.
- *
- * @see http://www.xmlrpc.com/spec#scalars
- */
-function xmlrpc_value_calculate_type($xmlrpc_value) {
-  // http://www.php.net/gettype: Never use gettype() to test for a certain type
-  // [...] Instead, use the is_* functions.
-  if (is_bool($xmlrpc_value->data)) {
-    return 'boolean';
-  }
-  if (is_double($xmlrpc_value->data)) {
-    return 'double';
-  }
-  if (is_int($xmlrpc_value->data)) {
-    return 'int';
-  }
-  if (is_array($xmlrpc_value->data)) {
-    // empty or integer-indexed arrays are 'array', string-indexed arrays 'struct'
-    return empty($xmlrpc_value->data) || range(0, count($xmlrpc_value->data) - 1) === array_keys($xmlrpc_value->data) ? 'array' : 'struct';
-  }
-  if (is_object($xmlrpc_value->data)) {
-    if (isset($xmlrpc_value->data->is_date)) {
-      return 'date';
-    }
-    if (isset($xmlrpc_value->data->is_base64)) {
-      return 'base64';
-    }
-    $xmlrpc_value->data = get_object_vars($xmlrpc_value->data);
-    return 'struct';
-  }
-  // default
-  return 'string';
-}
-
-/**
- * Generates XML representing the given value.
- *
- * @param $xmlrpc_value
- *   A value to be represented in XML.
- *
- * @return
- *   XML representation of $xmlrpc_value.
- */
-function xmlrpc_value_get_xml($xmlrpc_value) {
-  switch ($xmlrpc_value->type) {
-    case 'boolean':
-      return '<boolean>' . (($xmlrpc_value->data) ? '1' : '0') . '</boolean>';
-
-    case 'int':
-      return '<int>' . $xmlrpc_value->data . '</int>';
-
-    case 'double':
-      return '<double>' . $xmlrpc_value->data . '</double>';
-
-    case 'string':
-      // Note: we don't escape apostrophes because of the many blogging clients
-      // that don't support numerical entities (and XML in general) properly.
-      return '<string>' . htmlspecialchars($xmlrpc_value->data) . '</string>';
-
-    case 'array':
-      $return = '<array><data>' . "\n";
-      foreach ($xmlrpc_value->data as $item) {
-        $return .= '  <value>' . xmlrpc_value_get_xml($item) . "</value>\n";
-      }
-      $return .= '</data></array>';
-      return $return;
-
-    case 'struct':
-      $return = '<struct>' . "\n";
-      foreach ($xmlrpc_value->data as $name => $value) {
-        $return .= "  <member><name>" . check_plain($name) . "</name><value>";
-        $return .= xmlrpc_value_get_xml($value) . "</value></member>\n";
-      }
-      $return .= '</struct>';
-      return $return;
-
-    case 'date':
-      return xmlrpc_date_get_xml($xmlrpc_value->data);
-
-    case 'base64':
-      return xmlrpc_base64_get_xml($xmlrpc_value->data);
-  }
-  return FALSE;
-}
-
-/**
- * Constructs an object representing an XML-RPC message.
- *
- * @param $message
- *   A string containing an XML message.
- *
- * @return object
- *   An XML-RPC object containing the message.
- *
- * @see http://www.xmlrpc.com/spec
- */
-function xmlrpc_message($message) {
-  $xmlrpc_message = new stdClass();
-  // The stack used to keep track of the current array/struct
-  $xmlrpc_message->array_structs = array();
-  // The stack used to keep track of if things are structs or array
-  $xmlrpc_message->array_structs_types = array();
-  // A stack as well
-  $xmlrpc_message->current_struct_name = array();
-  $xmlrpc_message->message = $message;
-  return $xmlrpc_message;
-}
-
-/**
- * Parses an XML-RPC message.
- *
- * If parsing fails, the faultCode and faultString will be added to the message
- * object.
- *
- * @param $xmlrpc_message
- *   An object generated by xmlrpc_message().
- *
- * @return
- *   TRUE if parsing succeeded; FALSE otherwise.
- */
-function xmlrpc_message_parse($xmlrpc_message) {
-  $xmlrpc_message->_parser = xml_parser_create();
-  // Set XML parser to take the case of tags into account.
-  xml_parser_set_option($xmlrpc_message->_parser, XML_OPTION_CASE_FOLDING, FALSE);
-  // Set XML parser callback functions
-  xml_set_element_handler($xmlrpc_message->_parser, 'xmlrpc_message_tag_open', 'xmlrpc_message_tag_close');
-  xml_set_character_data_handler($xmlrpc_message->_parser, 'xmlrpc_message_cdata');
-  xmlrpc_message_set($xmlrpc_message);
-  if (!xml_parse($xmlrpc_message->_parser, $xmlrpc_message->message)) {
-    return FALSE;
-  }
-  xml_parser_free($xmlrpc_message->_parser);
-
-  // Grab the error messages, if any.
-  $xmlrpc_message = xmlrpc_message_get();
-  if (!isset($xmlrpc_message->messagetype)) {
-    return FALSE;
-  }
-  elseif ($xmlrpc_message->messagetype == 'fault') {
-    $xmlrpc_message->fault_code = $xmlrpc_message->params[0]['faultCode'];
-    $xmlrpc_message->fault_string = $xmlrpc_message->params[0]['faultString'];
-  }
-  return TRUE;
-}
-
-/**
- * Stores a copy of the most recent XML-RPC message object temporarily.
- *
- * @param $value
- *   An XML-RPC message to store, or NULL to keep the last message.
- *
- * @return object
- *   The most recently stored message.
- *
- * @see xmlrpc_message_get()
- */
-function xmlrpc_message_set($value = NULL) {
-  static $xmlrpc_message;
-  if ($value) {
-    $xmlrpc_message = $value;
-  }
-  return $xmlrpc_message;
-}
-
-/**
- * Returns the most recently stored XML-RPC message object.
- *
- * @return object
- *   The most recently stored message.
- *
- * @see xmlrpc_message_set()
- */
-function xmlrpc_message_get() {
-  return xmlrpc_message_set();
-}
-
-/**
- * Handles opening tags for XML parsing in xmlrpc_message_parse().
- */
-function xmlrpc_message_tag_open($parser, $tag, $attr) {
-  $xmlrpc_message = xmlrpc_message_get();
-  $xmlrpc_message->current_tag_contents = '';
-  $xmlrpc_message->last_open = $tag;
-  switch ($tag) {
-    case 'methodCall':
-    case 'methodResponse':
-    case 'fault':
-      $xmlrpc_message->messagetype = $tag;
-      break;
-
-    // Deal with stacks of arrays and structs
-    case 'data':
-      $xmlrpc_message->array_structs_types[] = 'array';
-      $xmlrpc_message->array_structs[] = array();
-      break;
-
-    case 'struct':
-      $xmlrpc_message->array_structs_types[] = 'struct';
-      $xmlrpc_message->array_structs[] = array();
-      break;
-  }
-  xmlrpc_message_set($xmlrpc_message);
-}
-
-/**
- * Handles character data for XML parsing in xmlrpc_message_parse().
- */
-function xmlrpc_message_cdata($parser, $cdata) {
-  $xmlrpc_message = xmlrpc_message_get();
-  $xmlrpc_message->current_tag_contents .= $cdata;
-  xmlrpc_message_set($xmlrpc_message);
-}
-
-/**
- * Handles closing tags for XML parsing in xmlrpc_message_parse().
- */
-function xmlrpc_message_tag_close($parser, $tag) {
-  $xmlrpc_message = xmlrpc_message_get();
-  $value_flag = FALSE;
-  switch ($tag) {
-    case 'int':
-    case 'i4':
-      $value = (int)trim($xmlrpc_message->current_tag_contents);
-      $value_flag = TRUE;
-      break;
-
-    case 'double':
-      $value = (double)trim($xmlrpc_message->current_tag_contents);
-      $value_flag = TRUE;
-      break;
-
-    case 'string':
-      $value = $xmlrpc_message->current_tag_contents;
-      $value_flag = TRUE;
-      break;
-
-    case 'dateTime.iso8601':
-      $value = xmlrpc_date(trim($xmlrpc_message->current_tag_contents));
-      // $value = $iso->getTimestamp();
-      $value_flag = TRUE;
-      break;
-
-    case 'value':
-      // If no type is indicated, the type is string
-      // We take special care for empty values
-      if (trim($xmlrpc_message->current_tag_contents) != '' || (isset($xmlrpc_message->last_open) && ($xmlrpc_message->last_open == 'value'))) {
-        $value = (string) $xmlrpc_message->current_tag_contents;
-        $value_flag = TRUE;
-      }
-      unset($xmlrpc_message->last_open);
-      break;
-
-    case 'boolean':
-      $value = (boolean)trim($xmlrpc_message->current_tag_contents);
-      $value_flag = TRUE;
-      break;
-
-    case 'base64':
-      $value = base64_decode(trim($xmlrpc_message->current_tag_contents));
-      $value_flag = TRUE;
-      break;
-
-    // Deal with stacks of arrays and structs
-    case 'data':
-    case 'struct':
-      $value = array_pop($xmlrpc_message->array_structs);
-      array_pop($xmlrpc_message->array_structs_types);
-      $value_flag = TRUE;
-      break;
-
-    case 'member':
-      array_pop($xmlrpc_message->current_struct_name);
-      break;
-
-    case 'name':
-      $xmlrpc_message->current_struct_name[] = trim($xmlrpc_message->current_tag_contents);
-      break;
-
-    case 'methodName':
-      $xmlrpc_message->methodname = trim($xmlrpc_message->current_tag_contents);
-      break;
-  }
-  if ($value_flag) {
-    if (count($xmlrpc_message->array_structs) > 0) {
-      // Add value to struct or array
-      if ($xmlrpc_message->array_structs_types[count($xmlrpc_message->array_structs_types) - 1] == 'struct') {
-        // Add to struct
-        $xmlrpc_message->array_structs[count($xmlrpc_message->array_structs) - 1][$xmlrpc_message->current_struct_name[count($xmlrpc_message->current_struct_name) - 1]] = $value;
-      }
-      else {
-        // Add to array
-        $xmlrpc_message->array_structs[count($xmlrpc_message->array_structs) - 1][] = $value;
-      }
-    }
-    else {
-      // Just add as a parameter
-      $xmlrpc_message->params[] = $value;
-    }
-  }
-  if (!in_array($tag, array("data", "struct", "member"))) {
-    $xmlrpc_message->current_tag_contents = '';
-  }
-  xmlrpc_message_set($xmlrpc_message);
-}
-
-/**
- * Constructs an object representing an XML-RPC request.
- *
- * @param $method
- *   The name of the method to be called.
- * @param $args
- *   An array of parameters to send with the method.
- *
- * @return object
- *   An XML-RPC object representing the request.
- */
-function xmlrpc_request($method, $args) {
-  $xmlrpc_request = new stdClass();
-  $xmlrpc_request->method = $method;
-  $xmlrpc_request->args = $args;
-  $xmlrpc_request->xml = <<<EOD
-<?xml version="1.0"?>
-<methodCall>
-<methodName>{$xmlrpc_request->method}</methodName>
-<params>
-
-EOD;
-  foreach ($xmlrpc_request->args as $arg) {
-    $xmlrpc_request->xml .= '<param><value>';
-    $v = xmlrpc_value($arg);
-    $xmlrpc_request->xml .= xmlrpc_value_get_xml($v);
-    $xmlrpc_request->xml .= "</value></param>\n";
-  }
-  $xmlrpc_request->xml .= '</params></methodCall>';
-  return $xmlrpc_request;
-}
-
-/**
- * Generates, temporarily saves, and returns an XML-RPC error object.
- *
- * @param $code
- *   The error code.
- * @param $message
- *   The error message.
- * @param $reset
- *   TRUE to empty the temporary error storage. Ignored if $code is supplied.
- *
- * @return object
- *   An XML-RPC error object representing $code and $message, or the most
- *   recently stored error object if omitted.
- */
-function xmlrpc_error($code = NULL, $message = NULL, $reset = FALSE) {
-  static $xmlrpc_error;
-  if (isset($code)) {
-    $xmlrpc_error = new stdClass();
-    $xmlrpc_error->is_error = TRUE;
-    $xmlrpc_error->code = $code;
-    $xmlrpc_error->message = $message;
-  }
-  elseif ($reset) {
-    $xmlrpc_error = NULL;
-  }
-  return $xmlrpc_error;
-}
-
-/**
- * Converts an XML-RPC error object into XML.
- *
- * @param $xmlrpc_error
- *   The XML-RPC error object.
- *
- * @return string
- *   An XML representation of the error as an XML methodResponse.
- */
-function xmlrpc_error_get_xml($xmlrpc_error) {
-  return <<<EOD
-<methodResponse>
-  <fault>
-  <value>
-    <struct>
-    <member>
-      <name>faultCode</name>
-      <value><int>{$xmlrpc_error->code}</int></value>
-    </member>
-    <member>
-      <name>faultString</name>
-      <value><string>{$xmlrpc_error->message}</string></value>
-    </member>
-    </struct>
-  </value>
-  </fault>
-</methodResponse>
-
-EOD;
-}
-
-/**
- * Converts a PHP or ISO date/time to an XML-RPC object.
- *
- * @param $time
- *   A PHP timestamp or an ISO date-time string.
- *
- * @return object
- *   An XML-RPC time/date object.
- */
-function xmlrpc_date($time) {
-  $xmlrpc_date = new stdClass();
-  $xmlrpc_date->is_date = TRUE;
-  // $time can be a PHP timestamp or an ISO one
-  if (is_numeric($time)) {
-    $xmlrpc_date->year = gmdate('Y', $time);
-    $xmlrpc_date->month = gmdate('m', $time);
-    $xmlrpc_date->day = gmdate('d', $time);
-    $xmlrpc_date->hour = gmdate('H', $time);
-    $xmlrpc_date->minute = gmdate('i', $time);
-    $xmlrpc_date->second = gmdate('s', $time);
-    $xmlrpc_date->iso8601 = gmdate('Ymd\TH:i:s', $time);
-  }
-  else {
-    $xmlrpc_date->iso8601 = $time;
-    $time = str_replace(array('-', ':'), '', $time);
-    $xmlrpc_date->year = substr($time, 0, 4);
-    $xmlrpc_date->month = substr($time, 4, 2);
-    $xmlrpc_date->day = substr($time, 6, 2);
-    $xmlrpc_date->hour = substr($time, 9, 2);
-    $xmlrpc_date->minute = substr($time, 11, 2);
-    $xmlrpc_date->second = substr($time, 13, 2);
-  }
-  return $xmlrpc_date;
-}
-
-/**
- * Converts an XML-RPC date-time object into XML.
- *
- * @param $xmlrpc_date
- *   The XML-RPC date-time object.
- *
- * @return string
- *   An XML representation of the date/time as XML.
- */
-function xmlrpc_date_get_xml($xmlrpc_date) {
-  return '<dateTime.iso8601>' . $xmlrpc_date->year . $xmlrpc_date->month . $xmlrpc_date->day . 'T' . $xmlrpc_date->hour . ':' . $xmlrpc_date->minute . ':' . $xmlrpc_date->second . '</dateTime.iso8601>';
-}
-
-/**
- * Returns an XML-RPC base 64 object.
- *
- * @param $data
- *   Base 64 data to store in returned object.
- *
- * @return object
- *   An XML-RPC base 64 object.
- */
-function xmlrpc_base64($data) {
-  $xmlrpc_base64 = new stdClass();
-  $xmlrpc_base64->is_base64 = TRUE;
-  $xmlrpc_base64->data = $data;
-  return $xmlrpc_base64;
-}
-
-/**
- * Converts an XML-RPC base 64 object into XML.
- *
- * @param $xmlrpc_base64
- *   The XML-RPC base 64 object.
- *
- * @return string
- *   An XML representation of the base 64 data as XML.
- */
-function xmlrpc_base64_get_xml($xmlrpc_base64) {
-  return '<base64>' . base64_encode($xmlrpc_base64->data) . '</base64>';
-}
-
-/**
- * Performs one or more XML-RPC requests.
- *
- * @param $url
- *   An absolute URL of the XML-RPC endpoint, e.g.,
- *   http://example.com/xmlrpc.php
- * @param $args
- *   An associative array whose keys are the methods to call and whose values
- *   are the arguments to pass to the respective method. If multiple methods
- *   are specified, a system.multicall is performed.
- * @param $options
- *   (optional) An array of options to pass along to drupal_http_request().
- *
- * @return
- *   A single response (single request) or an array of responses (multicall
- *   request). Each response is the return value of the method, just as if it
- *   has been a local function call, on success, or FALSE on failure. If FALSE
- *   is returned, see xmlrpc_errno() and xmlrpc_error_msg() to get more
- *   information.
- */
-function _xmlrpc($url, $args, $options = array()) {
-  xmlrpc_clear_error();
-  if (count($args) > 1) {
-    $multicall_args = array();
-    foreach ($args as $method => $call) {
-      $multicall_args[] = array('methodName' => $method, 'params' => $call);
-    }
-    $method = 'system.multicall';
-    $args = array($multicall_args);
-  }
-  else {
-    $method = key($args);
-    $args = $args[$method];
-  }
-  $xmlrpc_request = xmlrpc_request($method, $args);
-  // Required options which will replace any that are passed in.
-  $options['method'] = 'POST';
-  $options['headers']['Content-Type'] = 'text/xml';
-  $options['data'] = $xmlrpc_request->xml;
-  $result = drupal_http_request($url, $options);
-  if ($result->code != 200) {
-    xmlrpc_error($result->code, $result->error);
-    return FALSE;
-  }
-  $message = xmlrpc_message($result->data);
-  // Now parse what we've got back
-  if (!xmlrpc_message_parse($message)) {
-    // XML error
-    xmlrpc_error(-32700, t('Parse error. Not well formed'));
-    return FALSE;
-  }
-  // Is the message a fault?
-  if ($message->messagetype == 'fault') {
-    xmlrpc_error($message->fault_code, $message->fault_string);
-    return FALSE;
-  }
-  // We now know that the message is well-formed and a non-fault result.
-  if ($method == 'system.multicall') {
-    // Return per-method results or error objects.
-    $return = array();
-    foreach ($message->params[0] as $result) {
-      if (array_keys($result) == array(0)) {
-        $return[] = $result[0];
-      }
-      else {
-        $return[] = xmlrpc_error($result['faultCode'], $result['faultString']);
-      }
-    }
-  }
-  else {
-    $return = $message->params[0];
-  }
-  return $return;
-}
-
-/**
- * Returns the last XML-RPC client error number.
- */
-function xmlrpc_errno() {
-  $error = xmlrpc_error();
-  return ($error != NULL ? $error->code : NULL);
-}
-
-/**
- * Returns the last XML-RPC client error message.
- */
-function xmlrpc_error_msg() {
-  $error = xmlrpc_error();
-  return ($error != NULL ? $error->message : NULL);
-}
-
-/**
- * Clears any previously-saved errors.
- *
- * @see xmlrpc_error()
- */
-function xmlrpc_clear_error() {
-  xmlrpc_error(NULL, NULL, TRUE);
-}
-
diff --git a/includes/xmlrpcs.inc b/includes/xmlrpcs.inc
deleted file mode 100644
index 70c7cda..0000000
--- a/includes/xmlrpcs.inc
+++ /dev/null
@@ -1,385 +0,0 @@
-<?php
-
-/**
- * @file
- * Provides API for defining and handling XML-RPC requests.
- */
-
-/**
- * Invokes XML-RPC methods on this server.
- *
- * @param array $callbacks
- *   Array of external XML-RPC method names with the callbacks they map to.
- */
-function xmlrpc_server($callbacks) {
-  $xmlrpc_server = new stdClass();
-  // Define built-in XML-RPC method names
-  $defaults = array(
-    'system.multicall' => 'xmlrpc_server_multicall',
-    array(
-      'system.methodSignature',
-      'xmlrpc_server_method_signature',
-      array('array', 'string'),
-      'Returns an array describing the return type and required parameters of a method.',
-    ),
-    array(
-      'system.getCapabilities',
-      'xmlrpc_server_get_capabilities',
-      array('struct'),
-      'Returns a struct describing the XML-RPC specifications supported by this server.',
-    ),
-    array(
-      'system.listMethods',
-      'xmlrpc_server_list_methods',
-      array('array'),
-      'Returns an array of available methods on this server.',
-    ),
-    array(
-      'system.methodHelp',
-      'xmlrpc_server_method_help',
-      array('string', 'string'),
-      'Returns a documentation string for the specified method.',
-    ),
-  );
-  // We build an array of all method names by combining the built-ins
-  // with those defined by modules implementing the _xmlrpc hook.
-  // Built-in methods are overridable.
-  $callbacks = array_merge($defaults, (array) $callbacks);
-  drupal_alter('xmlrpc', $callbacks);
-  foreach ($callbacks as $key => $callback) {
-    // we could check for is_array($callback)
-    if (is_int($key)) {
-      $method = $callback[0];
-      $xmlrpc_server->callbacks[$method] = $callback[1];
-      $xmlrpc_server->signatures[$method] = $callback[2];
-      $xmlrpc_server->help[$method] = $callback[3];
-    }
-    else {
-      $xmlrpc_server->callbacks[$key] = $callback;
-      $xmlrpc_server->signatures[$key] = '';
-      $xmlrpc_server->help[$key] = '';
-    }
-  }
-
-  $data = file_get_contents('php://input');
-  if (!$data) {
-    print 'XML-RPC server accepts POST requests only.';
-    drupal_exit();
-  }
-  $xmlrpc_server->message = xmlrpc_message($data);
-  if (!xmlrpc_message_parse($xmlrpc_server->message)) {
-    xmlrpc_server_error(-32700, t('Parse error. Request not well formed.'));
-  }
-  if ($xmlrpc_server->message->messagetype != 'methodCall') {
-    xmlrpc_server_error(-32600, t('Server error. Invalid XML-RPC. Request must be a methodCall.'));
-  }
-  if (!isset($xmlrpc_server->message->params)) {
-    $xmlrpc_server->message->params = array();
-  }
-  xmlrpc_server_set($xmlrpc_server);
-  $result = xmlrpc_server_call($xmlrpc_server, $xmlrpc_server->message->methodname, $xmlrpc_server->message->params);
-
-  if (is_object($result) && !empty($result->is_error)) {
-    xmlrpc_server_error($result);
-  }
-  // Encode the result
-  $r = xmlrpc_value($result);
-  // Create the XML
-  $xml = '
-<methodResponse>
-  <params>
-  <param>
-    <value>' . xmlrpc_value_get_xml($r) . '</value>
-  </param>
-  </params>
-</methodResponse>
-
-';
-  // Send it
-  xmlrpc_server_output($xml);
-}
-
-/**
- * Throws an XML-RPC error.
- *
- * @param $error
- *   An error object or integer error code.
- * @param $message
- *   (optional) The description of the error. Used only if an integer error
- *   code was passed in.
- */
-function xmlrpc_server_error($error, $message = FALSE) {
-  if ($message && !is_object($error)) {
-    $error = xmlrpc_error($error, $message);
-  }
-  xmlrpc_server_output(xmlrpc_error_get_xml($error));
-}
-
-/**
- * Sends XML-RPC output to the browser.
- *
- * @param string $xml
- *   XML to send to the browser.
- */
-function xmlrpc_server_output($xml) {
-  $xml = '<?xml version="1.0"?>' . "\n" . $xml;
-  drupal_add_http_header('Content-Length', strlen($xml));
-  drupal_add_http_header('Content-Type', 'text/xml');
-  echo $xml;
-  drupal_exit();
-}
-
-/**
- * Stores a copy of an XML-RPC request temporarily.
- *
- * @param object $xmlrpc_server
- *   (optional) Request object created by xmlrpc_server(). Omit to leave the
- *   previous server object saved.
- *
- * @return
- *   The latest stored request.
- *
- * @see xmlrpc_server_get()
- */
-function xmlrpc_server_set($xmlrpc_server = NULL) {
-  static $server;
-  if (!isset($server)) {
-    $server = $xmlrpc_server;
-  }
-  return $server;
-}
-
-/**
- * Retrieves the latest stored XML-RPC request.
- *
- * @return object
- *   The stored request.
- *
- * @see xmlrpc_server_set()
- */
-function xmlrpc_server_get() {
-  return xmlrpc_server_set();
-}
-
-/**
- * Dispatches an XML-RPC request and any parameters to the appropriate handler.
- *
- * @param object $xmlrpc_server
- *   Object containing information about this XML-RPC server, the methods it
- *   provides, their signatures, etc.
- * @param string $methodname
- *   The external XML-RPC method name; e.g., 'system.methodHelp'.
- * @param array $args
- *   Array containing any parameters that are to be sent along with the request.
- *
- * @return
- *   The results of the call.
- */
-function xmlrpc_server_call($xmlrpc_server, $methodname, $args) {
-  // Make sure parameters are in an array
-  if ($args && !is_array($args)) {
-    $args = array($args);
-  }
-  // Has this method been mapped to a Drupal function by us or by modules?
-  if (!isset($xmlrpc_server->callbacks[$methodname])) {
-    return xmlrpc_error(-32601, t('Server error. Requested method @methodname not specified.', array("@methodname" => $xmlrpc_server->message->methodname)));
-  }
-  $method = $xmlrpc_server->callbacks[$methodname];
-  $signature = $xmlrpc_server->signatures[$methodname];
-
-  // If the method has a signature, validate the request against the signature
-  if (is_array($signature)) {
-    $ok = TRUE;
-    $return_type = array_shift($signature);
-    // Check the number of arguments
-    if (count($args) != count($signature)) {
-      return xmlrpc_error(-32602, t('Server error. Wrong number of method parameters.'));
-    }
-    // Check the argument types
-    foreach ($signature as $key => $type) {
-      $arg = $args[$key];
-      switch ($type) {
-        case 'int':
-        case 'i4':
-          if (is_array($arg) || !is_int($arg)) {
-            $ok = FALSE;
-          }
-          break;
-
-        case 'base64':
-        case 'string':
-          if (!is_string($arg)) {
-            $ok = FALSE;
-          }
-          break;
-
-        case 'boolean':
-          if ($arg !== FALSE && $arg !== TRUE) {
-            $ok = FALSE;
-          }
-          break;
-
-        case 'float':
-        case 'double':
-          if (!is_float($arg)) {
-            $ok = FALSE;
-          }
-          break;
-
-        case 'date':
-        case 'dateTime.iso8601':
-          if (!$arg->is_date) {
-            $ok = FALSE;
-          }
-          break;
-      }
-      if (!$ok) {
-        return xmlrpc_error(-32602, t('Server error. Invalid method parameters.'));
-      }
-    }
-  }
-
-  if (!function_exists($method)) {
-    return xmlrpc_error(-32601, t('Server error. Requested function @method does not exist.', array("@method" => $method)));
-  }
-  // Call the mapped function
-  return call_user_func_array($method, $args);
-}
-
-/**
- * Dispatches multiple XML-RPC requests.
- *
- * @param array $methodcalls
- *   An array of XML-RPC requests to make. Each request is an array with the
- *   following elements:
- *   - methodName: Name of the method to invoke.
- *   - params: Parameters to pass to the method.
- *
- * @return
- *   An array of the results of each request.
- *
- * @see xmlrpc_server_call()
- */
-function xmlrpc_server_multicall($methodcalls) {
-  // See http://www.xmlrpc.com/discuss/msgReader$1208
-  $return = array();
-  $xmlrpc_server = xmlrpc_server_get();
-  foreach ($methodcalls as $call) {
-    $ok = TRUE;
-    if (!isset($call['methodName']) || !isset($call['params'])) {
-      $result = xmlrpc_error(3, t('Invalid syntax for system.multicall.'));
-      $ok = FALSE;
-    }
-    $method = $call['methodName'];
-    $params = $call['params'];
-    if ($method == 'system.multicall') {
-      $result = xmlrpc_error(-32600, t('Recursive calls to system.multicall are forbidden.'));
-    }
-    elseif ($ok) {
-      $result = xmlrpc_server_call($xmlrpc_server, $method, $params);
-    }
-    if (is_object($result) && !empty($result->is_error)) {
-      $return[] = array(
-        'faultCode' => $result->code,
-        'faultString' => $result->message,
-      );
-    }
-    else {
-      $return[] = array($result);
-    }
-  }
-  return $return;
-}
-
-/**
- * Lists the methods available on this XML-RPC server.
- *
- * XML-RPC method system.listMethods maps to this function.
- *
- * @return array
- *   Array of the names of methods available on this server.
- */
-function xmlrpc_server_list_methods() {
-  $xmlrpc_server = xmlrpc_server_get();
-  return array_keys($xmlrpc_server->callbacks);
-}
-
-/**
- * Returns a list of the capabilities of this server.
- *
- * XML-RPC method system.getCapabilities maps to this function.
- *
- * @return array
- *   Array of server capabilities.
- *
- * @see http://groups.yahoo.com/group/xml-rpc/message/2897
- */
-function xmlrpc_server_get_capabilities() {
-  return array(
-    'xmlrpc' => array(
-      'specUrl' => 'http://www.xmlrpc.com/spec',
-      'specVersion' => 1,
-    ),
-    'faults_interop' => array(
-      'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php',
-      'specVersion' => 20010516,
-    ),
-    'system.multicall' => array(
-      'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',
-      'specVersion' => 1,
-    ),
-    'introspection' => array(
-      'specUrl' => 'http://scripts.incutio.com/xmlrpc/introspection.html',
-      'specVersion' => 1,
-    ),
-  );
-}
-
-/**
- * Returns one method signature for a function.
- *
- * This is the function mapped to the XML-RPC method system.methodSignature.
- *
- * A method signature is an array of the input and output types of a method. For
- * instance, the method signature of this function is array('array', 'string'),
- * because it takes an array and returns a string.
- *
- * @param string $methodname
- *   Name of method to return a method signature for.
- *
- * @return array
- *   An array of arrays of types, each of the arrays representing one method
- *   signature of the function that $methodname maps to.
- */
-function xmlrpc_server_method_signature($methodname) {
-  $xmlrpc_server = xmlrpc_server_get();
-  if (!isset($xmlrpc_server->callbacks[$methodname])) {
-    return xmlrpc_error(-32601, t('Server error. Requested method @methodname not specified.', array("@methodname" => $methodname)));
-  }
-  if (!is_array($xmlrpc_server->signatures[$methodname])) {
-    return xmlrpc_error(-32601, t('Server error. Requested method @methodname signature not specified.', array("@methodname" => $methodname)));
-  }
-  // We array of types
-  $return = array();
-  foreach ($xmlrpc_server->signatures[$methodname] as $type) {
-    $return[] = $type;
-  }
-  return array($return);
-}
-
-/**
- * Returns the help for an XML-RPC method.
- *
- * XML-RPC method system.methodHelp maps to this function.
- *
- * @param string $method
- *   Name of method for which we return a help string.
- *
- * @return string
- *   Help text for $method.
- */
-function xmlrpc_server_method_help($method) {
-  $xmlrpc_server = xmlrpc_server_get();
-  return $xmlrpc_server->help[$method];
-}
-
diff --git a/modules/simpletest/tests/xmlrpc.test b/modules/simpletest/tests/xmlrpc.test
deleted file mode 100644
index 1b5bff3..0000000
--- a/modules/simpletest/tests/xmlrpc.test
+++ /dev/null
@@ -1,244 +0,0 @@
-<?php
-
-/**
- * Perform basic XML-RPC tests that do not require addition callbacks.
- */
-class XMLRPCBasicTestCase extends DrupalWebTestCase {
-
-  public static function getInfo() {
-    return array(
-      'name'  => 'XML-RPC basic',
-      'description'  => 'Perform basic XML-RPC tests that do not require additional callbacks.',
-      'group' => 'XML-RPC',
-    );
-  }
-
-  /**
-   * Ensure that a basic XML-RPC call with no parameters works.
-   */
-  protected function testListMethods() {
-    // Minimum list of methods that should be included.
-    $minimum = array(
-      'system.multicall',
-      'system.methodSignature',
-      'system.getCapabilities',
-      'system.listMethods',
-      'system.methodHelp',
-    );
-
-    // Invoke XML-RPC call to get list of methods.
-    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
-    $methods = xmlrpc($url, array('system.listMethods' => array()));
-
-    // Ensure that the minimum methods were found.
-    $count = 0;
-    foreach ($methods as $method) {
-      if (in_array($method, $minimum)) {
-        $count++;
-      }
-    }
-
-    $this->assertEqual($count, count($minimum), 'system.listMethods returned at least the minimum listing');
-  }
-
-  /**
-   * Ensure that system.methodSignature returns an array of signatures.
-   */
-  protected function testMethodSignature() {
-    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
-    $signature = xmlrpc($url, array('system.methodSignature' => array('system.listMethods')));
-    $this->assert(is_array($signature) && !empty($signature) && is_array($signature[0]),
-      t('system.methodSignature returns an array of signature arrays.'));
-  }
-
-  /**
-   * Ensure that XML-RPC correctly handles invalid messages when parsing.
-   */
-  protected function testInvalidMessageParsing() {
-    $invalid_messages = array(
-      array(
-        'message' => xmlrpc_message(''),
-        'assertion' => t('Empty message correctly rejected during parsing.'),
-      ),
-      array(
-        'message' => xmlrpc_message('<?xml version="1.0" encoding="ISO-8859-1"?>'),
-        'assertion' => t('Empty message with XML declaration correctly rejected during parsing.'),
-      ),
-      array(
-        'message' => xmlrpc_message('<?xml version="1.0"?><params><param><value><string>value</string></value></param></params>'),
-        'assertion' => t('Non-empty message without a valid message type is rejected during parsing.'),
-      ),
-      array(
-        'message' => xmlrpc_message('<methodResponse><params><param><value><string>value</string></value></param></methodResponse>'),
-        'assertion' => t('Non-empty malformed message is rejected during parsing.'),
-      ),
-    );
-
-    foreach ($invalid_messages as $assertion) {
-      $this->assertFalse(xmlrpc_message_parse($assertion['message']), $assertion['assertion']);
-    }
-  }
-}
-
-class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
-  public static function getInfo() {
-    return array(
-      'name' => 'XML-RPC validator',
-      'description' => 'See <a href="http://www.xmlrpc.com/validator1Docs">the xmlrpc validator1 specification</a>.',
-      'group' => 'XML-RPC',
-    );
-  }
-
-  function setUp() {
-    parent::setUp('xmlrpc_test');
-  }
-
-  /**
-   * Run validator1 tests.
-   */
-  function testValidator1() {
-    $xml_url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
-    srand();
-    mt_srand();
-
-    $array_1 = array(array('curly' => mt_rand(-100, 100)),
-                  array('curly' => mt_rand(-100, 100)),
-                  array('larry' => mt_rand(-100, 100)),
-                  array('larry' => mt_rand(-100, 100)),
-                  array('moe' => mt_rand(-100, 100)),
-                  array('moe' => mt_rand(-100, 100)),
-                  array('larry' => mt_rand(-100, 100)));
-    shuffle($array_1);
-    $l_res_1 = xmlrpc_test_arrayOfStructsTest($array_1);
-    $r_res_1 = xmlrpc($xml_url, array('validator1.arrayOfStructsTest' => array($array_1)));
-    $this->assertIdentical($l_res_1, $r_res_1);
-
-    $string_2 = 't\'&>>zf"md>yr>xlcev<h<"k&j<og"w&&>">>uai"np&s>>q\'&b<>"&&&';
-    $l_res_2 = xmlrpc_test_countTheEntities($string_2);
-    $r_res_2 = xmlrpc($xml_url, array('validator1.countTheEntities' => array($string_2)));
-    $this->assertIdentical($l_res_2, $r_res_2);
-
-    $struct_3 = array('moe' => mt_rand(-100, 100), 'larry' => mt_rand(-100, 100), 'curly' => mt_rand(-100, 100), 'homer' => mt_rand(-100, 100));
-    $l_res_3 = xmlrpc_test_easyStructTest($struct_3);
-    $r_res_3 = xmlrpc($xml_url, array('validator1.easyStructTest' => array($struct_3)));
-    $this->assertIdentical($l_res_3, $r_res_3);
-
-    $struct_4 = array('sub1' => array('bar' => 13),
-                    'sub2' => 14,
-                    'sub3' => array('foo' => 1, 'baz' => 2),
-                    'sub4' => array('ss' => array('sss' => array('ssss' => 'sssss'))));
-    $l_res_4 = xmlrpc_test_echoStructTest($struct_4);
-    $r_res_4 = xmlrpc($xml_url, array('validator1.echoStructTest' => array($struct_4)));
-    $this->assertIdentical($l_res_4, $r_res_4);
-
-    $int_5     = mt_rand(-100, 100);
-    $bool_5    = (($int_5 % 2) == 0);
-    $string_5  = $this->randomName();
-    $double_5  = (double)(mt_rand(-1000, 1000) / 100);
-    $time_5    = REQUEST_TIME;
-    $base64_5  = $this->randomName(100);
-    $l_res_5 = xmlrpc_test_manyTypesTest($int_5, $bool_5, $string_5, $double_5, xmlrpc_date($time_5), $base64_5);
-    // See http://drupal.org/node/37766 why this currently fails
-    $l_res_5[5] = $l_res_5[5]->data;
-    $r_res_5 = xmlrpc($xml_url, array('validator1.manyTypesTest' => array($int_5, $bool_5, $string_5, $double_5, xmlrpc_date($time_5), xmlrpc_base64($base64_5))));
-    // @todo Contains objects, objects are not equal.
-    $this->assertEqual($l_res_5, $r_res_5);
-
-    $size = mt_rand(100, 200);
-    $array_6 = array();
-    for ($i = 0; $i < $size; $i++) {
-      $array_6[] = $this->randomName(mt_rand(8, 12));
-    }
-
-    $l_res_6 = xmlrpc_test_moderateSizeArrayCheck($array_6);
-    $r_res_6 = xmlrpc($xml_url, array('validator1.moderateSizeArrayCheck' => array($array_6)));
-    $this->assertIdentical($l_res_6, $r_res_6);
-
-    $struct_7 = array();
-    for ($y = 2000; $y < 2002; $y++) {
-      for ($m = 3; $m < 5; $m++) {
-        for ($d = 1; $d < 6; $d++) {
-          $ys = (string) $y;
-          $ms = sprintf('%02d', $m);
-          $ds = sprintf('%02d', $d);
-          $struct_7[$ys][$ms][$ds]['moe']   = mt_rand(-100, 100);
-          $struct_7[$ys][$ms][$ds]['larry'] = mt_rand(-100, 100);
-          $struct_7[$ys][$ms][$ds]['curly'] = mt_rand(-100, 100);
-        }
-      }
-    }
-    $l_res_7 = xmlrpc_test_nestedStructTest($struct_7);
-    $r_res_7 = xmlrpc($xml_url, array('validator1.nestedStructTest' => array($struct_7)));
-    $this->assertIdentical($l_res_7, $r_res_7);
-
-
-    $int_8 = mt_rand(-100, 100);
-    $l_res_8 = xmlrpc_test_simpleStructReturnTest($int_8);
-    $r_res_8 = xmlrpc($xml_url, array('validator1.simpleStructReturnTest' => array($int_8)));
-    $this->assertIdentical($l_res_8, $r_res_8);
-
-    /* Now test multicall */
-    $x = array();
-    $x['validator1.arrayOfStructsTest'] = array($array_1);
-    $x['validator1.countTheEntities'] = array($string_2);
-    $x['validator1.easyStructTest'] = array($struct_3);
-    $x['validator1.echoStructTest'] = array($struct_4);
-    $x['validator1.manyTypesTest'] = array($int_5, $bool_5, $string_5, $double_5, xmlrpc_date($time_5), xmlrpc_base64($base64_5));
-    $x['validator1.moderateSizeArrayCheck'] = array($array_6);
-    $x['validator1.nestedStructTest'] = array($struct_7);
-    $x['validator1.simpleStructReturnTest'] = array($int_8);
-
-    $a_l_res = array($l_res_1, $l_res_2, $l_res_3, $l_res_4, $l_res_5, $l_res_6, $l_res_7, $l_res_8);
-    $a_r_res = xmlrpc($xml_url, $x);
-    $this->assertEqual($a_l_res, $a_r_res);
-  }
-}
-
-class XMLRPCMessagesTestCase extends DrupalWebTestCase {
-  public static function getInfo() {
-    return array(
-      'name'  => 'XML-RPC message and alteration',
-      'description' => 'Test large messages and method alterations.',
-      'group' => 'XML-RPC',
-    );
-  }
-
-  function setUp() {
-    parent::setUp('xmlrpc_test');
-  }
-
-  /**
-   * Make sure that XML-RPC can transfer large messages.
-   */
-  function testSizedMessages() {
-    $xml_url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
-    $sizes = array(8, 80, 160);
-    foreach ($sizes as $size) {
-      $xml_message_l = xmlrpc_test_message_sized_in_kb($size);
-      $xml_message_r = xmlrpc($xml_url, array('messages.messageSizedInKB' => array($size)));
-
-      $this->assertEqual($xml_message_l, $xml_message_r, t('XML-RPC messages.messageSizedInKB of %s Kb size received', array('%s' => $size)));
-    }
-  }
-
-  /**
-   * Ensure that hook_xmlrpc_alter() can hide even builtin methods.
-   */
-  protected function testAlterListMethods() {
-
-    // Ensure xmlrpc_test_xmlrpc_alter() is disabled and retrieve regular list of methods.
-    variable_set('xmlrpc_test_xmlrpc_alter', FALSE);
-    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
-    $methods1 = xmlrpc($url, array('system.listMethods' => array()));
-
-    // Enable the alter hook and retrieve the list of methods again.
-    variable_set('xmlrpc_test_xmlrpc_alter', TRUE);
-    $methods2 = xmlrpc($url, array('system.listMethods' => array()));
-
-    $diff = array_diff($methods1, $methods2);
-    $this->assertTrue(is_array($diff) && !empty($diff), t('Method list is altered by hook_xmlrpc_alter'));
-    $removed = reset($diff);
-    $this->assertEqual($removed, 'system.methodSignature', t('Hiding builting system.methodSignature with hook_xmlrpc_alter works'));
-  }
-
-}
diff --git a/modules/simpletest/tests/xmlrpc_test.info b/modules/simpletest/tests/xmlrpc_test.info
deleted file mode 100644
index 6985439..0000000
--- a/modules/simpletest/tests/xmlrpc_test.info
+++ /dev/null
@@ -1,6 +0,0 @@
-name = "XML-RPC Test"
-description = "Support module for XML-RPC tests according to the validator1 specification."
-package = Testing
-version = VERSION
-core = 8.x
-hidden = TRUE
diff --git a/modules/simpletest/tests/xmlrpc_test.module b/modules/simpletest/tests/xmlrpc_test.module
deleted file mode 100644
index db8f113..0000000
--- a/modules/simpletest/tests/xmlrpc_test.module
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-
-function xmlrpc_test_arrayOfStructsTest($array) {
-  $sum = 0;
-  foreach ($array as $struct) {
-    if (isset($struct['curly'])) {
-      $sum += $struct['curly'];
-    }
-  }
-  return $sum;
-}
-
-function xmlrpc_test_countTheEntities($string) {
-  return array(
-    'ctLeftAngleBrackets' => substr_count($string, '<'),
-    'ctRightAngleBrackets' => substr_count($string, '>'),
-    'ctAmpersands' => substr_count($string, '&'),
-    'ctApostrophes' => substr_count($string, "'"),
-    'ctQuotes' => substr_count($string, '"'),
-  );
-}
-
-function xmlrpc_test_easyStructTest($array) {
-  return $array["curly"] + $array["moe"] + $array["larry"];
-}
-
-function xmlrpc_test_echoStructTest($array) {
-  return $array;
-}
-
-function xmlrpc_test_manyTypesTest($number, $boolean, $string, $double, $dateTime, $base64) {
-  $timestamp = gmmktime($dateTime->hour, $dateTime->minute, $dateTime->second, $dateTime->month, $dateTime->day, $dateTime->year);
-  return array($number, $boolean, $string, $double, xmlrpc_date($timestamp), xmlrpc_Base64($base64));
-}
-
-function xmlrpc_test_moderateSizeArrayCheck($array) {
-  return array_shift($array) . array_pop($array);
-}
-
-function xmlrpc_test_nestedStructTest($array) {
-  return $array["2000"]["04"]["01"]["larry"] + $array["2000"]["04"]["01"]["moe"] + $array["2000"]["04"]["01"]["curly"];
-}
-
-function xmlrpc_test_simpleStructReturnTest($number) {
-  return array("times10" => ($number*10), "times100" => ($number*100), "times1000" => ($number*1000));
-}
-
-/**
- * Implements hook_xmlrpc().
- */
-function xmlrpc_test_xmlrpc() {
-  return array(
-    'validator1.arrayOfStructsTest' => 'xmlrpc_test_arrayOfStructsTest',
-    'validator1.countTheEntities' => 'xmlrpc_test_countTheEntities',
-    'validator1.easyStructTest' => 'xmlrpc_test_easyStructTest',
-    'validator1.echoStructTest' => 'xmlrpc_test_echoStructTest',
-    'validator1.manyTypesTest' => 'xmlrpc_test_manyTypesTest',
-    'validator1.moderateSizeArrayCheck' => 'xmlrpc_test_moderateSizeArrayCheck',
-    'validator1.nestedStructTest' => 'xmlrpc_test_nestedStructTest',
-    'validator1.simpleStructReturnTest' => 'xmlrpc_test_simpleStructReturnTest',
-    'messages.messageSizedInKB' => 'xmlrpc_test_message_sized_in_kb',
-  );
-}
-
-/**
- * Implements hook_xmlrpc_alter().
- *
- * Hide (or not) the system.methodSignature() service depending on a variable.
- */
-function xmlrpc_test_xmlrpc_alter(&$services) {
-  if (variable_get('xmlrpc_test_xmlrpc_alter', FALSE)) {
-    $remove = NULL;
-    foreach ($services as $key => $value) {
-      if (!is_array($value)) {
-        continue;
-      }
-      if ($value[0] == 'system.methodSignature') {
-        $remove = $key;
-        break;
-      }
-    }
-    if (isset($remove)) {
-      unset($services[$remove]);
-    }
-  }
-}
-
-/**
- * Created a message of the desired size in KB.
- *
- * @param $size
- *   Message size in KB.
- * @return array
- *   Generated message structure.
- */
-function xmlrpc_test_message_sized_in_kb($size) {
-  $message = array();
-
-  $word = 'abcdefg';
-
-  // Create a ~1KB sized struct.
-  for ($i = 0 ; $i < 128; $i++) {
-    $line['word_' . $i] = $word;
-  }
-
-  for ($i = 0; $i < $size; $i++) {
-    $message['line_' . $i] = $line;
-  }
-
-  return $message;
-}
diff --git a/modules/xmlrpc/tests/xmlrpc.test b/modules/xmlrpc/tests/xmlrpc.test
new file mode 100644
index 0000000..955daae
--- /dev/null
+++ b/modules/xmlrpc/tests/xmlrpc.test
@@ -0,0 +1,248 @@
+<?php
+
+/**
+ * Perform basic XML-RPC tests that do not require addition callbacks.
+ */
+class XMLRPCBasicTestCase extends DrupalWebTestCase {
+
+  public static function getInfo() {
+    return array(
+      'name'  => 'XML-RPC basic',
+      'description'  => 'Perform basic XML-RPC tests that do not require additional callbacks.',
+      'group' => 'XML-RPC',
+    );
+  }
+  public static function setUp() {
+    parent::setUp(array('xmlrpc', 'xmlrpc_test'));
+  }
+
+
+  /**
+   * Ensure that a basic XML-RPC call with no parameters works.
+   */
+  protected function testListMethods() {
+    // Minimum list of methods that should be included.
+    $minimum = array(
+      'system.multicall',
+      'system.methodSignature',
+      'system.getCapabilities',
+      'system.listMethods',
+      'system.methodHelp',
+    );
+
+    // Invoke XML-RPC call to get list of methods.
+    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
+    $methods = xmlrpc($url, array('system.listMethods' => array()));
+
+    // Ensure that the minimum methods were found.
+    $count = 0;
+    foreach ($methods as $method) {
+      if (in_array($method, $minimum)) {
+        $count++;
+      }
+    }
+
+    $this->assertEqual($count, count($minimum), 'system.listMethods returned at least the minimum listing');
+  }
+
+  /**
+   * Ensure that system.methodSignature returns an array of signatures.
+   */
+  protected function testMethodSignature() {
+    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
+    $signature = xmlrpc($url, array('system.methodSignature' => array('system.listMethods')));
+    $this->assert(is_array($signature) && !empty($signature) && is_array($signature[0]),
+      t('system.methodSignature returns an array of signature arrays.'));
+  }
+
+  /**
+   * Ensure that XML-RPC correctly handles invalid messages when parsing.
+   */
+  protected function testInvalidMessageParsing() {
+    $invalid_messages = array(
+      array(
+        'message' => xmlrpc_message(''),
+        'assertion' => t('Empty message correctly rejected during parsing.'),
+      ),
+      array(
+        'message' => xmlrpc_message('<?xml version="1.0" encoding="ISO-8859-1"?>'),
+        'assertion' => t('Empty message with XML declaration correctly rejected during parsing.'),
+      ),
+      array(
+        'message' => xmlrpc_message('<?xml version="1.0"?><params><param><value><string>value</string></value></param></params>'),
+        'assertion' => t('Non-empty message without a valid message type is rejected during parsing.'),
+      ),
+      array(
+        'message' => xmlrpc_message('<methodResponse><params><param><value><string>value</string></value></param></methodResponse>'),
+        'assertion' => t('Non-empty malformed message is rejected during parsing.'),
+      ),
+    );
+
+    foreach ($invalid_messages as $assertion) {
+      $this->assertFalse(xmlrpc_message_parse($assertion['message']), $assertion['assertion']);
+    }
+  }
+}
+
+class XMLRPCValidator1IncTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name' => 'XML-RPC validator',
+      'description' => 'See <a href="http://www.xmlrpc.com/validator1Docs">the xmlrpc validator1 specification</a>.',
+      'group' => 'XML-RPC',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('xmlrpc_test');
+  }
+
+  /**
+   * Run validator1 tests.
+   */
+  function testValidator1() {
+    $xml_url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
+    srand();
+    mt_srand();
+
+    $array_1 = array(array('curly' => mt_rand(-100, 100)),
+                  array('curly' => mt_rand(-100, 100)),
+                  array('larry' => mt_rand(-100, 100)),
+                  array('larry' => mt_rand(-100, 100)),
+                  array('moe' => mt_rand(-100, 100)),
+                  array('moe' => mt_rand(-100, 100)),
+                  array('larry' => mt_rand(-100, 100)));
+    shuffle($array_1);
+    $l_res_1 = xmlrpc_test_arrayOfStructsTest($array_1);
+    $r_res_1 = xmlrpc($xml_url, array('validator1.arrayOfStructsTest' => array($array_1)));
+    $this->assertIdentical($l_res_1, $r_res_1);
+
+    $string_2 = 't\'&>>zf"md>yr>xlcev<h<"k&j<og"w&&>">>uai"np&s>>q\'&b<>"&&&';
+    $l_res_2 = xmlrpc_test_countTheEntities($string_2);
+    $r_res_2 = xmlrpc($xml_url, array('validator1.countTheEntities' => array($string_2)));
+    $this->assertIdentical($l_res_2, $r_res_2);
+
+    $struct_3 = array('moe' => mt_rand(-100, 100), 'larry' => mt_rand(-100, 100), 'curly' => mt_rand(-100, 100), 'homer' => mt_rand(-100, 100));
+    $l_res_3 = xmlrpc_test_easyStructTest($struct_3);
+    $r_res_3 = xmlrpc($xml_url, array('validator1.easyStructTest' => array($struct_3)));
+    $this->assertIdentical($l_res_3, $r_res_3);
+
+    $struct_4 = array('sub1' => array('bar' => 13),
+                    'sub2' => 14,
+                    'sub3' => array('foo' => 1, 'baz' => 2),
+                    'sub4' => array('ss' => array('sss' => array('ssss' => 'sssss'))));
+    $l_res_4 = xmlrpc_test_echoStructTest($struct_4);
+    $r_res_4 = xmlrpc($xml_url, array('validator1.echoStructTest' => array($struct_4)));
+    $this->assertIdentical($l_res_4, $r_res_4);
+
+    $int_5     = mt_rand(-100, 100);
+    $bool_5    = (($int_5 % 2) == 0);
+    $string_5  = $this->randomName();
+    $double_5  = (double)(mt_rand(-1000, 1000) / 100);
+    $time_5    = REQUEST_TIME;
+    $base64_5  = $this->randomName(100);
+    $l_res_5 = xmlrpc_test_manyTypesTest($int_5, $bool_5, $string_5, $double_5, xmlrpc_date($time_5), $base64_5);
+    // See http://drupal.org/node/37766 why this currently fails
+    $l_res_5[5] = $l_res_5[5]->data;
+    $r_res_5 = xmlrpc($xml_url, array('validator1.manyTypesTest' => array($int_5, $bool_5, $string_5, $double_5, xmlrpc_date($time_5), xmlrpc_base64($base64_5))));
+    // @todo Contains objects, objects are not equal.
+    $this->assertEqual($l_res_5, $r_res_5);
+
+    $size = mt_rand(100, 200);
+    $array_6 = array();
+    for ($i = 0; $i < $size; $i++) {
+      $array_6[] = $this->randomName(mt_rand(8, 12));
+    }
+
+    $l_res_6 = xmlrpc_test_moderateSizeArrayCheck($array_6);
+    $r_res_6 = xmlrpc($xml_url, array('validator1.moderateSizeArrayCheck' => array($array_6)));
+    $this->assertIdentical($l_res_6, $r_res_6);
+
+    $struct_7 = array();
+    for ($y = 2000; $y < 2002; $y++) {
+      for ($m = 3; $m < 5; $m++) {
+        for ($d = 1; $d < 6; $d++) {
+          $ys = (string) $y;
+          $ms = sprintf('%02d', $m);
+          $ds = sprintf('%02d', $d);
+          $struct_7[$ys][$ms][$ds]['moe']   = mt_rand(-100, 100);
+          $struct_7[$ys][$ms][$ds]['larry'] = mt_rand(-100, 100);
+          $struct_7[$ys][$ms][$ds]['curly'] = mt_rand(-100, 100);
+        }
+      }
+    }
+    $l_res_7 = xmlrpc_test_nestedStructTest($struct_7);
+    $r_res_7 = xmlrpc($xml_url, array('validator1.nestedStructTest' => array($struct_7)));
+    $this->assertIdentical($l_res_7, $r_res_7);
+
+
+    $int_8 = mt_rand(-100, 100);
+    $l_res_8 = xmlrpc_test_simpleStructReturnTest($int_8);
+    $r_res_8 = xmlrpc($xml_url, array('validator1.simpleStructReturnTest' => array($int_8)));
+    $this->assertIdentical($l_res_8, $r_res_8);
+
+    /* Now test multicall */
+    $x = array();
+    $x['validator1.arrayOfStructsTest'] = array($array_1);
+    $x['validator1.countTheEntities'] = array($string_2);
+    $x['validator1.easyStructTest'] = array($struct_3);
+    $x['validator1.echoStructTest'] = array($struct_4);
+    $x['validator1.manyTypesTest'] = array($int_5, $bool_5, $string_5, $double_5, xmlrpc_date($time_5), xmlrpc_base64($base64_5));
+    $x['validator1.moderateSizeArrayCheck'] = array($array_6);
+    $x['validator1.nestedStructTest'] = array($struct_7);
+    $x['validator1.simpleStructReturnTest'] = array($int_8);
+
+    $a_l_res = array($l_res_1, $l_res_2, $l_res_3, $l_res_4, $l_res_5, $l_res_6, $l_res_7, $l_res_8);
+    $a_r_res = xmlrpc($xml_url, $x);
+    $this->assertEqual($a_l_res, $a_r_res);
+  }
+}
+
+class XMLRPCMessagesTestCase extends DrupalWebTestCase {
+  public static function getInfo() {
+    return array(
+      'name'  => 'XML-RPC message and alteration',
+      'description' => 'Test large messages and method alterations.',
+      'group' => 'XML-RPC',
+    );
+  }
+
+  function setUp() {
+    parent::setUp('xmlrpc_test');
+  }
+
+  /**
+   * Make sure that XML-RPC can transfer large messages.
+   */
+  function testSizedMessages() {
+    $xml_url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
+    $sizes = array(8, 80, 160);
+    foreach ($sizes as $size) {
+      $xml_message_l = xmlrpc_test_message_sized_in_kb($size);
+      $xml_message_r = xmlrpc($xml_url, array('messages.messageSizedInKB' => array($size)));
+
+      $this->assertEqual($xml_message_l, $xml_message_r, t('XML-RPC messages.messageSizedInKB of %s Kb size received', array('%s' => $size)));
+    }
+  }
+
+  /**
+   * Ensure that hook_xmlrpc_alter() can hide even builtin methods.
+   */
+  protected function testAlterListMethods() {
+
+    // Ensure xmlrpc_test_xmlrpc_alter() is disabled and retrieve regular list of methods.
+    variable_set('xmlrpc_test_xmlrpc_alter', FALSE);
+    $url = url(NULL, array('absolute' => TRUE)) . 'xmlrpc.php';
+    $methods1 = xmlrpc($url, array('system.listMethods' => array()));
+
+    // Enable the alter hook and retrieve the list of methods again.
+    variable_set('xmlrpc_test_xmlrpc_alter', TRUE);
+    $methods2 = xmlrpc($url, array('system.listMethods' => array()));
+
+    $diff = array_diff($methods1, $methods2);
+    $this->assertTrue(is_array($diff) && !empty($diff), t('Method list is altered by hook_xmlrpc_alter'));
+    $removed = reset($diff);
+    $this->assertEqual($removed, 'system.methodSignature', t('Hiding builting system.methodSignature with hook_xmlrpc_alter works'));
+  }
+
+}
diff --git a/modules/xmlrpc/tests/xmlrpc_test.info b/modules/xmlrpc/tests/xmlrpc_test.info
new file mode 100644
index 0000000..6985439
--- /dev/null
+++ b/modules/xmlrpc/tests/xmlrpc_test.info
@@ -0,0 +1,6 @@
+name = "XML-RPC Test"
+description = "Support module for XML-RPC tests according to the validator1 specification."
+package = Testing
+version = VERSION
+core = 8.x
+hidden = TRUE
diff --git a/modules/xmlrpc/tests/xmlrpc_test.module b/modules/xmlrpc/tests/xmlrpc_test.module
new file mode 100644
index 0000000..db8f113
--- /dev/null
+++ b/modules/xmlrpc/tests/xmlrpc_test.module
@@ -0,0 +1,111 @@
+<?php
+
+function xmlrpc_test_arrayOfStructsTest($array) {
+  $sum = 0;
+  foreach ($array as $struct) {
+    if (isset($struct['curly'])) {
+      $sum += $struct['curly'];
+    }
+  }
+  return $sum;
+}
+
+function xmlrpc_test_countTheEntities($string) {
+  return array(
+    'ctLeftAngleBrackets' => substr_count($string, '<'),
+    'ctRightAngleBrackets' => substr_count($string, '>'),
+    'ctAmpersands' => substr_count($string, '&'),
+    'ctApostrophes' => substr_count($string, "'"),
+    'ctQuotes' => substr_count($string, '"'),
+  );
+}
+
+function xmlrpc_test_easyStructTest($array) {
+  return $array["curly"] + $array["moe"] + $array["larry"];
+}
+
+function xmlrpc_test_echoStructTest($array) {
+  return $array;
+}
+
+function xmlrpc_test_manyTypesTest($number, $boolean, $string, $double, $dateTime, $base64) {
+  $timestamp = gmmktime($dateTime->hour, $dateTime->minute, $dateTime->second, $dateTime->month, $dateTime->day, $dateTime->year);
+  return array($number, $boolean, $string, $double, xmlrpc_date($timestamp), xmlrpc_Base64($base64));
+}
+
+function xmlrpc_test_moderateSizeArrayCheck($array) {
+  return array_shift($array) . array_pop($array);
+}
+
+function xmlrpc_test_nestedStructTest($array) {
+  return $array["2000"]["04"]["01"]["larry"] + $array["2000"]["04"]["01"]["moe"] + $array["2000"]["04"]["01"]["curly"];
+}
+
+function xmlrpc_test_simpleStructReturnTest($number) {
+  return array("times10" => ($number*10), "times100" => ($number*100), "times1000" => ($number*1000));
+}
+
+/**
+ * Implements hook_xmlrpc().
+ */
+function xmlrpc_test_xmlrpc() {
+  return array(
+    'validator1.arrayOfStructsTest' => 'xmlrpc_test_arrayOfStructsTest',
+    'validator1.countTheEntities' => 'xmlrpc_test_countTheEntities',
+    'validator1.easyStructTest' => 'xmlrpc_test_easyStructTest',
+    'validator1.echoStructTest' => 'xmlrpc_test_echoStructTest',
+    'validator1.manyTypesTest' => 'xmlrpc_test_manyTypesTest',
+    'validator1.moderateSizeArrayCheck' => 'xmlrpc_test_moderateSizeArrayCheck',
+    'validator1.nestedStructTest' => 'xmlrpc_test_nestedStructTest',
+    'validator1.simpleStructReturnTest' => 'xmlrpc_test_simpleStructReturnTest',
+    'messages.messageSizedInKB' => 'xmlrpc_test_message_sized_in_kb',
+  );
+}
+
+/**
+ * Implements hook_xmlrpc_alter().
+ *
+ * Hide (or not) the system.methodSignature() service depending on a variable.
+ */
+function xmlrpc_test_xmlrpc_alter(&$services) {
+  if (variable_get('xmlrpc_test_xmlrpc_alter', FALSE)) {
+    $remove = NULL;
+    foreach ($services as $key => $value) {
+      if (!is_array($value)) {
+        continue;
+      }
+      if ($value[0] == 'system.methodSignature') {
+        $remove = $key;
+        break;
+      }
+    }
+    if (isset($remove)) {
+      unset($services[$remove]);
+    }
+  }
+}
+
+/**
+ * Created a message of the desired size in KB.
+ *
+ * @param $size
+ *   Message size in KB.
+ * @return array
+ *   Generated message structure.
+ */
+function xmlrpc_test_message_sized_in_kb($size) {
+  $message = array();
+
+  $word = 'abcdefg';
+
+  // Create a ~1KB sized struct.
+  for ($i = 0 ; $i < 128; $i++) {
+    $line['word_' . $i] = $word;
+  }
+
+  for ($i = 0; $i < $size; $i++) {
+    $message['line_' . $i] = $line;
+  }
+
+  return $message;
+}
diff --git a/modules/xmlrpc/xmlrpc.inc b/modules/xmlrpc/xmlrpc.inc
new file mode 100644
index 0000000..92e5d14
--- /dev/null
+++ b/modules/xmlrpc/xmlrpc.inc
@@ -0,0 +1,625 @@
+<?php
+
+/**
+ * @file
+ * Drupal XML-RPC library.
+ *
+ * Based on the IXR - The Incutio XML-RPC Library - (c) Incutio Ltd 2002-2005
+ * Version 1.7 (beta) - Simon Willison, 23rd May 2005
+ * Site:   http://scripts.incutio.com/xmlrpc/
+ * Manual: http://scripts.incutio.com/xmlrpc/manual.php
+ * This version is made available under the GNU GPL License
+ */
+
+/**
+ * Turns a data structure into objects with 'data' and 'type' attributes.
+ *
+ * @param $data
+ *   The data structure.
+ * @param $type
+ *   Optional type to assign to $data.
+ *
+ * @return object
+ *   An XML-RPC data object containing the input $data.
+ */
+function xmlrpc_value($data, $type = FALSE) {
+  $xmlrpc_value = new stdClass();
+  $xmlrpc_value->data = $data;
+  if (!$type) {
+    $type = xmlrpc_value_calculate_type($xmlrpc_value);
+  }
+  $xmlrpc_value->type = $type;
+  if ($type == 'struct') {
+    // Turn all the values in the array into new xmlrpc_values
+    foreach ($xmlrpc_value->data as $key => $value) {
+      $xmlrpc_value->data[$key] = xmlrpc_value($value);
+    }
+  }
+  if ($type == 'array') {
+    for ($i = 0, $j = count($xmlrpc_value->data); $i < $j; $i++) {
+      $xmlrpc_value->data[$i] = xmlrpc_value($xmlrpc_value->data[$i]);
+    }
+  }
+  return $xmlrpc_value;
+}
+
+/**
+ * Maps a PHP type to an XML-RPC type.
+ *
+ * @param $xmlrpc_value
+ *   Variable whose type should be mapped.
+ *
+ * @return string
+ *   The corresponding XML-RPC type.
+ *
+ * @see http://www.xmlrpc.com/spec#scalars
+ */
+function xmlrpc_value_calculate_type($xmlrpc_value) {
+  // http://www.php.net/gettype: Never use gettype() to test for a certain type
+  // [...] Instead, use the is_* functions.
+  if (is_bool($xmlrpc_value->data)) {
+    return 'boolean';
+  }
+  if (is_double($xmlrpc_value->data)) {
+    return 'double';
+  }
+  if (is_int($xmlrpc_value->data)) {
+    return 'int';
+  }
+  if (is_array($xmlrpc_value->data)) {
+    // empty or integer-indexed arrays are 'array', string-indexed arrays 'struct'
+    return empty($xmlrpc_value->data) || range(0, count($xmlrpc_value->data) - 1) === array_keys($xmlrpc_value->data) ? 'array' : 'struct';
+  }
+  if (is_object($xmlrpc_value->data)) {
+    if (isset($xmlrpc_value->data->is_date)) {
+      return 'date';
+    }
+    if (isset($xmlrpc_value->data->is_base64)) {
+      return 'base64';
+    }
+    $xmlrpc_value->data = get_object_vars($xmlrpc_value->data);
+    return 'struct';
+  }
+  // default
+  return 'string';
+}
+
+/**
+ * Generates XML representing the given value.
+ *
+ * @param $xmlrpc_value
+ *   A value to be represented in XML.
+ *
+ * @return
+ *   XML representation of $xmlrpc_value.
+ */
+function xmlrpc_value_get_xml($xmlrpc_value) {
+  switch ($xmlrpc_value->type) {
+    case 'boolean':
+      return '<boolean>' . (($xmlrpc_value->data) ? '1' : '0') . '</boolean>';
+
+    case 'int':
+      return '<int>' . $xmlrpc_value->data . '</int>';
+
+    case 'double':
+      return '<double>' . $xmlrpc_value->data . '</double>';
+
+    case 'string':
+      // Note: we don't escape apostrophes because of the many blogging clients
+      // that don't support numerical entities (and XML in general) properly.
+      return '<string>' . htmlspecialchars($xmlrpc_value->data) . '</string>';
+
+    case 'array':
+      $return = '<array><data>' . "\n";
+      foreach ($xmlrpc_value->data as $item) {
+        $return .= '  <value>' . xmlrpc_value_get_xml($item) . "</value>\n";
+      }
+      $return .= '</data></array>';
+      return $return;
+
+    case 'struct':
+      $return = '<struct>' . "\n";
+      foreach ($xmlrpc_value->data as $name => $value) {
+        $return .= "  <member><name>" . check_plain($name) . "</name><value>";
+        $return .= xmlrpc_value_get_xml($value) . "</value></member>\n";
+      }
+      $return .= '</struct>';
+      return $return;
+
+    case 'date':
+      return xmlrpc_date_get_xml($xmlrpc_value->data);
+
+    case 'base64':
+      return xmlrpc_base64_get_xml($xmlrpc_value->data);
+  }
+  return FALSE;
+}
+
+/**
+ * Constructs an object representing an XML-RPC message.
+ *
+ * @param $message
+ *   A string containing an XML message.
+ *
+ * @return object
+ *   An XML-RPC object containing the message.
+ *
+ * @see http://www.xmlrpc.com/spec
+ */
+function xmlrpc_message($message) {
+  $xmlrpc_message = new stdClass();
+  // The stack used to keep track of the current array/struct
+  $xmlrpc_message->array_structs = array();
+  // The stack used to keep track of if things are structs or array
+  $xmlrpc_message->array_structs_types = array();
+  // A stack as well
+  $xmlrpc_message->current_struct_name = array();
+  $xmlrpc_message->message = $message;
+  return $xmlrpc_message;
+}
+
+/**
+ * Parses an XML-RPC message.
+ *
+ * If parsing fails, the faultCode and faultString will be added to the message
+ * object.
+ *
+ * @param $xmlrpc_message
+ *   An object generated by xmlrpc_message().
+ *
+ * @return
+ *   TRUE if parsing succeeded; FALSE otherwise.
+ */
+function xmlrpc_message_parse($xmlrpc_message) {
+  $xmlrpc_message->_parser = xml_parser_create();
+  // Set XML parser to take the case of tags into account.
+  xml_parser_set_option($xmlrpc_message->_parser, XML_OPTION_CASE_FOLDING, FALSE);
+  // Set XML parser callback functions
+  xml_set_element_handler($xmlrpc_message->_parser, 'xmlrpc_message_tag_open', 'xmlrpc_message_tag_close');
+  xml_set_character_data_handler($xmlrpc_message->_parser, 'xmlrpc_message_cdata');
+  xmlrpc_message_set($xmlrpc_message);
+  if (!xml_parse($xmlrpc_message->_parser, $xmlrpc_message->message)) {
+    return FALSE;
+  }
+  xml_parser_free($xmlrpc_message->_parser);
+
+  // Grab the error messages, if any.
+  $xmlrpc_message = xmlrpc_message_get();
+  if (!isset($xmlrpc_message->messagetype)) {
+    return FALSE;
+  }
+  elseif ($xmlrpc_message->messagetype == 'fault') {
+    $xmlrpc_message->fault_code = $xmlrpc_message->params[0]['faultCode'];
+    $xmlrpc_message->fault_string = $xmlrpc_message->params[0]['faultString'];
+  }
+  return TRUE;
+}
+
+/**
+ * Stores a copy of the most recent XML-RPC message object temporarily.
+ *
+ * @param $value
+ *   An XML-RPC message to store, or NULL to keep the last message.
+ *
+ * @return object
+ *   The most recently stored message.
+ *
+ * @see xmlrpc_message_get()
+ */
+function xmlrpc_message_set($value = NULL) {
+  static $xmlrpc_message;
+  if ($value) {
+    $xmlrpc_message = $value;
+  }
+  return $xmlrpc_message;
+}
+
+/**
+ * Returns the most recently stored XML-RPC message object.
+ *
+ * @return object
+ *   The most recently stored message.
+ *
+ * @see xmlrpc_message_set()
+ */
+function xmlrpc_message_get() {
+  return xmlrpc_message_set();
+}
+
+/**
+ * Handles opening tags for XML parsing in xmlrpc_message_parse().
+ */
+function xmlrpc_message_tag_open($parser, $tag, $attr) {
+  $xmlrpc_message = xmlrpc_message_get();
+  $xmlrpc_message->current_tag_contents = '';
+  $xmlrpc_message->last_open = $tag;
+  switch ($tag) {
+    case 'methodCall':
+    case 'methodResponse':
+    case 'fault':
+      $xmlrpc_message->messagetype = $tag;
+      break;
+
+    // Deal with stacks of arrays and structs
+    case 'data':
+      $xmlrpc_message->array_structs_types[] = 'array';
+      $xmlrpc_message->array_structs[] = array();
+      break;
+
+    case 'struct':
+      $xmlrpc_message->array_structs_types[] = 'struct';
+      $xmlrpc_message->array_structs[] = array();
+      break;
+  }
+  xmlrpc_message_set($xmlrpc_message);
+}
+
+/**
+ * Handles character data for XML parsing in xmlrpc_message_parse().
+ */
+function xmlrpc_message_cdata($parser, $cdata) {
+  $xmlrpc_message = xmlrpc_message_get();
+  $xmlrpc_message->current_tag_contents .= $cdata;
+  xmlrpc_message_set($xmlrpc_message);
+}
+
+/**
+ * Handles closing tags for XML parsing in xmlrpc_message_parse().
+ */
+function xmlrpc_message_tag_close($parser, $tag) {
+  $xmlrpc_message = xmlrpc_message_get();
+  $value_flag = FALSE;
+  switch ($tag) {
+    case 'int':
+    case 'i4':
+      $value = (int)trim($xmlrpc_message->current_tag_contents);
+      $value_flag = TRUE;
+      break;
+
+    case 'double':
+      $value = (double)trim($xmlrpc_message->current_tag_contents);
+      $value_flag = TRUE;
+      break;
+
+    case 'string':
+      $value = $xmlrpc_message->current_tag_contents;
+      $value_flag = TRUE;
+      break;
+
+    case 'dateTime.iso8601':
+      $value = xmlrpc_date(trim($xmlrpc_message->current_tag_contents));
+      // $value = $iso->getTimestamp();
+      $value_flag = TRUE;
+      break;
+
+    case 'value':
+      // If no type is indicated, the type is string
+      // We take special care for empty values
+      if (trim($xmlrpc_message->current_tag_contents) != '' || (isset($xmlrpc_message->last_open) && ($xmlrpc_message->last_open == 'value'))) {
+        $value = (string) $xmlrpc_message->current_tag_contents;
+        $value_flag = TRUE;
+      }
+      unset($xmlrpc_message->last_open);
+      break;
+
+    case 'boolean':
+      $value = (boolean)trim($xmlrpc_message->current_tag_contents);
+      $value_flag = TRUE;
+      break;
+
+    case 'base64':
+      $value = base64_decode(trim($xmlrpc_message->current_tag_contents));
+      $value_flag = TRUE;
+      break;
+
+    // Deal with stacks of arrays and structs
+    case 'data':
+    case 'struct':
+      $value = array_pop($xmlrpc_message->array_structs);
+      array_pop($xmlrpc_message->array_structs_types);
+      $value_flag = TRUE;
+      break;
+
+    case 'member':
+      array_pop($xmlrpc_message->current_struct_name);
+      break;
+
+    case 'name':
+      $xmlrpc_message->current_struct_name[] = trim($xmlrpc_message->current_tag_contents);
+      break;
+
+    case 'methodName':
+      $xmlrpc_message->methodname = trim($xmlrpc_message->current_tag_contents);
+      break;
+  }
+  if ($value_flag) {
+    if (count($xmlrpc_message->array_structs) > 0) {
+      // Add value to struct or array
+      if ($xmlrpc_message->array_structs_types[count($xmlrpc_message->array_structs_types) - 1] == 'struct') {
+        // Add to struct
+        $xmlrpc_message->array_structs[count($xmlrpc_message->array_structs) - 1][$xmlrpc_message->current_struct_name[count($xmlrpc_message->current_struct_name) - 1]] = $value;
+      }
+      else {
+        // Add to array
+        $xmlrpc_message->array_structs[count($xmlrpc_message->array_structs) - 1][] = $value;
+      }
+    }
+    else {
+      // Just add as a parameter
+      $xmlrpc_message->params[] = $value;
+    }
+  }
+  if (!in_array($tag, array("data", "struct", "member"))) {
+    $xmlrpc_message->current_tag_contents = '';
+  }
+  xmlrpc_message_set($xmlrpc_message);
+}
+
+/**
+ * Constructs an object representing an XML-RPC request.
+ *
+ * @param $method
+ *   The name of the method to be called.
+ * @param $args
+ *   An array of parameters to send with the method.
+ *
+ * @return object
+ *   An XML-RPC object representing the request.
+ */
+function xmlrpc_request($method, $args) {
+  $xmlrpc_request = new stdClass();
+  $xmlrpc_request->method = $method;
+  $xmlrpc_request->args = $args;
+  $xmlrpc_request->xml = <<<EOD
+<?xml version="1.0"?>
+<methodCall>
+<methodName>{$xmlrpc_request->method}</methodName>
+<params>
+
+EOD;
+  foreach ($xmlrpc_request->args as $arg) {
+    $xmlrpc_request->xml .= '<param><value>';
+    $v = xmlrpc_value($arg);
+    $xmlrpc_request->xml .= xmlrpc_value_get_xml($v);
+    $xmlrpc_request->xml .= "</value></param>\n";
+  }
+  $xmlrpc_request->xml .= '</params></methodCall>';
+  return $xmlrpc_request;
+}
+
+/**
+ * Generates, temporarily saves, and returns an XML-RPC error object.
+ *
+ * @param $code
+ *   The error code.
+ * @param $message
+ *   The error message.
+ * @param $reset
+ *   TRUE to empty the temporary error storage. Ignored if $code is supplied.
+ *
+ * @return object
+ *   An XML-RPC error object representing $code and $message, or the most
+ *   recently stored error object if omitted.
+ */
+function xmlrpc_error($code = NULL, $message = NULL, $reset = FALSE) {
+  static $xmlrpc_error;
+  if (isset($code)) {
+    $xmlrpc_error = new stdClass();
+    $xmlrpc_error->is_error = TRUE;
+    $xmlrpc_error->code = $code;
+    $xmlrpc_error->message = $message;
+  }
+  elseif ($reset) {
+    $xmlrpc_error = NULL;
+  }
+  return $xmlrpc_error;
+}
+
+/**
+ * Converts an XML-RPC error object into XML.
+ *
+ * @param $xmlrpc_error
+ *   The XML-RPC error object.
+ *
+ * @return string
+ *   An XML representation of the error as an XML methodResponse.
+ */
+function xmlrpc_error_get_xml($xmlrpc_error) {
+  return <<<EOD
+<methodResponse>
+  <fault>
+  <value>
+    <struct>
+    <member>
+      <name>faultCode</name>
+      <value><int>{$xmlrpc_error->code}</int></value>
+    </member>
+    <member>
+      <name>faultString</name>
+      <value><string>{$xmlrpc_error->message}</string></value>
+    </member>
+    </struct>
+  </value>
+  </fault>
+</methodResponse>
+
+EOD;
+}
+
+/**
+ * Converts a PHP or ISO date/time to an XML-RPC object.
+ *
+ * @param $time
+ *   A PHP timestamp or an ISO date-time string.
+ *
+ * @return object
+ *   An XML-RPC time/date object.
+ */
+function xmlrpc_date($time) {
+  $xmlrpc_date = new stdClass();
+  $xmlrpc_date->is_date = TRUE;
+  // $time can be a PHP timestamp or an ISO one
+  if (is_numeric($time)) {
+    $xmlrpc_date->year = gmdate('Y', $time);
+    $xmlrpc_date->month = gmdate('m', $time);
+    $xmlrpc_date->day = gmdate('d', $time);
+    $xmlrpc_date->hour = gmdate('H', $time);
+    $xmlrpc_date->minute = gmdate('i', $time);
+    $xmlrpc_date->second = gmdate('s', $time);
+    $xmlrpc_date->iso8601 = gmdate('Ymd\TH:i:s', $time);
+  }
+  else {
+    $xmlrpc_date->iso8601 = $time;
+    $time = str_replace(array('-', ':'), '', $time);
+    $xmlrpc_date->year = substr($time, 0, 4);
+    $xmlrpc_date->month = substr($time, 4, 2);
+    $xmlrpc_date->day = substr($time, 6, 2);
+    $xmlrpc_date->hour = substr($time, 9, 2);
+    $xmlrpc_date->minute = substr($time, 11, 2);
+    $xmlrpc_date->second = substr($time, 13, 2);
+  }
+  return $xmlrpc_date;
+}
+
+/**
+ * Converts an XML-RPC date-time object into XML.
+ *
+ * @param $xmlrpc_date
+ *   The XML-RPC date-time object.
+ *
+ * @return string
+ *   An XML representation of the date/time as XML.
+ */
+function xmlrpc_date_get_xml($xmlrpc_date) {
+  return '<dateTime.iso8601>' . $xmlrpc_date->year . $xmlrpc_date->month . $xmlrpc_date->day . 'T' . $xmlrpc_date->hour . ':' . $xmlrpc_date->minute . ':' . $xmlrpc_date->second . '</dateTime.iso8601>';
+}
+
+/**
+ * Returns an XML-RPC base 64 object.
+ *
+ * @param $data
+ *   Base 64 data to store in returned object.
+ *
+ * @return object
+ *   An XML-RPC base 64 object.
+ */
+function xmlrpc_base64($data) {
+  $xmlrpc_base64 = new stdClass();
+  $xmlrpc_base64->is_base64 = TRUE;
+  $xmlrpc_base64->data = $data;
+  return $xmlrpc_base64;
+}
+
+/**
+ * Converts an XML-RPC base 64 object into XML.
+ *
+ * @param $xmlrpc_base64
+ *   The XML-RPC base 64 object.
+ *
+ * @return string
+ *   An XML representation of the base 64 data as XML.
+ */
+function xmlrpc_base64_get_xml($xmlrpc_base64) {
+  return '<base64>' . base64_encode($xmlrpc_base64->data) . '</base64>';
+}
+
+/**
+ * Performs one or more XML-RPC requests.
+ *
+ * @param $url
+ *   An absolute URL of the XML-RPC endpoint, e.g.,
+ *   http://example.com/xmlrpc.php
+ * @param $args
+ *   An associative array whose keys are the methods to call and whose values
+ *   are the arguments to pass to the respective method. If multiple methods
+ *   are specified, a system.multicall is performed.
+ * @param $options
+ *   (optional) An array of options to pass along to drupal_http_request().
+ *
+ * @return
+ *   A single response (single request) or an array of responses (multicall
+ *   request). Each response is the return value of the method, just as if it
+ *   has been a local function call, on success, or FALSE on failure. If FALSE
+ *   is returned, see xmlrpc_errno() and xmlrpc_error_msg() to get more
+ *   information.
+ */
+function _xmlrpc($url, $args, $options = array()) {
+  xmlrpc_clear_error();
+  if (count($args) > 1) {
+    $multicall_args = array();
+    foreach ($args as $method => $call) {
+      $multicall_args[] = array('methodName' => $method, 'params' => $call);
+    }
+    $method = 'system.multicall';
+    $args = array($multicall_args);
+  }
+  else {
+    $method = key($args);
+    $args = $args[$method];
+  }
+  $xmlrpc_request = xmlrpc_request($method, $args);
+  // Required options which will replace any that are passed in.
+  $options['method'] = 'POST';
+  $options['headers']['Content-Type'] = 'text/xml';
+  $options['data'] = $xmlrpc_request->xml;
+  $result = drupal_http_request($url, $options);
+  if ($result->code != 200) {
+    xmlrpc_error($result->code, $result->error);
+    return FALSE;
+  }
+  $message = xmlrpc_message($result->data);
+  // Now parse what we've got back
+  if (!xmlrpc_message_parse($message)) {
+    // XML error
+    xmlrpc_error(-32700, t('Parse error. Not well formed'));
+    return FALSE;
+  }
+  // Is the message a fault?
+  if ($message->messagetype == 'fault') {
+    xmlrpc_error($message->fault_code, $message->fault_string);
+    return FALSE;
+  }
+  // We now know that the message is well-formed and a non-fault result.
+  if ($method == 'system.multicall') {
+    // Return per-method results or error objects.
+    $return = array();
+    foreach ($message->params[0] as $result) {
+      if (array_keys($result) == array(0)) {
+        $return[] = $result[0];
+      }
+      else {
+        $return[] = xmlrpc_error($result['faultCode'], $result['faultString']);
+      }
+    }
+  }
+  else {
+    $return = $message->params[0];
+  }
+  return $return;
+}
+
+/**
+ * Returns the last XML-RPC client error number.
+ */
+function xmlrpc_errno() {
+  $error = xmlrpc_error();
+  return ($error != NULL ? $error->code : NULL);
+}
+
+/**
+ * Returns the last XML-RPC client error message.
+ */
+function xmlrpc_error_msg() {
+  $error = xmlrpc_error();
+  return ($error != NULL ? $error->message : NULL);
+}
+
+/**
+ * Clears any previously-saved errors.
+ *
+ * @see xmlrpc_error()
+ */
+function xmlrpc_clear_error() {
+  xmlrpc_error(NULL, NULL, TRUE);
+}
+
diff --git a/modules/xmlrpc/xmlrpc.info b/modules/xmlrpc/xmlrpc.info
new file mode 100644
index 0000000..d65f811
--- /dev/null
+++ b/modules/xmlrpc/xmlrpc.info
@@ -0,0 +1,5 @@
+name = XML-RPC 
+description = Provides XML-RPC functionality.
+package = Core
+version = VERSION
+core = 8.x
diff --git a/modules/xmlrpc/xmlrpc.module b/modules/xmlrpc/xmlrpc.module
new file mode 100644
index 0000000..8d008de
--- /dev/null
+++ b/modules/xmlrpc/xmlrpc.module
@@ -0,0 +1,54 @@
+<?php
+
+/**
+ * @file
+ * Enables XML-RPC functionality.
+ */
+
+/**
+ * Implements hook_menu().
+ */
+function xmlrpc_menu() {
+  $items['xmlrpc.php'] = array(
+    'title' => 'XML-RPC',
+    'page callback' => 'xmlrpc_server_page',
+    'access callback' => TRUE,
+    'type' => MENU_SUGGESTED_ITEM,
+    'file' => 'xmlrpc.pages.inc',
+  );
+  return $items;
+}
+
+/**
+ * Performs one or more XML-RPC request(s).
+ *
+ * Usage example:
+ * @code
+ * $result = xmlrpc('http://example.com/xmlrpc.php', array(
+ *   'service.methodName' => array($parameter, $second, $third),
+ * ));
+ * @endcode
+ *
+ * @param $url
+ *   An absolute URL of the XML-RPC endpoint.
+ * @param $args
+ *   An associative array whose keys are the methods to call and whose values
+ *   are the arguments to pass to the respective method. If multiple methods
+ *   are specified, a system.multicall is performed.
+ * @param $options
+ *   (optional) An array of options to pass along to drupal_http_request().
+ *
+ * @return
+ *   For one request:
+ *     Either the return value of the method on success, or FALSE.
+ *     If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
+ *   For multiple requests:
+ *     An array of results. Each result will either be the result
+ *     returned by the method called, or an xmlrpc_error object if the call
+ *     failed. See xmlrpc_error().
+ */
+function xmlrpc($url, $args, $options = array()) {
+  require_once DRUPAL_ROOT . 'modules/xmlprc/xmlrpc.inc';
+  return _xmlrpc($url, $args, $options);
+}
+
diff --git a/modules/xmlrpc/xmlrpc.pages.inc b/modules/xmlrpc/xmlrpc.pages.inc
new file mode 100644
index 0000000..e7c3155
--- /dev/null
+++ b/modules/xmlrpc/xmlrpc.pages.inc
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * @file
+ * Page callback file for the xmlrpc module.
+ */
+
+/**
+ * Process an XML-RPC request.
+ */
+function xmlrpc_server_page() {
+  module_load_include('inc', 'xmlrpc', 'xmlrpcs');
+  xmlrpc_server(module_invoke_all('xmlrpc'));
+}
diff --git a/modules/xmlrpc/xmlrpcs.inc b/modules/xmlrpc/xmlrpcs.inc
new file mode 100644
index 0000000..54a25f8
--- /dev/null
+++ b/modules/xmlrpc/xmlrpcs.inc
@@ -0,0 +1,385 @@
+<?php
+
+/**
+ * @file
+ * Provides API for defining and handling XML-RPC requests.
+ */
+
+/**
+ * Invokes XML-RPC methods on this server.
+ *
+ * @param array $callbacks
+ *   Array of external XML-RPC method names with the callbacks they map to.
+ */
+function xmlrpc_server($callbacks) {
+  $xmlrpc_server = new stdClass();
+  // Define built-in XML-RPC method names
+  $defaults = array(
+    'system.multicall' => 'xmlrpc_server_multicall',
+    array(
+      'system.methodSignature',
+      'xmlrpc_server_method_signature',
+      array('array', 'string'),
+      'Returns an array describing the return type and required parameters of a method.',
+    ),
+    array(
+      'system.getCapabilities',
+      'xmlrpc_server_get_capabilities',
+      array('struct'),
+      'Returns a struct describing the XML-RPC specifications supported by this server.',
+    ),
+    array(
+      'system.listMethods',
+      'xmlrpc_server_list_methods',
+      array('array'),
+      'Returns an array of available methods on this server.',
+    ),
+    array(
+      'system.methodHelp',
+      'xmlrpc_server_method_help',
+      array('string', 'string'),
+      'Returns a documentation string for the specified method.',
+    ),
+  );
+  // We build an array of all method names by combining the built-ins
+  // with those defined by modules implementing the _xmlrpc hook.
+  // Built-in methods are overridable.
+  $callbacks = array_merge($defaults, (array) $callbacks);
+  drupal_alter('xmlrpc', $callbacks);
+  foreach ($callbacks as $key => $callback) {
+    // we could check for is_array($callback)
+    if (is_int($key)) {
+      $method = $callback[0];
+      $xmlrpc_server->callbacks[$method] = $callback[1];
+      $xmlrpc_server->signatures[$method] = $callback[2];
+      $xmlrpc_server->help[$method] = $callback[3];
+    }
+    else {
+      $xmlrpc_server->callbacks[$key] = $callback;
+      $xmlrpc_server->signatures[$key] = '';
+      $xmlrpc_server->help[$key] = '';
+    }
+  }
+
+  $data = file_get_contents('php://input');
+  if (!$data) {
+    print 'XML-RPC server accepts POST requests only.';
+    drupal_exit();
+  }
+  $xmlrpc_server->message = xmlrpc_message($data);
+  if (!xmlrpc_message_parse($xmlrpc_server->message)) {
+    xmlrpc_server_error(-32700, t('Parse error. Request not well formed.'));
+  }
+  if ($xmlrpc_server->message->messagetype != 'methodCall') {
+    xmlrpc_server_error(-32600, t('Server error. Invalid XML-RPC. Request must be a methodCall.'));
+  }
+  if (!isset($xmlrpc_server->message->params)) {
+    $xmlrpc_server->message->params = array();
+  }
+  xmlrpc_server_set($xmlrpc_server);
+  $result = xmlrpc_server_call($xmlrpc_server, $xmlrpc_server->message->methodname, $xmlrpc_server->message->params);
+
+  if (is_object($result) && !empty($result->is_error)) {
+    xmlrpc_server_error($result);
+  }
+  // Encode the result
+  $r = xmlrpc_value($result);
+  // Create the XML
+  $xml = '
+<methodResponse>
+  <params>
+  <param>
+    <value>' . xmlrpc_value_get_xml($r) . '</value>
+  </param>
+  </params>
+</methodResponse>
+
+';
+  // Send it
+  xmlrpc_server_output($xml);
+}
+
+/**
+ * Throws an XML-RPC error.
+ *
+ * @param $error
+ *   An error object or integer error code.
+ * @param $message
+ *   (optional) The description of the error. Used only if an integer error
+ *   code was passed in.
+ */
+function xmlrpc_server_error($error, $message = FALSE) {
+  if ($message && !is_object($error)) {
+    $error = xmlrpc_error($error, $message);
+  }
+  xmlrpc_server_output(xmlrpc_error_get_xml($error));
+}
+
+/**
+ * Sends XML-RPC output to the browser.
+ *
+ * @param string $xml
+ *   XML to send to the browser.
+ */
+function xmlrpc_server_output($xml) {
+  $xml = '<?xml version="1.0"?>' . "\n" . $xml;
+  drupal_add_http_header('Content-Length', strlen($xml));
+  drupal_add_http_header('Content-Type', 'text/xml');
+  echo $xml;
+  drupal_exit();
+}
+
+/**
+ * Stores a copy of an XML-RPC request temporarily.
+ *
+ * @param object $xmlrpc_server
+ *   (optional) Request object created by xmlrpc_server(). Omit to leave the
+ *   previous server object saved.
+ *
+ * @return
+ *   The latest stored request.
+ *
+ * @see xmlrpc_server_get()
+ */
+function xmlrpc_server_set($xmlrpc_server = NULL) {
+  static $server;
+  if (!isset($server)) {
+    $server = $xmlrpc_server;
+  }
+  return $server;
+}
+
+/**
+ * Retrieves the latest stored XML-RPC request.
+ *
+ * @return object
+ *   The stored request.
+ *
+ * @see xmlrpc_server_set()
+ */
+function xmlrpc_server_get() {
+  return xmlrpc_server_set();
+}
+
+/**
+ * Dispatches an XML-RPC request and any parameters to the appropriate handler.
+ *
+ * @param object $xmlrpc_server
+ *   Object containing information about this XML-RPC server, the methods it
+ *   provides, their signatures, etc.
+ * @param string $methodname
+ *   The external XML-RPC method name; e.g., 'system.methodHelp'.
+ * @param array $args
+ *   Array containing any parameters that are to be sent along with the request.
+ *
+ * @return
+ *   The results of the call.
+ */
+function xmlrpc_server_call($xmlrpc_server, $methodname, $args) {
+  // Make sure parameters are in an array
+  if ($args && !is_array($args)) {
+    $args = array($args);
+  }
+  // Has this method been mapped to a Drupal function by us or by modules?
+  if (!isset($xmlrpc_server->callbacks[$methodname])) {
+    return xmlrpc_error(-32601, t('Server error. Requested method @methodname not specified.', array("@methodname" => $xmlrpc_server->message->methodname)));
+  }
+  $method = $xmlrpc_server->callbacks[$methodname];
+  $signature = $xmlrpc_server->signatures[$methodname];
+
+  // If the method has a signature, validate the request against the signature
+  if (is_array($signature)) {
+    $ok = TRUE;
+    $return_type = array_shift($signature);
+    // Check the number of arguments
+    if (count($args) != count($signature)) {
+      return xmlrpc_error(-32602, t('Server error. Wrong number of method parameters.'));
+    }
+    // Check the argument types
+    foreach ($signature as $key => $type) {
+      $arg = $args[$key];
+      switch ($type) {
+        case 'int':
+        case 'i4':
+          if (is_array($arg) || !is_int($arg)) {
+            $ok = FALSE;
+          }
+          break;
+
+        case 'base64':
+        case 'string':
+          if (!is_string($arg)) {
+            $ok = FALSE;
+          }
+          break;
+
+        case 'boolean':
+          if ($arg !== FALSE && $arg !== TRUE) {
+            $ok = FALSE;
+          }
+          break;
+
+        case 'float':
+        case 'double':
+          if (!is_float($arg)) {
+            $ok = FALSE;
+          }
+          break;
+
+        case 'date':
+        case 'dateTime.iso8601':
+          if (!$arg->is_date) {
+            $ok = FALSE;
+          }
+          break;
+      }
+      if (!$ok) {
+        return xmlrpc_error(-32602, t('Server error. Invalid method parameters.'));
+      }
+    }
+  }
+
+  if (!function_exists($method)) {
+    return xmlrpc_error(-32601, t('Server error. Requested function @method does not exist.', array("@method" => $method)));
+  }
+  // Call the mapped function
+  return call_user_func_array($method, $args);
+}
+
+/**
+ * Dispatches multiple XML-RPC requests.
+ *
+ * @param array $methodcalls
+ *   An array of XML-RPC requests to make. Each request is an array with the
+ *   following elements:
+ *   - methodName: Name of the method to invoke.
+ *   - params: Parameters to pass to the method.
+ *
+ * @return
+ *   An array of the results of each request.
+ *
+ * @see xmlrpc_server_call()
+ */
+function xmlrpc_server_multicall($methodcalls) {
+  // See http://www.xmlrpc.com/discuss/msgReader$1208
+  $return = array();
+  $xmlrpc_server = xmlrpc_server_get();
+  foreach ($methodcalls as $call) {
+    $ok = TRUE;
+    if (!isset($call['methodName']) || !isset($call['params'])) {
+      $result = xmlrpc_error(3, t('Invalid syntax for system.multicall.'));
+      $ok = FALSE;
+    }
+    $method = $call['methodName'];
+    $params = $call['params'];
+    if ($method == 'system.multicall') {
+      $result = xmlrpc_error(-32600, t('Recursive calls to system.multicall are forbidden.'));
+    }
+    elseif ($ok) {
+      $result = xmlrpc_server_call($xmlrpc_server, $method, $params);
+    }
+    if (is_object($result) && !empty($result->is_error)) {
+      $return[] = array(
+        'faultCode' => $result->code,
+        'faultString' => $result->message,
+      );
+    }
+    else {
+      $return[] = array($result);
+    }
+  }
+  return $return;
+}
+
+/**
+ * Lists the methods available on this XML-RPC server.
+ *
+ * XML-RPC method system.listMethods maps to this function.
+ *
+ * @return array
+ *   Array of the names of methods available on this server.
+ */
+function xmlrpc_server_list_methods() {
+  $xmlrpc_server = xmlrpc_server_get();
+  return array_keys($xmlrpc_server->callbacks);
+}
+
+/**
+ * Returns a list of the capabilities of this server.
+ *
+ * XML-RPC method system.getCapabilities maps to this function.
+ *
+ * @return array
+ *   Array of server capabilities.
+ *
+ * @see http://groups.yahoo.com/group/xml-rpc/message/2897
+ */
+function xmlrpc_server_get_capabilities() {
+  return array(
+    'xmlrpc' => array(
+      'specUrl' => 'http://www.xmlrpc.com/spec',
+      'specVersion' => 1,
+    ),
+    'faults_interop' => array(
+      'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php',
+      'specVersion' => 20010516,
+    ),
+    'system.multicall' => array(
+      'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',
+      'specVersion' => 1,
+    ),
+    'introspection' => array(
+      'specUrl' => 'http://scripts.incutio.com/xmlrpc/introspection.html',
+      'specVersion' => 1,
+    ),
+  );
+}
+
+/**
+ * Returns the method signature of a function.
+ *
+ * This is the function mapped to the XML-RPC method system.methodSignature.
+ *
+ * A method signature is an array of the input and output types of a method. For
+ * instance, the method signature of this function is array('array', 'string'),
+ * because it takes an array and returns a string.
+ *
+ * @param string $methodname
+ *   Name of method to return a method signature for.
+ *
+ * @return array
+ *   An array of types representing the method signature of the function that
+ *   $methodname maps to.
+ */
+function xmlrpc_server_method_signature($methodname) {
+  $xmlrpc_server = xmlrpc_server_get();
+  if (!isset($xmlrpc_server->callbacks[$methodname])) {
+    return xmlrpc_error(-32601, t('Server error. Requested method @methodname not specified.', array("@methodname" => $methodname)));
+  }
+  if (!is_array($xmlrpc_server->signatures[$methodname])) {
+    return xmlrpc_error(-32601, t('Server error. Requested method @methodname signature not specified.', array("@methodname" => $methodname)));
+  }
+  // We array of types
+  $return = array();
+  foreach ($xmlrpc_server->signatures[$methodname] as $type) {
+    $return[] = $type;
+  }
+  return $return;
+}
+
+/**
+ * Returns the help for an XML-RPC method.
+ *
+ * XML-RPC method system.methodHelp maps to this function.
+ *
+ * @param string $method
+ *   Name of method for which we return a help string.
+ *
+ * @return string
+ *   Help text for $method.
+ */
+function xmlrpc_server_method_help($method) {
+  $xmlrpc_server = xmlrpc_server_get();
+  return $xmlrpc_server->help[$method];
+}
+
diff --git a/xmlrpc.php b/xmlrpc.php
deleted file mode 100644
index b202dc2..0000000
--- a/xmlrpc.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-/**
- * @file
- * PHP page for handling incoming XML-RPC requests from clients.
- */
-
-/**
- * Root directory of Drupal installation.
- */
-define('DRUPAL_ROOT', getcwd());
-
-include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
-drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
-include_once DRUPAL_ROOT . '/includes/xmlrpc.inc';
-include_once DRUPAL_ROOT . '/includes/xmlrpcs.inc';
-
-xmlrpc_server(module_invoke_all('xmlrpc'));
