BeSimple / BeSimpleSoap

NOT MAINTAINED - Build SOAP and WSDL based web services
http://besim.pl
106 stars 137 forks source link

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

Open matheo opened 9 years ago

matheo commented 9 years ago

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 commented 9 years ago

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

corescan commented 9 years ago

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

matheo commented 9 years ago

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 commented 7 years ago

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 commented 7 years ago

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

ecolinet commented 7 years ago

Can you please give the php version ?

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

bakumn commented 7 years ago

my php version is 5.6.30

Puru2016 commented 6 years ago

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 commented 6 years ago

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

alexkarlov commented 6 years ago

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

allphat commented 6 years ago

can you use options like

?

alexkarlov commented 6 years ago

no effect

allphat commented 6 years ago

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

williams1989 commented 6 years ago

no i ran via php on the the browser

abmohajeri commented 6 years ago

Any solution?

jcr1984 commented 6 years ago

Are you using Nginx or Apache Web Server?

gelanivishal commented 6 years ago

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

jcr1984 commented 6 years ago

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 commented 6 years ago

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 commented 4 years ago

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

tauseedzaman commented 2 years ago

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 commented 2 years ago

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