1
我想在我的PHP代碼中進行SOAP調用。代碼位於file1.php中,而SOAP位於WSDL文件soap.xml中。新SoapClient的()是在管線150如何修復OpenCart PHP代碼中的SOAP調用錯誤?
file1.php裏面Opencart的2.3
$user = 'user';
$password = 'password';
$wsdl = 'soap.xml'
$client = new SoapClient($wsdl,array('login' => "$user", 'password' => "$password", 'encoding'=>'ISO-8859-1', 'trace'=>1, 'stream_context' => stream_context_create(array('https' => array('protocol_version' => 1.0))), 'cache_wsdl'=>WSDL_CACHE_NONE));
這裏控制器文件是我不斷收到錯誤:
SoapClient::SoapClient(): SSL operation failed with code 1. OpenSSL
Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in <b>file1.php</b> on line <b>150</b><b>Warning</b>: SoapClient::SoapClient(): Failed to enable crypto in <b>file1</b> on line <b>150</b><b>Warning</b>: SoapClient::SoapClient (https://soap.xml): failed to open stream: operation failed in <b>file1.php</b> on line <b>150</b><b>Warning</b>: SoapClient::SoapClient(): I/O warning : failed to load external entity "https:soap.xml" in <b>file1.php</b> on line <b>150</b>
如何解決問題?
您使用的是哪個版本的PHP? –
我們在SOAP 1.1上使用PHP 5.6.26 –
也許這可以幫助你http://stackoverflow.com/questions/25142227/unable-to-connect-to-wsdl –