Issues

ZF-12289: Zend_Soap_AutoDiscover->handle() adds space to beginning of ouput

Issue Type: Bug Created: 2012-06-14T15:46:32.000+0000 Last Updated: 2012-06-14T17:05:35.000+0000 Status: Open Fix version(s): Reporter: Ashley Kitson (akzincdig) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Soap_Server

Related issues: Attachments:

Description

Received error in httpd logs

<pre class="highlight">
PHP Fatal error: SOAP-ERROR: Parsing WSDL:
Couldn't load from '<a href="http://example.com/?wsdl">http://example.com/?wsdl</a>' :
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

<pre class="highlight">
<?xml version="1.0"?>

in the returned xml soap return

if you wrap the handle() call with

<pre class="highlight">
$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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts