【发布时间】:2012-08-11 21:31:20
【问题描述】:
我可以像这样在 PHP 中向 SOAP 客户端发送函数参数(searchLinks 是方法名称):
$client = new SoapClient("https://linksearch.api.cj.com/wsdl/version2/linkSearchServiceV2.wsdl", array('trace'=> true));
$results = $client->searchLinks(array("developerKey" => $developerKey,
"token" => '',
"websiteId" => $websiteId,
"advertiserIds" => 'joined'));
如果我想在 Python 中做同样的事情,我该怎么做?这是目前的代码:
server=WSDL.Proxy(url)
results=server.searchLinks({'developerkey':dev_key,'token':'','websiteId':website_id,'advertiserIds':'joined'})
当我尝试运行这个 Python 脚本时,它会抛出错误。为什么它不像 PHP 那样采用函数参数?
【问题讨论】:
-
你确定你在python版本中以正确的方式传递参数吗?是否应该在字典中传递所有参数?