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

PHP SoapClient - SOAP-ERROR: Parsing WSDL: Couldn't load external entity #60

Open
matheo opened this issue Dec 5, 2014 · 22 comments
Open

Comments

@matheo
Copy link

matheo commented Dec 5, 2014

Hi!
First, thanks for this great stuff!

I'm a symfony 2 dev and I found this package very nice and clean. I made it work following the documentation and implemented an internal client to verify that it's ok. But I got an issue and I hope you have some light according your experience.

My partners wanted to try the service with the native PHP SoapClient but it throws this exception:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL:
Couldn't load from 'http://192.168.0.38/app_dev.php/soap/Placita?wsdl' :
failed to load external entity "http://192.168.0.38/app_dev.php/soap/Placita?wsdl"

The wsdl is downloadable through browser but when the SoapClient is used:

$client = new SoapClient("http://192.168.0.38/app_dev.php/soap/Placita?wsdl");

It doesn't even reach the dev.log of symfony.

Could you help us to figure out the issue please?
Thanks :)

@cfournel
Copy link

cfournel commented Apr 7, 2015

@matheo did you find an answer ? i m facing same issue

@corescan
Copy link

@matheo still nothing? I'm stuck on the exact same thing...

@matheo
Copy link
Author

matheo commented May 19, 2015

I'm not sure but I think it was a conflict with FOSRestBundle.

Checking my git log it seems that I solved it with this line in the format_listener rules:

{ path: ^/soap/, priorities: [ xml ], fallback_format: xml, prefer_extension: false }

@ECF-dot-com
Copy link

ECF-dot-com commented Dec 26, 2016

Hello,

I am facing the same problem :

soapclient error

With this simple code :

soap code

Just like Matheo, the WSDL is also downloadable through browser.

And requests work perfectly with SoapUI !

Any help would be so much appreciated!

@bakumn
Copy link

bakumn commented Jun 30, 2017

is it decided? i m facing same issue. please, answer me someone.

@ecolinet
Copy link

ecolinet commented Jul 1, 2017

Can you please give the php version ?

I had the very same problem and it was related to libxml on specific php version.

@bakumn
Copy link

bakumn commented Aug 15, 2017

my php version is 5.6.30

@Puru2016
Copy link

I am getting the same issue and my php version is: PHP Version 7.0.6-1+donate.sury.org~trusty+1
Is there any fix?

@williams1989
Copy link

I am also getting same issue please give me the solution anyone

@alexkarlov
Copy link

the same issue, PHP 7.1.12-3+ubuntu14.04.1+deb.sury.org+1

@allphat
Copy link

allphat commented Feb 27, 2018

can you use options like

  • verifypeer
  • verifyhost

?

@alexkarlov
Copy link

no effect

@allphat
Copy link

allphat commented Feb 27, 2018

are your wsdl accessible via browser ?
are you behind a proxy ?

@williams1989
Copy link

no i ran via php on the the browser

@abmohajeri
Copy link

Any solution?

@jcr1984
Copy link

jcr1984 commented Jul 25, 2018

Are you using Nginx or Apache Web Server?

@gelanivishal
Copy link

I also get same issue. I'm using Nginx server.

@jcr1984
Copy link

jcr1984 commented Jul 27, 2018

In my case: PHP-FMP and Nginx in same server and Apache tomcat (with te web services/soap) working throw Nginx load balancer in another server (both servers with Centos 7)
Watching logs for nginx/php/tomcat I saw calls to the name of my upstream (ex. **http://myLoadBalancer.com/**xxxx) in the tomcat server. So, I added to /etc/hosts myLoadBalancer.com

I dont remember the next error related with that, but I remember excecute the next line

setsebool -P httpd_can_network_connect on

After that, I had more problems related with external resources. In my case, Just added the directories to SELinux

Hope it works bro

@djeraseit
Copy link

Make sure there are no spaces before and after the URL and
apt-get install apt-get install node-crypto-cacerts libxmlsec1-openssl on Ubuntu

@ajo-sam
Copy link

ajo-sam commented Mar 12, 2020

I also faced this same issue and i think that the url or link is blocked.Another reason may be some network issue.

@tauseedzaman
Copy link

i am also getting the same error guys what is the solution for this error
i think we should report to the soup community

@Kamandlou
Copy link

I also faced this same issue
what is the solution for this error

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