Пример #1
0
    def __call__(self, request):
        django_response = HttpResponse()

        def start_response(status, headers):
            status, reason = status.split(' ', 1)
            django_response.status_code = int(status)
            for header, value in headers:
                django_response[header] = value

        environ = request.META.copy()
        body = ''.join(['%s=%s' % v for v in request.POST.items()])
        environ['CONTENT_LENGTH'] = len(body)
        environ['wsgi.input'] = DumbStringIO(body)
        environ['wsgi.multithread'] = False
       
        response = SimpleWSGISoapApp.__call__(self, environ, start_response)
        django_response.content = "\n".join(response)

        return django_response
Пример #2
0
 def __call__(self, environ, start_response):
     return SimpleWSGISoapApp.__call__(self, environ, start_response)