python - spyne编写soap协议的webservice,怎么样才能让接口支持多线程处理
巴扎黑
巴扎黑 2017-04-18 10:34:34
0
0
1119

我使用spyne库,编写了一个简单的soap协议是的webservice,但我的客户端使用了多线程,那服务端怎样才能支持多线程处理?请详细说明。
from spyne import Application, rpc, ServiceBase
from spyne import Integer, Unicode, Array, ComplexModel
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
from wsgiref.simple_server import make_server

class SomeSampleServices(ServiceBase):

@rpc(Unicode, Unicode _returns=Unicode)  
def make_project(self, name, version):  
    print name
    print version  

if name == "__main__":

soap_app = Application([SomeSampleServices],  
                       'SampleServices',  
                       in_protocol=Soap11(validator="lxml"),  
                       out_protocol=Soap11())  
wsgi_app = WsgiApplication(soap_app)  
server = make_server(ip, port, wsgi_app)  

sys.exit(server.serve_forever())  
巴扎黑
巴扎黑

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template