python soap协议接口获取数据 client端
作者:互联网
1. python3安装suds库
pip install suds-py3
2.查看接口中的方法
client=suds.client.Client('xxxx?wsdl') def get_all_methods(client): return [method for method in client.wsdl.services[0].ports[0].methods]
3.查看方法接受的参数
def get_method_args(client, method_name): method = client.wsdl.services[0].ports[0].methods[method_name] input_params = method.binding.input return input_params.param_defs(method)
4.调用接口服务
client.service.method(params)
5.查看收到的数据
print( client.last_received())
标签:methods,python,获取数据,client,suds,input,wsdl,method 来源: https://www.cnblogs.com/Demiwang/p/15126666.html