How to get method name in controller while we try Zend JSON Service call

 You can use the below code in your controller to get the method name while you try jQuery.Zend.Jsonrpc service call

if($_SERVER['REQUEST_METHOD']    ==    'POST') {
            $data     =    json_decode(urldecode($this->getRequest()->getRawBody()));
            echo $data->method;
}

jQuery.Zend.jsonrpc returns error 'not a function' with cross domain request

There is a chance to retun 'not a function' error in console while we try the remote url.
 You can fix that with the following changes

  1. Use the latest jquery file
  2. Remove the 'content-type' attribute from jquery.zend.jsonrpc.js
  3. Add the property 'crossDomain: true' in jquery.zend.jsonrpc.js with ajax request
  4. Set the header("Access-Control-Allow-Origin: *") in your server script.
 
   I have followed the below url and updated the file with above condition then it works fine.
   http://sourcecodebean.com/archives/creating-a-json-rpc-service-using-zend-json-server/422