How can we help you today?

How to Fix SOAP error: Parsing WSDL: Couldn’t load from “”: failed to load external entity

Created by: Jesper Verkade

Modified on: Wed, 13 Jan, 2021 at 9:32 AM

Magento’s SOAP API references its own WSDL, making the magento instance depend on its own api endpoint. If it is not possible to connect to the SOAP API from the Hypernode, you will get this error when trying to perform requests.

Hypernodes are configured to support HTTP requests from the server itself, without the need to add your domain to the /etc/hosts as suggested in many articles online. If you get this error, some configuration or error is with withholding the Magento installation to connect to it’s own API endpoint.

Magento constructs the WSDL URL based on your Magento instance base URL. This means that if your Magento store is not accessible from the the server itself, SOAP server will not be able to load WSDL during initialisation. As a result you encounter this error.


Test If Your SOAP API Is Available for Magento

To verify if it is possible to connect to the Magento API, you can use curl:

curl -v https://$SITE/index.php/api/index/index/wsdl/1/

This should return the XML schema:

<definitions xmlns:typens="urn:Magento" xmlns:xsd="" xmlns:soap="" xmlns:soapenc="" xmlns:wsdl="" xmlns="" name="Magento" targetNamespace="urn:Magento">
<schema xmlns="" targetNamespace="urn:Magento">
<import namespace="" schemaLocation=""/

If you are not able to curl for the WSDL, chances are high this may be the issue.


Check If the User Agent of the SOAP Client Is Rate Limited

If the source IP of the SOAP client is rate limited, find the corresponding rate limit zone in /var/log/nginx/access.log and add the user agent to the user agent mapping or the IP rate limit whitelist.

Check If the IP of the Server Is Allowed to Make HTTP Requests

If you are using a whitelist and or blacklist to allow and deny IP’s, make sure the IP of the Hypernode itself and the local host IP ( are both present in the list(s).

Flush Your WSDL Cache

In some cases the WSDL cache file in /tmp/ is corrupted, causing the same error. If you run into this issue, use the following workaround to recache your WSDL file:

rm /tmp/wsdl*
n98-magerun cache:flush
Jesper is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.