简体   繁体   English

Magento Soap客户端无法在https上运行

[英]Magento Soap client is not working on https

I have facing issue on Magento soap api connection whenever try to use https as secure url . Magento soap api connection whenever try to use https as secure url我都面临Magento soap api connection whenever try to use https as secure url问题。

My magento system version CE 1.7 and soap version 1 . 我的magento系统version CE 1.7 and soap version 1

System Url setup is 系统网址设置为

Secure url is  https://www.example.com/
Unsecured  is  http://www.example.com/

When i am changed secure to http://www.example.com/(With out https) 当我安全地更改为http://www.example.com/时(不带https)

Then the soap client is working properly. 然后,肥皂客户端正常工作。

Also,when secure is https://www.example.com ,it throw below error:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.example.com/index.php/api/soap/index/?wsdl' : failed to load external entity "https://www.example.com/index.php/api/soap/index/?wsdl

My code is 我的代码是

try{

$cli = new SoapClient('http://www.example.com/index.php/api/soap/index/?wsdl');
$session = $cli->login('marketplace_usr', 'ezvendorplus');
$result = $cli->call($session, 'catalog_product.info', 10887);
var_dump($result);
}
catch(Exception $e){
    echo '<pre>';
    var_dump($e);
    }

Check is php_openssl extension enabled. 检查是否启用了php_openssl扩展名。 If not - enable it. 如果没有,请启用它。

It is server site issue.Hosting provider is resolved the issue by 这是服务器站点问题。托管服务提供商已通过以下方式解决了该问题

add a ssl vhost on private ip for www.example.com and reload apache
and also made a host file entry

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM