在PHP中使用HTTPS上的soap-client

时间:2016-12-21 15:24:17

标签: php web-services soap https soap-client

我在php中使用soapclient时遇到问题。我有这个代码

$url = 'https://example.com?wsdl';
$soap = new SoapClient($url, array('trace' => true));
print_r($soap->__getFunctions()); 
$requestHeader = array(..);
$requestObject = array(..);
$request = array(
    "Header" => $requestHeader,
    "RequestObject" => $requestObject,
);
$createResponse = $soap->ServiceList(array('Request' => $request));

返回此错误

Uncaught SoapFault exception: [HTTP] HTTP to HTTPS communication - Please reconfigure Your client to use HTTPS secured communication on port 443 

调用__getFuncitons是好的,它打印可用的函数,但是当我调用其中一些函数时,我得到了这个错误。我正在寻找一些教程或建议,但没有成功。你对我有什么建议吗?

0 个答案:

没有答案