laravel/framework: "5.6" PHP 7.3.5
I am using the package Zoap to make a Soap Server API and when I tried to access my endpoint on a Laravel Application(local) through ngrok(This is not the issue) I ended up with the following errors:
PHP Warning: SoapServer::SoapServer(http://7184fa0e.eu.ngrok.io/zoap/demo/server?wsdl): failed to open stream: HTTP request failed! in C:\something\something\something\something\something\something\vendor\zendframework\zend-soap\src\Server.php on line 915 [Thu Jul 4 11:06:11 2019] PHP Warning: SoapServer::SoapServer(): I/O warning : failed to load external entity "http://7184fa0e.eu.ngrok.io/zoap/demo/server?wsdl" in C:\something\something\something\something\something\something\vendor\zendframework\zend-soap\src\Server.php on line 915 [Thu Jul 4 11:06:11 2019] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://7184fa0e.eu.ngrok.io/zoap/demo/server?wsdl' : failed to load external entity "http://7184fa0e.eu.ngrok.io/zoap/demo/server?wsdl"
I was trying to debug to find out wha happened and as far as I could understand, this might be an infinite loop. If I make a request to /zoap/demo/server?wsdl
, it returns the wsdl fine, although if I make a request to /zoap/demo/server
it will be loading for 60s and then returns
PHP Fatal error: Maximum execution time of 60 seconds exceeded
while blocking the zoap/demo/server?wsdl
endpoint.
I tracked the code to find exactly where the loop would take place and it seems to be here:
$server = new SoapServer($this->wsdl, $options);
, Server.php
file, getSoap
Function. $this->wsdl
is returning the wsdl URL as a string and $options
an array with soap_version, so I guess they are working fine.
Out of curiosity I tried to deattach the public function server($key)
in ZoapController
in two, to fetch the wsdl on a different route and it resolved the infinite loop. Although, I ended up with an empty XML file.
I am out of ideas and I would appreciate if someone would get back to me. Please do request additional information if you need it.
The expected result should be to get the xml file of respective action.