PHP SoapClient无法使用代理访问web服务


PHP SoapClient unable to access webservice using proxy

在PHP中使用SoapClient,我遇到了一个问题,我一直无法找到解决方案。

我正在使用wsdl文件的本地副本,我正在使用以下设置:

$this->client = new 'SoapClient(__DIR__ . '/../../some.wsdl',
                        array(
                                'proxy_host'    => $ip,
                                'proxy_port'    => $port,
                                'trace' => 1,
                                'exceptions' => true,
                                'cache_wsdl' => WSDL_CACHE_NONE
                        )
                    );

当调用:

时给出错误:"Forbidden"
$this->client->__call($method, $params)

我已经尝试调用__getFunctions()

$this->client->__getFunctions() 

给出WSDL文件中所有函数的列表。

我错过了什么吗?

像这样调试代码:

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