I am facing a issue with the SOAP Call request in Magento ver 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 = ""; 
    $username = 'XXXXX';
    $apikey= 'YYYYYYY';
        $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 '' : failed to load external entity "" ) in /var/www/html/magento/ingram_import/ingram_category_import.php on line 59

  • In username and password, did you use username and apiKay? and could you add the /var/www/html/magento/ingram_import/ingram_category_import.php codes Feb 10, 2015 at 5:59
  • Thanks for Response Rahul,Yeah i have used username and apiKey.I have added the code in my question Rahul.Please find link…
    – user2520
    Feb 10, 2015 at 6:11
  • O.k. Which one is line 59 in the code? Feb 10, 2015 at 6:13
  • Hi Rahul, Line no 59 is trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
    – user2520
    Feb 10, 2015 at 7:16

2 Answers 2


Finally, i got it working by using as hostname and used SOAP v2 Calls,

    $client = new SoapClient('');
    $username = 'XXXX';
    $apikey= 'YYYYY';

    $session = $client->login($username, $apikey);

    $result = $client->catalogCategoryInfo($session, '2');

    echo '<pre>' . print_r($result);

$client = new SoapClient (''); $username = 'XXXX'; $apikey= 'YYYYY';

$session = $client->login($username, $apikey);

$result = $client->catalogCategoryInfo($session, '2');

echo '<pre>' . print_r($result);

can anyone tell me how to call this endpoint using VueJs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy