在家一直登不上网站,还以为一直被攻击中,在公司试下就登录成功了,果然还是只有家里登不上。
from spyne import Application, rpc, ServiceBase, String
from spyne.protocol.soap import Soap11
class Hello(ServiceBase):
@rpc(String, _returns=String)
def world(self, string):
return string
application = Application([Hello],
tns='http://namespace/',
in_protocol=Soap11(),
out_protocol=Soap11())
if __name__ == '__main__':
from spyne.server.wsgi import WsgiApplication
from wsgiref.simple_server import make_server
wsgi_application = WsgiApplication(application)
server = make_server('127.0.0.1', 8080, wsgi_application)
server.serve_forever()
http://127.0.0.1:8080/?wsdl