简体   繁体   中英

Can I write a SOAP server using python suds?

I started using suds for soap clients and will never touch ZSI again.

I know suds is meant for the client side, but I would love to use it to make also the server site, in order to get rid of ZSI.

How could I use suds to parse soap requests instead of responses?

[updates]

  • If you want to expose some interface using SOAP, the best option seems to be rpclib . Flask-enterprise looks promising. Both will produce a WSDL from Python code.
  • If instead you need to write a Python SOAP webservice adhering to a WSDL produced by a third part, nothing so far beats ZSI.

To write a SOAP server in Python, you can use the micro web framework - Flask, with it's plugin - Flask-enterprise

http://massive.immersedcode.org/2011/staging/projects/default/python/flask-enterprise/

There is also a similar question here in stackoverflow:

Python soap using soaplib (server) and suds (client)

They use soaplib for providing SOAP service, as you can find the document here http://soaplib.github.com/soaplib/2_0/pages/helloworld.html

If you decided to use Flask - try new flask-spyne extension.

flask-enterprise mentioned above is a wrapper on top of discontinued soaplib , while flask-spyne is a wrapper on top of spyne - successor of soaplib .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM