lucialee 2019-12-07
实现代码如下:
#调用及测试webservice接口 import requests class SoapConnect: def get_soap(self,url,data): r = requests.post(url,data) print(r.text) if __name__ == ‘__main__‘: u = ‘http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx/getMobileCodeInfo‘ d = {‘mobileCode‘: ‘15928777426‘, ‘userID‘: ‘‘} SoapConnect().get_soap(u,d)