예제 #1
0
파일: django_.py 프로젝트: Eveler/dmsic
    def django_dispatch(request):
        soap_request = SOAPRequest(DjangoEnvironWrapper(request.environ), request.body)
        soap_request._original_request = request
        soap_dispatcher = SOAPDispatcher(service, **dispatcher_kwargs)
        soap_response = soap_dispatcher.dispatch(soap_request)

        response = HttpResponse(soap_response.http_content)
        response.status_code = soap_response.http_status_code
        for k, v in soap_response.http_headers.items():
            response[k] = v
        return response
예제 #2
0
파일: flask_.py 프로젝트: Eveler/dmsic
    def flask_dispatch():
        soap_request = SOAPRequest(request.environ, request.data)
        soap_request._original_request = request
        soap_dispatcher = SOAPDispatcher(service, **dispatcher_kwargs)
        soap_response = soap_dispatcher.dispatch(soap_request)

        response = Response(soap_response.http_content)
        response.status_code = soap_response.http_status_code
        for k, v in soap_response.http_headers.items():
            response.headers[k] = v
        return response