When calling upon the Magento SOAP API I get the well known

SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://{domain}/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity "http://{domain}/index.php/api/v2_soap/index/?wsdl=1"

however, loading the wsdl with file_get_contents works, and even the following simple test (in a seperate file) works fine.

$server = new SoapServer('http://{domain}/index.php/api/v2_soap/index/?wsdl=1', array(
    'encoding'     => 'UTF-8',
    'soap_version' => 2));

Then again, if i take the above and use in inside the Zend Soap Server class (where the server is created), it throws the same error.

Does anybody have any ideas what's going wrong here?

  • This patch did indeed fix he problem. Thanks a load. – vollie Sep 16 '14 at 13:47

Here is the URL I use successfully for V2 API calls:


Also make sure you have correct web services user set up in Magento etc. etc.

$mage_url = 'http://{domain}/index.php/api/v2_soap?wsdl=1'; $mage_user = 'USERNAME'; //Set in Magento $mage_api_key = 'USERKEY'; //Set in Magento $soap = new SoapClient($mage_url); $session = $soap->login($mage_user,$mage_api_key);

That is how I do it, and it works both internally and externally. Hope this helps!

  • 1
    Not the solution to this particular issue, which (as mentioned above by Marius) apparently came from a bug. But thanks anyway. – vollie Sep 16 '14 at 13:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.