def dispatch(self, data, **kwargs):
        """
        Extracts the xml marshaled parameters and method name and calls the
        underlying method and returns either an xml marshaled response
        or an XMLRPC fault
        
        Although very similar to the superclass' _marshaled_dispatch, this
        method has a different name due to the different parameters it takes
        from the superclass method.
        """
        
        try:
            params, method = xmlrpclib.loads(data)
            
            try:
                response = self._dispatch(method, params, **kwargs)
            except TypeError as e:
                # XXX: Hack!
                if "unexpected keyword" in "%s" % e:
                    # Catch unexpected keyword argument error
                    response = self._dispatch(method, params)
                else:
                    raise
            
            # wrap response in a singleton tuple
            response = (response,)
            response = xmlrpclib.dumps(response, methodresponse=1,
                                       allow_none=self.allow_none, 
                                       encoding=self.encoding)
        except Fault, fault:
            logger.warn("Got fault when processing method %s" % method)
            traceback.print_exc()
            response = xmlrpclib.dumps(fault, allow_none=self.allow_none,
                                       encoding=self.encoding)
        except:
            # report exception back to server
            logger.error("Got exception when processing method %s" % method)
            traceback.print_exc()
            exc_type, exc_value, exc_tb = sys.exc_info()
            exc_info = "%s:%s" % (exc_type, exc_value)
            if self.debug:
                tb = traceback.extract_tb(exc_tb)
                tb = traceback.format_list(tb)
                tb = "".join(tb)
                exc_info += ":%s" % tb
            response = xmlrpclib.dumps(
                xmlrpclib.Fault(1, exc_info),
                encoding=self.encoding, allow_none=self.allow_none,
            )

        return response
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/expedient/common/rpc4django/xmlrpcdispatcher.py/XMLRPCDispatcher.dispatch/original