1.下载库:https://pypi.python.org/pypi/suds-jurko

2.解压后,进入到解压目录,安装库:python3 setup.py install

3.测试获取手机归属地,先获取方法

from suds.client import Client
url = 'http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl'
client = Client(url)
print(client)

python测试webservice接口

4.使用方法getMobileCodeInfo,这里随便输入一个手机号来测试

from suds.client import Client
url = 'http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl'
client = Client(url)
# print(client)
res = client.service.getMobileCodeInfo(13888888888)
print(res)

python测试webservice接口

 

相关文章:

  • 2021-11-19
  • 2021-11-08
  • 2021-10-14
  • 2021-06-01
  • 2022-01-17
  • 2021-11-29
  • 2021-11-27
猜你喜欢
  • 2021-11-27
  • 2021-11-27
  • 2021-08-15
  • 2021-12-07
  • 2021-09-27
  • 2021-11-27
  • 2021-11-19
  • 2021-11-19
相关资源
相似解决方案