Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to load external entity "http://dockerized-magento.local/api.php?type=v2_soap&wsdl=1" #57

Open
tothpaul opened this issue Aug 8, 2020 · 1 comment

Comments

@tothpaul
Copy link

tothpaul commented Aug 8, 2020

Hello,

nice Docker, easy to install, but the SOAP API fails at http://dockerized-magento.local/api/v2_soap/index

<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://dockerized-magento.local/api.php?type=v2_soap&wsdl=1' : failed to load external entity "http://dockerized-magento.local/api.php?type=v2_soap&wsdl=1" </faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

it seem's that de image could not resolve dockerized-magento.local (the WSDL refer to the server itself)

I've tried to enter php to add 127.0.0.1 in /etc/hosts but it doesn't fix the problem.

any idea ?

@tothpaul
Copy link
Author

tothpaul commented Aug 8, 2020

found a workaround by adding

  extra_hosts:
   - "dockerized-magento.local:172.17.0.9"

in the PHP: section of docker-compose.yml

but I'm not sure that the IP will be always the same.

BTW I've used a PHP script to understand what to do

<?php
  readfile('/etc/hosts');
  echo gethostbyname('dockerized-magento.local');
  print_r($_SERVER); // to known the server's IP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant