コード例 #1
0
ファイル: soaplib_handler.py プロジェクト: esauro/SingularMS
    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
ファイル: __init__.py プロジェクト: UfSoft/ISPManCCP-V2
 def __call__(self, environ, start_response):
     return SimpleWSGISoapApp.__call__(self, environ, start_response)