当我集成“WSGISOAPHandler”时,SOAP服务器不工作。有什么想法吗? 当客户端调用服务器时,服务器返回“不能在类似字节的对象上使用字符串模式”
if __name__ == "__main__":
def ota_vehlocsearch(respuesta):
return "respuesta"
dispatcher = SoapDispatcher(
name='soap',
location = "http://localhost:8008/",
action = 'http://localhost:8008/', # SOAPAction
namespace = "http://www.opentravel.org/OTA/2003/05", prefix="ns0",
trace = True,
ns = True)
dispatcher.register_function('OTA_VehLocSearch', ota_vehlocsearch,
returns={'Result': str},
args={'call': str})
print("Starting wsgi server...")
from wsgiref.simple_server import make_server
application = WSGISOAPHandler(dispatcher)
wsgid = make_server('localhost', 8008, application)
wsgid.serve_forever()
目前没有回答
相关问题 更多 >
编程相关推荐