I am facing a issue with the SOAP Call request in Magento ver 1.9.1.0. I have tested the code in my local site, it works fine, but when i move the code to my online server it is not working.
I have checked SOAP is enabled in server, Please find the code i used for SOAP call,
$host = "81.82.212.166:8888/magento/index.php";
$username = 'XXXXX';
$apikey= 'YYYYYYY';
try
{
$client = new SoapClient("http://" . $host . "/api/V2_soap?wsdl=1"); //soap handle
$session_id = $client->login($username, $apikey);
} catch (SoapFault $fault)
{
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}
When i run the above code faced below error,
Fatal error: SOAP Fault: (faultcode: WSDL, faultstring: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://81.82.212.166:8888/magento/index.php/api/V2_soap?wsdl=1' : failed to load external entity "http://81.82.212.166:8888/magento/index.php/api/V2_soap?wsdl=1" ) in /var/www/html/magento/ingram_import/ingram_category_import.php on line 59
/var/www/html/magento/ingram_import/ingram_category_import.php
codes