Magento sets session and session id into cookies in
Mage_Core_Model_Session_Abstract_Varien::start()
Here you can find the call of php function session_set_cookie_params
.
This function sets headers for browser to create cookies with params:
lifetime, path, domain, secure, httponly. It is very important always to send the same last four path, domain, secure, httponly parameters because otherwise you will not be able to manage(edit, delete) them.
You can set them in System -> Configuration -> Web -> Session Cookie Management.
On every load Magento validates cookies based on System -> Configuration -> Web -> Session Validation Settings. Probably you have Validate HTTP_USER_AGENT set to yes. It means that if user agent will change(this happens all the time when google chrome get new updates), Magento tries to expire(delete) cookies and then redirect customer to the same page.
Now imagine that browser does not allow to delete cookies(because one of the parametes path, domain, secure, httponly is different). Then you will come to the website with the invalid cookie and Magento again redirects you.
To solve the problem you need to set all Session Validation Settings
to No or revert Session Validation Settings to default.
Also make sure that you do not have changes in Mage_Core_Model_Session_Abstract_Varien::start()
.
Best Answer
If you want to test the examples provided in here you can simply create a php (call it
api_test.php
) file with the contents from one of the examples and just call it in the browser.http://somedomain.com/api_test.php
. It does not have to be on the same domain as your magento instance.For a nicer UI I recommend using soapUi. It is a java tool that let's you test your SOAP (seams it supports REST also).
Just create a new SOAP project, fill in the url of your wsdl and enjoy.
For API v1 the wsdl url is
http://your_magento_root/api/soap/?wsdl=1
For API v2 the wsdl url is
http://your_magento_root/api/v2_soap/?wsdl=1