ZF2 SOAP "No Procedure" Error

I am having serious problems to solve this problem. I got an APP with three modules that provided various services to SOAP. It happens that 2 of them get the answer:

Soapfault

File: /var/www/empreendimentos/vendor/zendframework/zendframework/library/Zend/Soap/Client.php:10

Message: No procedure

I already checked twice, and the function names are right, and I use the getFunctions method. This is the return from getFunctions ():

array 0 => string 'Array getCliAll(anyType $filter)' (length=32) 1 => string 'Array insertCli(anyType $data)' (length=30) 2 => string 'Array editCli(anyType $data, anyType $id)' (length=41) 3 => string 'void setServiceLocator(anyType $serviceLocator)' (length=47) 4 => string 'void getServiceLocator()' (length=24) 

My processing methods are as follows:

 public function handleWSDL() { $autodiscover = new AutoDiscover(); $autodiscover->setClass('\Cli\Service\CliService'); $autodiscover->setUri($this->_URI); $wsdl = $autodiscover->generate(); $wsdl = $wsdl->toDomDocument(); // geramos o XML dando um echo no $wsdl->saveXML() echo $wsdl->saveXML(); } public function handleSOAP() { $soap = new \Zend\Soap\Server($this->_WSDL_URI); $soap->setWSDLCache(false); $classHandle = new CliService(); $classHandle->setServiceLocator($this->getServiceLocator()); $soap->setClass($classHandle); $soap->handle(); } 

I am not getting server side errors. Only this answer is for all methods. What's wrong?

UPDATE:

This causes the β€œProblem” ZF2 configuration. overload. I had modile.config.php to store the WSDL and URI information, but used the same shortcut for configuration in the file. Overloading made every WSDL and URI the same and gave me a problem.

Like this:

Emp module modile.config.php

 'service_url' => array( "wsdl" => 'http://localhost/empreendimentos/public/emp/service?wsdl', "return" => 'http://localhost/empreendimentos/public/emp/service', ), 

Emp module modile.config.php

 'service_url' => array( "wsdl" => 'http://localhost/empreendimentos/public/cli/service?wsdl', "return" => 'http://localhost/empreendimentos/public/cli/service', ), 

Does anyone know why this is so? Should it mix module configurations?

+4
source share
2 answers

If this problem was yesterday, I found the answer to the wsdl server call.

The server calls its own wsdl to analyze the available methods. If your wsdl url is incorrect, it sees which methods are available on another server and says "The procedure is not present."

In my case, the AdmintoolsController controller had a line

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

so he looked in the news service for the method.

Change it to

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

and it works great.

I searched Google for several hours to find this fix, and my colleague looked at the code and noticed it right away.

Hope this helps

John

+1
source

Also try making the following changes, and then check if this works:

  • Delete the files starting with wsdl - "in the tmp folder of your zend server.
  • Make the php setting: phpSettings.soap.wsdl_cache_enabled = 0 in the application.ini file.
0
source

All Articles