在python3.x上的安装并访问webservice

作者: drmeng 分类: Python 发布时间: 2019-05-03 16:57

官网已经用另外一个库替代了这个库
pip install suds-jurko
此库是为了解决python访问webservice的
调用代码:
1 import suds
2
3 from suds.client import Client
4
5 url = “http://192.168.1.235:12581/ServiceYuYue.svc?wsdl”
6 client = suds.client.Client(url)
7
8 #getHealthyHeBei是webService提供的方法
9 result = client.service.getHealthyHeBei(18210409689)
10
11 #打印出结果
12 print(result)
使用开源的东西就有一点不好,兼容性做不好的时候需要自己去不断摸索,而没有太多的现成的解决方案可供参考。
参考自:https://www.cnblogs.com/dhf327/p/4741943.html