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())