python编写SOAP服务
SOAP简介
ZSI: Very painful to use, and development is slow. Has a module called "SOAPpy", which is different than SOAPy (above).
"Newer" libraries:
SUDS: Very Pythonic, and easy to create WSDL-consuming SOAP clients. Creating SOAP servers is a little bit more difficult.
soaplib: Creating servers is easy, creating clients a little bit more challenging.
ladon: Creating servers is much like in soaplib (using a decorator). Ladon exposes more interfaces than SOAP at the same time without extra user code needed.
pysimplesoap: very lightweight but useful for both client and server - includes a web2py server integration that ships with web2py.
参考: http://stackoverflow.com/questions/206154/whats-the-best-soap-client-library-for-python-and-where-is-the-documentation-f
用SOAPpy编写的一个简单例子
SOAPpy包:http://pypi.python.org/pypi/SOAPpy/
A simple "Hello World" http SOAP server:
from suds.client import Clientc = Client('http://192.168.0.31:7789/?wsdl')a = c.service.say_hello(u'punk', 5)print a