Zend_Soap“无法连接到主机”Https

时间:2011-10-14 14:15:14

标签: php zend-framework soap https

使用Zend_Soap通过HTTPS使用Web服务时遇到问题。

// create webservice
$client = new Zend_Soap_Client(WsdlFile);
// with certifikat
$client->setHttpsCertificate(serviceCert);

try {
// call webservice
    $result = $client->callFunctionIWant(); 
} catch (Exception $e) {
    error_log('Webservice error: ' . $e->getMessage());
    $this->_redirect($this->getFrontController()->getBaseUrl().'/webservice/error/');
}

它可以在本地调用werbservice,也没有证书。看来直播服务器无法连接。但是使用wget我可以测试连接,并在服务器上安装证书后看到它正常工作:

wget https://domain.of.server/service/service.asmx?wsdl --no-check-certificate
--2011-10-14 16:11:19--  https://domain.of.server/service/service.asmx?wsdl
Resolving domain.of.server... 192.168.0.23
Connecting to domain.of.server|192.168.0.23|:443... connected.
WARNING: cannot verify »domain.of.server« issued by `......':

Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 200 OK
Length: 3326 (3,2K) [text/xml]
Saving to »service.asmx?wsdl«

100% [=========================================================================================== ==================>] 3.326       --.-K/s   in 0s      

2011-10-14 16:11:20 (857 MB/s) - »service.asmx?wsdl« saved [3326/3326]

PHP无法连接到实时系统上的主机可能是什么问题???

提前thx 斯潘基

0 个答案:

没有答案