Raju Gautam

Zend Certified Engineer – PHP 5; Joomla, Web Service, Wordpress Developer


E-mail: raju@devraju.com
raju.rachana@gmail.com
Tel: +977-985-111-3638
Posted by rajug On January - 28 - 2011

In August 2010, I had developed script to connect to Magento server to pull some products by sending values to filter. All of a sudden, last Tuesday it stopped working. I had implemented the searching products from Magento via AJAX so the client was not able to see the error messages to. It seemed it very strange for me too.

Later when I try to connect to the Magento server from outside that AJAX script, then I found the following fatal error message:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/'

Magento normally contains the line following line in its WSDL:


And PHP SOAP was not being able to parse it and hence it gave the above error message.

I searched a lot but could not find the solid solution in Magento forum too. So I just opened the WSDL file located at /app/code/core/Mage/Api/etc/wsdl.xml and commented the line:


And tried as follows:

error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', 1);
$proxy      = new SoapClient('http://www.mysite.com/api/soap?wsdl');
$sessionId  = $proxy->login('****', '****');

Now it worked without any error message. Hope it helps you too!

Enjoy Magento SOAP!!!

Categories: Magento, Programming

Leave a Reply