note 102143 modified in soapserver.soapserver by danbrown

From: Date: Sat, 29 Jan 2011 14:24:20 +0000
Subject: note 102143 modified in soapserver.soapserver by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176491@lists.php.net to get a copy of this message
If you're running $soapServer->handle() and getting an empty server response and no errors (even in the logs), check if you're instantiating the SOAP server like this: <?php $soapServer = new SoapServer('http://www.example.com/soap/endpoint?wsdl'); //... $soapServer->handle(); // Result: Empty response ?> Instantiating the SOAP server with one the following should fix it: <?php // With slash before ?wsdl: $soapServer = new SoapServer('http://www.example.com/soap/endpoint/?wsdl'); // Or instantiate with the "uri" option, which works with or without the trailing slash: $soapServer = new SoapServer(null, array('uri' => 'http://www.example.com/soap/endpoint?wsdl')); $soapServer = new SoapServer(null, array('uri' => 'http://www.example.com/soap/endpoint/?wsdl')); ?> Hope that helps somebody! Zend_Soap_Server wasn't working for me, and I eventually found that it had to do with the native PHP SOAP class (which ZF uses). --was-- If you're running $soapServer->handle() and getting an empty server response and no errors (even in the logs), check if you're instantiating the SOAP server like this: $soapServer = new SoapServer('url/to/soap/endpoint?wsdl'); ... $soapServer->handle(); // Result: Empty response Instantiating the SOAP server with one the following should fix it: // With slash before ?wsdl: $soapServer = new SoapServer('url/to/soap/endpoint/?wsdl'); // Or instantiate with the "uri" option, which works with or without the trailing slash: $soapServer = new SoapServer(null, array('uri' => 'url/to/soap/endpoint?wsdl')); $soapServer = new SoapServer(null, array('uri' => 'url/to/soap/endpoint/?wsdl')); Hope that helps somebody! Zend_Soap_Server wasn't working for me, and I eventually found that it had to do with the native PHP SOAP class (which ZF uses). http://php.net/manual/en/soapserver.soapserver.php

« previous php.notes (#176491) next »