def getResponse(self, http_request, amf_request):
        response = remoting.Envelope(amf_request.amfVersion)
        dl = []

        def cb(body, name):
            response[name] = body

        for name, message in amf_request:
            processor = self.getProcessor(message)

            http_request.amf_request = message

            d = defer.maybeDeferred(
                processor, message, http_request=http_request)

            dl.append(d.addCallback(cb, name))

        def cb2(result):
            return response

        def eb(failure):
            """
            Return 500 Internal Server Error.
            """
            errMesg = "%s: %s" % (failure.type, failure.getErrorMessage())

            if self.logger:
                self.logger.error(errMesg)
                self.logger.error(failure.getTraceback())

            body = "500 Internal Server Error\n\nThe request was unable to " \
                "be successfully processed."

            if self.debug:
                body += "\n\nTraceback:\n\n%s" % failure.getTraceback()

            self._finaliseRequest(http_request, 500, body)

        d = defer.DeferredList(dl)

        return d.addCallback(cb2).addErrback(eb)
Processes the AMF request, returning an AMF L{Response}.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/PyAMF-0.6.1/pyamf/remoting/gateway/twisted.py/TwistedGateway.getResponse