close

Mcafee Stinger Vs Symantec

We recently had a site launch a new SOAP api service. We were able to begin using the service fine on our development environment – an exact clone of the production web app. However, when we tried connecting to the production server we received the following response to the SOAP $client->login() call:

<SOAP-ENV:Envelope xmlns:SOAP-ENV=”
<SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>WSDL</faultcode> <faultstring> SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘: failed to load external entity “ </faultstring> </SOAP-ENV:Fault> </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

After much frustration and a lengthy google search, we found the answer. Magento’s SOAP implementation references its own WSDL, meaning the server needs to be able to ping its own api endpoint, most likely through the external domain name you use to browse the site. If you’re not able to run a curl command for the WSDL (this may be the issue.

The fix was to modify the production server’s hosts file (/etc/hosts) to include a mapping between the server’s IP address and the web app’s domain name:

xx.xx.xx.xx yoursite.com

Once modifying the hosts file, we were able to use the API endpoint normally.

If you’ve never debugged Magento API calls, there’s a tool called which can be very helpful (once you figure out how to navigate the tricky UI!)


endpoint security engineer     endpoint security cloud

TAGS

CATEGORIES