ZF-12436: Regression when empty request is sent to Zend_Soap_Server in ZF 1.12.0

Description

Steps to reproduce:

  • Send an empty request to a SOAP server

Expected results:

  • Invalid XML error returned

Note: This is the actual error returned by ZF 1.11.13 for example.

Actual results:

  • SOAP-ERROR: Parsing WSDL: Couldn't load from ... : failed to load external entity

Example script:


<?php
require_once('Service.php');

require_once('Zend/Soap/Server.php');

$wsdl = __DIR__ . '/wsdl.xml';

$soapServer = new Zend_Soap_Server($wsdl);

$soapServer->setClass('Service');
$soapServer->handle();
*Result from ZF 1.12.0:*

PHP Warning:  SoapServer::SoapServer(): I/O warning : failed to load external entity "/home/test/wsdl.xml" in /usr/share/php/Zend/Soap/Server.php on line 811
PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from '/home/test/wsdl.xml' : failed to load external entity "/home/test/wsdl.xml"
 in /usr/share/php/Zend/Soap/Server.php on line 811
<?xml version="1.0" encoding="UTF-8"?>
WSDLSOAP-ERROR: Parsing WSDL: Couldn't load from '/home/test/wsdl.xml' : failed to load external entity "/home/test/wsdl.xml"

Result from ZF 1.11.13:


<?xml version="1.0" encoding="UTF-8"?>
SenderInvalid XML

Comments

Just as a note, the I/O warning is stupid to say the least since the WSDL file (or URL) actually exists.

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf1/issues/24