实现代码如下:

#调用及测试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)

 

posted on 2019-12-07 19:24  badbadboy  阅读(1270)  评论(0编辑  收藏  举报