ZF-12289: Zend_Soap_AutoDiscover->handle() adds space to beginning of ouput
Description
Received error in httpd logs
PHP Fatal error: SOAP-ERROR: Parsing WSDL:
Couldn't load from 'http://example.com/?wsdl' :
XML declaration allowed only at the start of the document in /Zend/Soap/Server.php on line 762
This is caused by {{Zend_Soap_AutoDiscover->handle()}} adding a space before the
<?xml version="1.0"?>
in the returned xml soap return
if you wrap the {{handle()}} call with
$autodiscover = new Zend_Soap_AutoDiscover();
$autodiscover->setClass('Skel_Soap_Server_FP');
ob_clean();
ob_start();
$autodiscover->handle();
$txt = ob_get_clean();
echo trim($txt);
exit;
then the returned xml string is clean and does not cause the error
Comments
Posted by Frank Brückner (frosch) on 2012-06-14T17:05:35.000+0000
Code tags added.