Home  >  Q&A  >  body text

There is a problem with php7 using SSL protocol to access webservice

The error is: 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:\www\compare.php:22 Stack trace: #0 D:\www\compare.php(22): SoapClient->SoapClient('https://xxx...', Array) #1 {main}

The code is as follows:

$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);

In addition, there is no problem with the php.ini configuration, openssl and soap has been opened

Could you please tell me how to solve it? ? ? ?

不是我不是我914 days ago935

reply all(1)I'll reply

  • 不是我

    不是我2022-03-20 16:32:38

    The system environment is windows2012 apche2.4 PHP7.2

    reply
    0
  • Cancelreply