Generating a WSDL using Python and SOAPpy

北城余情 提交于 2019-11-28 16:54:57

When I tried to write Python web service last year, I ended up using ZSI-2.0 (which is something like heir of SOAPpy) and a paper available on its web.

Basically I wrote my WSDL file by hand and then used ZSI stuff to generate stubs for my client and server code. I wouldn't describe the experience as pleasant, but the application did work.

bhadra

I want to generate a WSDL that I can give to the web folks, ....

You can try soaplib. It has on-demand WSDL generation.

user1064941

Sorry for the question few days ago. Now I can invoke the server successfully. A demo is provided:

def test_soappy():
    """test for SOAPpy.SOAPServer
    """
    #okay
    # it's good for SOAPpy.SOAPServer.
    # in a method,it can have morn than 2 ws server.
    server = SOAPProxy("http://localhost:8081/")
    print server.sum(1,2)
    print server.div(10,2)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!