Can I write a SOAP server using python suds?

Unpaid Oracles picture Unpaid Oracles · Jan 14, 2012 · Viewed 7.6k times · Source

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.

Answer

Fang-Pen Lin picture Fang-Pen Lin · Feb 29, 2012

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