如何在 Python 中使用 WSDL (SOAP) Web 服务? [英] How can I consume a WSDL (SOAP) web service in Python?

查看:40
本文介绍了如何在 Python 中使用 WSDL (SOAP) Web 服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 Python 中使用基于 WSDL SOAP 的 Web 服务.我看过深入Python代码,但 SOAPpy 模块在 Python 2.5 下不起作用.

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.

我曾尝试使用 suds 部分工作,但与某些类型中断(suds.TypeNotFound:未找到类型:'项目').

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

我还查看了 Client 但这似乎不支持 WSDL.

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

我查看了 ZSI 但它看起来非常复杂.有人有它的示例代码吗?

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

WSDL 是 https://ws.pingdom.com/soap/PingdomAPI.wsdl 并与 PHP 5 SOAP 客户端一起正常工作.

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

推荐答案

我建议你看看 SUDS

Suds 是一个用于使用 Web 服务的轻量级 SOAP python 客户端."

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

这篇关于如何在 Python 中使用 WSDL (SOAP) Web 服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆