1
votes

I'm trying to setup a Magento API, but when I try to access the API URL I get a 404

For example, http://localhost/magento/api or http://localhost/magento/api/?wsdl go nowhere.

So when I try to connect to the server with the SoapClient I always get an error like this:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/magento/api/soap/?wsdl' : failed to load external entity "http://localhost/magento/api/soap/?wsdl" in /var/www/html/magento/soapclient.php:3 .

In fact, when I can't open the WSDL XML with the browser nor access the /api endpoint.

Do I have to do anything else before get ready to work with the SOAP API?

1

1 Answers

0
votes

I think that you already solve your problem, but just to document. If you does not use CURL URL, you need to use the path to your WSDL using the

link: http://magentohost.com/index.php/api/soap/?wsdl