Sometimes after installation of Magento, we may get the SOAP error on loading WSDL. Let us see how to fix this issue:
When you are trying to access the URL at http://www.example.com/api/soap/index/ , it gets redirected to http://www.example.com/index.php/api/soap/index/ and you get the following error.
<faultstring>SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.example.com/api/soap/index/wsdl/1/'</faultstring>
There could be many reasons for this. But the issue with us for that particular issue is that www.example.com was not resolving from the server. A simple /etc/hosts entry in the server (poor solution) or making it resolve from the server should solve the issue.