擅长:python、mysql、java
<p>作为错误消息状态,SOAPpy不添加SOAPAction HTTP头。这就是为什么SOAPpy不适用于许多服务。请尝试<a href="https://fedorahosted.org/suds/" rel="nofollow noreferrer">suds</a>,下面是一个工作示例:</p>
<pre><code>from suds.client import Client
url = 'http://www.webservicex.net/WeatherForecast.asmx?WSDL'
client = Client(url)
print client.service.GetWeatherByPlaceName('Dallas')
print client.service.GetWeatherByZipCode ('33126')
</code></pre>