php7使用SSL協(xié)議訪問webservice出現(xiàn)問題
問題描述
錯誤為:SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://xxxxx/api?wsdl' : failed to load external entity "https://xxxxxxx/api?wsdl" in D:wwwcompare.php:22 Stack trace: #0 D:wwwcompare.php(22): SoapClient->SoapClient('https://xxx...', Array) #1 {main}
代碼如下:
$opts =array('http' => array('user_agent' => 'PHPSoapClient'),'ssl'=>array('verify_peer'=>false ,'verify_host'=>false,"verify_peer_name"=>false));
$url="https://xxxxxxx/api?wsdl";
$params= array('encoding' => 'UTF-8','soap_version'=>SOAP_1_1,'trace' => 1, "exceptions" => 1, "connection_timeout" => 180,'username' => 'xx', 'password' => '*****','stream_context' => stream_context_create($opts));
$client =new SoapClient($url,$params);
另外php.ini配置沒有問題,openssl和soap已經(jīng)打開
請問下各位大佬,怎么解決????
問題解答
回答1:系統(tǒng)環(huán)境為windows2012+apche2.4+PHP7.2
相關(guān)文章:
1. golang - 用IDE看docker源碼時的小問題2. html - css氣泡,實(shí)現(xiàn)“倒三角(不知道算不算三角了)”可透明的。3. phpstudy8.1沒集成mysql-front4. java - 如何點(diǎn)擊按鈕,重新運(yùn)行(我是初學(xué)者)?5. 運(yùn)行python程序時出現(xiàn)“應(yīng)用程序發(fā)生異常”的內(nèi)存錯誤?6. 我何時應(yīng)該在Java中使用JFrame.add(component)和JFrame.getContentPane()。add(component)7. 利用IPMI遠(yuǎn)程安裝centos報(bào)錯!8. 前端 - @media query 使用出現(xiàn)的問題?9. html5和Flash對抗是什么情況?10. javascript - 請指條明路,angular的$event,在select中卻是undefined?

網(wǎng)公網(wǎng)安備