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 suds.xsd.doctor import ImportDoctor, Import
 
d = ImportDoctor(Import('http://schemas.xmlsoap.org/soap/encoding/'))
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)

Resources