Invokes a single request against a handler using _call() and traps any errors,
        formatting them using _err().  If the request is successful it is wrapped in a 
        JSON-RPC 2.0 compliant dict with keys: 'jsonrpc', 'id', 'result'.

        :Parameters:
          req
            A single dict representing a single JSON-RPC request
          props
            Application defined properties to set on RequestContext for use with filters. 
            For example: authentication headers.  Must be a dict.

def _call_and_format(self, req, props=None):
        """
        Invokes a single request against a handler using _call() and traps any errors,
        formatting them using _err().  If the request is successful it is wrapped in a 
        JSON-RPC 2.0 compliant dict with keys: 'jsonrpc', 'id', 'result'.

        :Parameters:
          req
            A single dict representing a single JSON-RPC request
          props
            Application defined properties to set on RequestContext for use with filters. 
            For example: authentication headers.  Must be a dict.
        """
        if not isinstance(req, dict):
            return err_response(None, ERR_INVALID_REQ, 
                             "Invalid Request. %s is not an object." % str(req))

        reqid = None
        if req.has_key("id"):
            reqid = req["id"]

        if props == None:
            props = { }
        context = RequestContext(props, req)

        if self.filters:
            for f in self.filters:
                f.pre(context)

        if context.error:
            return context.error

        resp = None
        try:
            result = self._call(context)
            resp = { "jsonrpc": "2.0", "id": reqid, "result": result }
        except RpcException, e:
            resp = err_response(reqid, e.code, e.msg, e.data)
        except:
            self.log.exception("Error processing request: %s" % str(req))
            resp = err_response(reqid, ERR_UNKNOWN, "Server error. Check logs for details.")
        
        if self.filters:
            context.response = resp
            for f in self.filters:
                f.post(context)

        return resp