--- servers/xmlrpc_server/xmlrpc_server.module	2010-02-20 21:01:19.000000000 -0600
+++ servers/xmlrpc_server/xmlrpc_server.module	2010-08-30 00:33:40.690280200 -0500
@@ -34,7 +34,12 @@
 function xmlrpc_server_xmlrpc() {
   $callbacks = array();
   foreach (services_get_all() as $method) {
-    $callbacks[$method['method']] = 'xmlrpc_server_call_wrapper';
+    $callbacks[] = array(
+      $method['method'],
+      'xmlrpc_server_call_wrapper',
+      xmlrpc_server_method_signatures($method),
+      $method['help']
+    );
   }
   return $callbacks;
 }
@@ -52,6 +57,39 @@
   return services_method_call($method_name, $args);
 }
 
+
+/**
+ * Return XMLRPC server introspection signature
+ *
+ */
+function xmlrpc_server_method_signatures($service) {
+  $result = array();
+  if(isset($service['return'])) {
+    $one_signature = array($service['return']);
+    $args = $service['args'];
+    $found_optional = FALSE;
+    foreach($args as $arg) {
+      if($arg['optional']) {
+        $found_optional = TRUE;
+        // add signature without optional arg
+        $result[] = $one_signature;
+      }
+      else if ($found_optional) {
+        // invalid to have non-optional after optional, so just stop here
+        break;
+      }
+      // append arg to signature
+      $one_signature[] = $arg['type'];
+    }
+    $result[] = $one_signature;
+  }
+  if (!$result) {
+    // introspection spec prohibits an empty array; just say we don't know
+    $result = "undef";
+  }
+  return $result;
+}
+
 /**
  * Implementation of hook_server_error().
  *
