KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm writing a SOAP application in Symfony and for all my request I'm getting an error Procedure 'getClusterName' not present . Strange thing is that when I create a test SOAP application in pure PHP, it works fine, but the same code in Symfony returns an error. Another strange thing is that when in the SOAP server code I list available service functions with $server->getFunctions() , it returns array of the service functions and getClusterName is in that array. So the function is known to the server, but it can't call it. When writing the service in Symfony I followed this article and here is my code: Client : namespace Prj\SoapBundle\Controller; class SoapController extends Controller { public function indexAction() { $client = new \SoapClient('http://localhost/test.wsdl'); $client->getClusterName(); Server : namespace Prj\SoapBundle\Controller; class SoapController extends Controller { public function indexAction() { ini_set("soap.wsdl_cache_enabled", "0"); $server = new \SoapServer($this->container->getParameter('wsdl')); $server->setClass('SoapBundle\HelloService'); $server->handle(); Service : namespace Prj\SoapBundle; class HelloService { public function getClusterName() { return '<?xml version="1.0" encoding="utf-8"?><root>Hello!</root>'; } } *.wsdl file seems to be correct because it binds the call with controller and works fine with vanilla PHP service. On Internet this error usually explained by cached wsdl, but this is handled here in server code by setting soap.wsdl_cache_enabled parameter to zero.
Tags (comma-separated)
Save Edits
Cancel