Python调用webservice

import suds
from suds.client import Client
from suds.xsd.doctor import Import, ImportDoctor


url= "http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl"
imp= Import('http://www.w3.org/2001/XMLSchema',
 location='http://www.w3.org/2001/XMLSchema.xsd')
imp.filter.add("http://WebXml.com.cn/")
d= ImportDoctor(imp)
client= Client(url,doctor=d)

result= client.service.getSupportCitySoapOut()

#打印出print(result

你可能感兴趣的:(Python调用webservice)