标签:csdn eval .net str blog wsdl 使用 参数 port
from suds.client import Client
def func(url, operation, *args):
‘‘‘接口调用‘‘‘
client = Client(url)
result = eval("client.service.%s" % operation)(*args) #eval将字符串转换成变量使用
return result
url = ‘http://10.***.**.***:****/DaiDaiKan/DaiDaiKanService.asmx?wsdl‘ #注意地址后面需要加wsdl
operation = ‘Prereview‘
name = ‘测试01‘
reportId = ‘100‘
reportSn = ‘2016072500003039963690‘
mobile_token = ‘123‘
func(url, operation, str(name), str(reportId), str(reportSn), str(mobile_token))
参考博客地址:
http://blog.csdn.net/qq_15013233/article/details/52369656
http://blog.csdn.net/xocom/article/details/64120902
标签:csdn eval .net str blog wsdl 使用 参数 port
原文地址:http://www.cnblogs.com/sammy1989/p/7422239.html