I am running the admin panel in HTTPS for security. Everything works fine in the administrator.
But getting this error, when trying to call the login method for authentication, where my secure url is in https.
SOAP-ERROR: WSDL analysis: failed to load from https://domain.com/index.php/api/v2_soap/index/?wsdl=1 ': failed to load external entity " https://domain.com/index .php / api / v2_soap / index /? wsdl = 1
This works fine in HTTP
$username = 'username';
$apiKey = 'apikey';
$api_url_v2 = "https://domain.com/api/v2_soap/?wsdl=1"
$cli = new SoapClient($api_url_v2);
$result = $cli->login(array('username' => $username, 'apiKey' => $apiKey));
source
share