I am using the Soap api's of the Magento. While using the webservices i am getting the below issue

Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't find

I have made all the extensions enable on the server.

I have used the below code to make the Soap api as the client api.


$store_url =Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
$options = array(





       //'features' => SOAP_USE_XSI_ARRAY_TYPE,


$proxy = new SoapClient($store_url,$options);

Guide me where i am doing something wrong. Any help is appreciated.

  • 1
    Does your server know himself? This is quite often mistake during development not to add domain to hosts on the server machine. Magento needs WSDL to be accessible via web from that machine where it is hosted. Jun 25, 2013 at 7:45

1 Answer 1


I tested your code and it works perfectly for me.
From this line: require_once('../app/Mage.php'); I assume you placed the client code in a subfolder of your Magento instance. Am I right?
Also if you can change the way you get the wsdl url from this:

$store_url =Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);

To this:

$store_url = Mage::getUrl('api/soap/index', array('wsdl'=>1));

The truth is that I tested on PHP 5.3. Maybe the php version is an issue. Or the operating system.

I've seen some server configuration that gave the same error, but I don't remember the OS.
The wsdl should also be available at this url also. BASE_URL/api.php?type=soap&wsdl=1. Maybe that works for you.

  • I am getting that BASE_URL/api.php?type=soap&wsdl=1. Earlier someone changed the server error then this issue arises. Don't know how to fix it now. Jun 25, 2013 at 7:31
  • By BASE_URL I meant Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB). I forgot to say that.
    – Marius
    Jun 25, 2013 at 7:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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