How can I consume a WSDL (SOAP) web service in Python?

davidmytton picture davidmytton · Sep 22, 2008 · Viewed 196.8k times · Source

I want to use a WSDL SOAP based web service in Python. I have looked at the Dive Into Python code but the SOAPpy module does not work under Python 2.5.

I have tried using suds which works partly, but breaks with certain types (suds.TypeNotFound: Type not found: 'item').

I have also looked at Client but this does not appear to support WSDL.

And I have looked at ZSI but it looks very complex. Does anyone have any sample code for it?

The WSDL is https://ws.pingdom.com/soap/PingdomAPI.wsdl and works fine with the PHP 5 SOAP client.

Answer

Yusufk picture Yusufk · May 13, 2010

I would recommend that you have a look at SUDS

"Suds is a lightweight SOAP python client for consuming Web Services."