Пример #1
0
 def onMethodExec(self,environ,body,py_params,soap_params):
     '''
     Called BEFORE the service implementing the functionality is called
     @param the wsgi environment
     @param the body element of the soap request
     @param the tuple of python params being passed to the method
     @param the soap elements for each params
     '''
     authheader = soap_request.header.find('Authentication')
     username = authheader.get('username')
     password = authheader.get('password')
     role = authheader.get('role')
     _authenticate(username=username, password=password, login_type=role)
     SimpleWSGISoapApp.onMethodExec(self,environ,body,py_params,soap_params)
Пример #2
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
Пример #3
0
 def __init__ (self,engine):
     SimpleWSGISoapApp.__init__ (self)
     self.pm = ProjectManager ("/var/cache/elbe")
     SimplePlugin.__init__(self,engine)
     self.subscribe()
Пример #4
0
 def __init__(self, status):
     SimpleWSGISoapApp.__init__(self)
     self.status = status
Пример #5
0
 def __init__(self, status):
     SimpleWSGISoapApp.__init__(self)
     self.status = status
Пример #6
0
 def __init__(self):
     SimpleWSGISoapApp.__init__(self)
     self.xmlmgr = xmlmgr.XMLManager()
     self.log = None
Пример #7
0
 def __call__(self, environ, start_response):
     return SimpleWSGISoapApp.__call__(self, environ, start_response)