コード例 #1
0
ファイル: wsgi.py プロジェクト: KetothXupack/spyne
    def __init__(self, app, chunked=True,
                max_content_length=2 * 1024 * 1024,
                block_length=8 * 1024):
        HttpBase.__init__(self, app, chunked, max_content_length, block_length)

        self._mtx_build_interface_document = threading.Lock()
        self._wsdl = self.doc.wsdl11.get_interface_document()

        # Initialize HTTP Patterns
        self._http_patterns = None
        self._map_adapter = None
        self._mtx_build_map_adapter = threading.Lock()

        for k,v in self.app.interface.service_method_map.items():
            # p_ stands for primary
            p_service_class, p_method_descriptor = v[0]
            for patt in p_method_descriptor.patterns:
                if isinstance(patt, HttpPattern):
                    # We are doing this here because we want to import Werkzeug
                    # as late as possible.
                    if self._http_patterns is None:
                        from werkzeug.routing import Map
                        self._http_patterns = Map(host_matching=True)

                    for r in patt.as_werkzeug_rules():
                        self._http_patterns.add(r)
コード例 #2
0
ファイル: wsgi.py プロジェクト: mangroovie/spyne
    def __init__(self, app, chunked=True):
        HttpBase.__init__(self, app, chunked)

        self._allowed_http_verbs = app.in_protocol.allowed_http_verbs
        self._verb_handlers = {
            "GET": self.handle_rpc,
            "POST": self.handle_rpc,
        }
        self._mtx_build_interface_document = threading.Lock()
        self._wsdl = None

        # Initialize HTTP Patterns
        self._http_patterns = None
        self._map_adapter = None
        self._mtx_build_map_adapter = threading.Lock()

        for k, v in self.app.interface.service_method_map.items():
            p_service_class, p_method_descriptor = v[0]
            for p in p_method_descriptor.patterns:
                if isinstance(p, HttpPattern):
                    r = p.as_werkzeug_rule()

                    # We do this here because we don't want to import
                    # Werkzeug until the last moment.
                    if self._http_patterns is None:
                        from werkzeug.routing import Map
                        self._http_patterns = Map()

                    self._http_patterns.add(r)
コード例 #3
0
ファイル: wsgi.py プロジェクト: mfkaptan/spyne
    def __init__(self, app, chunked=True,
                max_content_length=2 * 1024 * 1024,
                block_length=8 * 1024):
        HttpBase.__init__(self, app, chunked, max_content_length, block_length)

        self._allowed_http_verbs = app.in_protocol.allowed_http_verbs
        self._verb_handlers = {
            "GET": self.handle_rpc,
            "POST": self.handle_rpc,
        }
        self._mtx_build_interface_document = threading.Lock()
        self._wsdl = None

        # Initialize HTTP Patterns
        self._http_patterns = None
        self._map_adapter = None
        self._mtx_build_map_adapter = threading.Lock()

        for k,v in self.app.interface.service_method_map.items():
            # p_ stands for primary
            p_service_class, p_method_descriptor = v[0]
            for patt in p_method_descriptor.patterns:
                if isinstance(patt, HttpPattern):
                    r = patt.as_werkzeug_rule()

                    # We are doing this here because we want to import Werkzeug
                    # as late as possible.
                    if self._http_patterns is None:
                        from werkzeug.routing import Map
                        self._http_patterns = Map(host_matching=True)

                    self._http_patterns.add(r)
コード例 #4
0
ファイル: wsgi.py プロジェクト: xevo/spyne
    def __init__(self, app, chunked=True):
        HttpBase.__init__(self, app, chunked)

        self._allowed_http_verbs = app.in_protocol.allowed_http_verbs
        self._verb_handlers = {
            "GET": self.handle_rpc,
            "POST": self.handle_rpc,
        }
        self._mtx_build_interface_document = threading.Lock()
        self._wsdl = None

        # Initialize HTTP Patterns
        self._http_patterns = None
        self._map_adapter = None
        self._mtx_build_map_adapter = threading.Lock()

        for k,v in self.app.interface.service_method_map.items():
            p_service_class, p_method_descriptor = v[0]
            for p in p_method_descriptor.patterns:
                if isinstance(p, HttpPattern):
                    r = p.as_werkzeug_rule()

                    # We do this here because we don't want to import
                    # Werkzeug until the last moment.
                    if self._http_patterns is None:
                        from werkzeug.routing import Map
                        self._http_patterns = Map()

                    self._http_patterns.add(r)
コード例 #5
0
ファイル: wsgi.py プロジェクト: Juspeczyk/spyne
    def __init__(self, app, chunked=True):
        HttpBase.__init__(self, app, chunked)

        self._allowed_http_verbs = app.in_protocol.allowed_http_verbs
        self._verb_handlers = {
            "GET": self.handle_rpc,
            "POST": self.handle_rpc,
        }
        self._mtx_build_interface_document = threading.Lock()
        self._wsdl = None
コード例 #6
0
ファイル: django.py プロジェクト: Bernie/spyne
 def __init__(self, app, chunked=False):
     HttpBase.__init__(self, app, chunked=chunked)
     self._wsdl = None