Table of contents
Based on Python3, make a WebService client.
1. Make a client based on the suds library
1.1. Basic environment
Python3.7, suds-jurko (0.6)
The Python3.7 version I use needs to use suds-jurko, because suds only supports python2
#安装工具包suds-jurko=python3;suds=python3
pip install susd-jurko
1.2, suds source code
The public WebService server is used for testing here, and there are more functional servers here: Free and public WebService server
source code:
from suds.client import Client
if __name__ == '__main__':
url = 'http://www.webxml.com.cn/WebServices/TraditionalSimplifiedWebService.asmx?wsdl'
client = Client(url)
print(client) # 查看所有Methods
print(client.service.toSimplifiedChinese('龍的傳人'))
print(client.service.toTraditionalChinese('中国,我们一起加油'))
1.3. Test results
2. Make a client based on the zeep library
2.1. Basic environment
Python3.7、soap(3.4.0)
pip install zeep
2.2, zeep source code
placeholder
2.3. Test results
placeholder