问题描述
|
我对使用ASP开发的Web服务有此调用:
$endpoint = Zend_Registry::get(\'config\')->endpoint->services->myService;
$client = new Zend_Rest_Client($endpoint);
$client->userId($adminUserId);
$client->otherIds($otherIds);
$result = $client->get();
但是,当我尝试调用该服务时,WS未采用参数\'otherIds \'。
解决方法
那是因为显然第一个被调用的函数(如我从源代码中摘录的)被选择为“ method”参数。 Zend REST服务器似乎采用这种格式。我建议其他服务器将虚拟方法提供给客户端,因此第一个调用应该是
$client->Dummy();
之后,设置参数。