doushichun9409 2019-07-04 16:38
浏览 82

SoapServer无法在Zoap包上加载生成的wsdl文件

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.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示
    • ¥15 求三国群英传pl国战时间的修改方法
    • ¥15 matlab代码代写,需写出详细代码,代价私
    • ¥15 ROS系统搭建请教(跨境电商用途)
    • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。