Index: JsonRpcServer.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/jsonrpc_server/JsonRpcServer.php,v
retrieving revision 1.2
diff -u -p -r1.2 JsonRpcServer.php
--- JsonRpcServer.php	19 Jan 2010 07:44:03 -0000	1.2
+++ JsonRpcServer.php	10 Mar 2010 18:10:45 -0000
@@ -148,6 +148,15 @@ class JsonRpcServer{
     
     // We are returning JSON, so tell the browser.
     drupal_set_header('Content-Type: application/json; charset=utf-8');
+    
+    // Services assumes parameter positions to match the method callback's
+    // function signature so we need to sort arguments by position (key)
+    // before passing them to the method callback. The best solution here would
+    // be to pad optional parameters using a #default key in the hook_service
+    // method definitions instead of requiring all parameters to be present, as
+    // we do now.
+    // For reference: http://drupal.org/node/715044
+    ksort($this->args);
 
     //Call service method
     try {
