private function invokeMethod($service, JsonRpcRequest $request)
    {
        if (false === $request->isValid()) {
            /* Note: Method isn't known, so invocation hooks aren't called. */
            return new JsonRpcResponse(
                null,
                new Exception(
                    'The JSON sent is not a valid Request object',
                    self::ERR_INVALID_REQUEST
                )
            );
        }

        $action = $request->getAction();
        $this->invokePluginsHook(
            'afterServiceSelected',
            array($this, $request, $service, $action)
        );

        $this->invokePluginsHook(
            'beforeMethodInvoked',
            array($this, $request, $service, $action)
        );

        try {
            $response = new JsonRpcResponse(
                call_user_func_array(array($service, $action), $request->getParameters()),
                null,
                $request
            );
        } catch (Exception $e) {
            $error = new Exception($e->getMessage(), self::ERR_INTERNAL_ERROR);
            $response = new JsonRpcResponse(null, $error, $request);
        }

        $this->invokePluginsHook(
            'afterMethodInvoked',
            array($this, $request, $service, $action, $response)
        );

        return $response;
    }