We provide Magento installation service to our clients and sometimes after installation we got the SOAP error on loading WSDL.Let us see the issue in detail, 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/ you get the following error. But if you try to load the API directly, you get the WSDL as it should be in a XML format.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>WSDL</faultcode>
<faultstring>SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.example.com/api/soap/index/wsdl/1/'</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
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.