5

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.
Paulo Scardine
  • 73,447
  • 11
  • 124
  • 153
Unpaid Oracles
  • 2,047
  • 2
  • 14
  • 8
  • Can you explain why you are so eager to ditch ZSI? I am thinking of creating a system based on it, and I think that knowing your rationale will help me make a better choice. – ralien Mar 14 '12 at 14:38
  • Ha, I can think of a sentence like your `...never touch...` sentence that reads as with "suds" replaced with "REST" and "ZSI" replaced with "SOAP". – orokusaki Nov 02 '12 at 17:59

2 Answers2

7

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

Community
  • 1
  • 1
Fang-Pen Lin
  • 13,420
  • 15
  • 66
  • 96
  • 1
    In Flask-Enterprise is there any way to set maximum and minimum number of elements on SOAP Arrays - or for setting if a Complex element property is mandatory or optional? – Paulo Scardine Mar 02 '12 at 01:21
  • My enthusiasm over Flask-Enterprise faded pretty quicky. Seems like there is no support for setting minimum and maximum number of occurrences in complex types. – Paulo Scardine Mar 05 '12 at 12:46
3

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.

ARA1307
  • 1,022
  • 10
  • 13