Magento: Debugging Webservices

During an audit I had to check with a debugger how one of Magento Webservices works. I found a post on Troubleshooting Magento Web Service using Python so I could easily manipulate with SOAP requests. To debug the code in IDE I added the cookie with XDebug session id.

from suds.client import Client
from import ImportDoctor, Import
d = ImportDoctor(Import(''))
c = Client('http://www.magento.local/api/v2_soap?wsdl=1', doctor=d, headers={ 'Cookie': 'XDEBUG_SESSION=netbeans-xdebug', })
sid = c.service.login('user', 'pass')
print c.service.catalogProductInfo(sid, 633)


Leave a comment

Your email address will not be published. Required fields are marked *