python实现建立soap通信(调用及测试webservice接口)

实现代码如下:

#调用及测试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)
原文地址:https://www.cnblogs.com/badbadboyyx/p/12003054.html