[英]PHP SoapClient unable to access webservice using proxy
Using SoapClient in PHP, I've come across a problem I have not been able to find a solution to. 在PHP中使用SoapClient,遇到了一个我无法找到解决方案的问题。
I'm using a local copy of the wsdl file and I am using this setup: 我正在使用wsdl文件的本地副本,并且正在使用此设置:
$this->client = new \SoapClient(__DIR__ . '/../../some.wsdl',
array(
'proxy_host' => $ip,
'proxy_port' => $port,
'trace' => 1,
'exceptions' => true,
'cache_wsdl' => WSDL_CACHE_NONE
)
);
This gives error : "Forbidden" when calling : 调用时出现错误:“禁止”:
$this->client->__call($method, $params)
I have tried calling __getFunctions() 我尝试调用__getFunctions()
$this->client->__getFunctions()
that gives the list of all function in my WSDL file. 给出了我的WSDL文件中所有功能的列表。
Am I missing something? 我想念什么吗?
Debug code with like this : 像这样调试代码:
<?php
try{
$client = new SoapClient($wsdl, $params);
$out = $client;
}catch(Exception $e){
$out = array('error' => $e, 'libxml' => libxml_get_last_error());
}catch(SoapFault $s){
$out = array('error' => $s, 'libxml' => libxml_get_last_error());
}
var_dump($out);
exit();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.