Issues

ZF-10660: Unable to use "&" char in uri in Zend_Soap_Wsdl

Description

When trying to use Zend_Soap_Wsdl with an uri containing "&" char, I have the following bug:

{quote}Warning: DOMDocument::loadXML() [domdocument.loadxml]: EntityRef: expecting ';' in Entity, line: 2 in /Zend/Soap/Wsdl.php on line 108 Warning: DOMDocument::loadXML() [domdocument.loadxml]: EntityRef: expecting ';' in Entity, line: 4 in /Zend/Soap/Wsdl.php on line 108 Exception: Unable to create DomDocument{quote}

The problem comes from line 91 to 98 in Zend/Soap/Wsdl.php :

    <pre class="highlight"><code>$wsdl = "<?xml version='1.0' ?>
            <definitions name='$name' targetNamespace='$uri'
                xmlns='<a rel="nofollow" href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</a>'
                xmlns:tns='$uri'
                xmlns:soap='<a rel="nofollow" href="http://schemas.xmlsoap.org/wsdl/soap/">http://schemas.xmlsoap.org/wsdl/soap/</a>'
                xmlns:xsd='<a rel="nofollow" href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>'
                xmlns:soap-enc='<a rel="nofollow" href="http://schemas.xmlsoap.org/soap/encoding/">http://schemas.xmlsoap.org/soap/encoding/</a>'
                xmlns:wsdl='<a rel="nofollow" href="http://schemas.xmlsoap.org/wsdl/">http://schemas.xmlsoap.org/wsdl/</a>'></definitions>";</code></pre>

The following replacement works perfectly:

$wsdl = "<?xml version='1.0' ?>
                ";

Comments

No comments to display