5
votes

I am running my admin panel in HTTPS for security purpose. Everything is working fine in admin.

But getting this error, while trying to call login method to authenticate where as my secure URL is in HTTPS.

SOAP-ERROR: Parsing WSDL: Couldn't 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 is working 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));
2
Do you have ssl certificated for your site ?samumaretiya
@sagarumaretiya yes, i have allDasarathi Swain
Okay. could you please try in admin system->general->web->Use Secure URLs in Frontend -> yessamumaretiya
@sagarumaretiya, why try?Dasarathi Swain
Okay make system->general->web->Use Secure URLs in Frontend -> yes so when request comes as an api call it will find https instead of http so i think you need to make it httpssamumaretiya

2 Answers

0
votes

It seems server site issue. Ask your hosting provider. It can be resolved by following steps:

  • add a ssl vhost on private ip for www.xyz.com
  • reload apache
  • Also made a host file entry
0
votes

Clearing the /tmp directory of all wsdl* files was the solution to our issue.