I am trying to get products using soap api. But I am getting below error:
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://example.com/index.php/api/v2_soap/?wsdl=1' : failed to load external entity "https://example.com/index.php/api/v2_soap/?wsdl=1" in /var/www/example/soap.php:36 Stack trace: #0 /var/www/example/soap.php(36): SoapClient->SoapClient('https://example...') #1 {main} thrown in /var/www/example/soap.php on line 36
I am using below code:
$client = new SoapClient('https://example.com/index.php/api/v2_soap/?wsdl=1');
var_dump($client); die('test');
Also, I have reinstalled openssl and ca-certificates on the server.
Can anyone help please?