ZF2 SOAP “Procedure not present” Error

浪子不回头ぞ 提交于 2019-12-04 08:53:48

Had this problem yesterday, found the answer was in the server wsdl call.

The server calls its own wsdl to introspect the available methods. If your wsdl url is wrong, it sees what methods are available in another server and says 'Procedure not present'.

In my case the AdmintoolsController had the line

$wsdl_url = 'http://' . $_SERVER['HTTP_HOST'] . '/news/?wsdl';

so it was looking in the News service for the method.

Change it to

$wsdl_url = 'http://' . $_SERVER['HTTP_HOST'] . '/admintools/?wsdl';

and it works fine.

I searched Google for hours looking for this fix, and my colleague looked at the code and spotted it straight away.

Hope this helps

John

Also try to do the below changes and then check if it works:

  1. Remove the files starting with "wsdl-" in the tmp folder of your zend server.
  2. Make a php setting: phpSettings.soap.wsdl_cache_enabled = 0 in your application.ini file.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!