我正在尝试使用PHP SOAP客户端来消费一个SOAP服务,但是它失败并显示以下错误信息:
SoapFault: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://domain.com/webservice.asmx?wsdl' : failed to load external entity "https://domain.com/webservice.asmx?wsdl"\n in /Users/andrewdchancox/Projects/test/testsoap.php on line 10
我已经下载了wsdl文件,并从本地的apache实例中提供服务,它可以顺利加载。唯一能想到的问题是Web服务在SSL上运行,使用自签名证书-当我使用wget下载wsdl时,会出现以下错误:
--2012-09-11 16:28:39--
https://domain.com/webservice.asmx?wsdl
Resolving domain.com (domain.com)... 11.111.111.11
Connecting to domain.com (domain.com)|11.111.111.11|:443... connected.
ERROR: The certificate of ‘domain.com’ is not trusted.
ERROR: The certificate of ‘domain.com’ hasn't got a known issuer.
我已经谷歌搜索并仔细阅读了PHP SOAP客户端 - http://php.net/manual/en/class.soapclient.php和它的构造函数 - http://www.php.net/manual/en/soapclient.soapclient.php,但没有找到任何有助于解决问题的信息。
大家有什么想法吗?