ZF-10301: Zend_XmlRpc_Response drops namespace information while parsing response value

Issue Type: Bug Created: 2010-08-12T05:34:09.000+0000 Last Updated: 2012-11-20T21:37:57.000+0000 Status: Open Fix version(s): Reporter: Daniel Suchý (sushi) Assignee: None Tags: - Zend_XmlRpc_Client

Related issues: Attachments:


There is a bad XML handling in Zend_XmlRpc_Response->loadXml($response). After parsing response to SimpleXMLElement, XML-RPC value is extracted as a string on line 208:

<pre class="highlight">
$valueXml = $xml->params->param->value->asXML();
$value = Zend_XmlRpc_Value::getXmlRpcValue($valueXml, Zend_XmlRpc_Value::XML_STRING);

However this leads to dropping XML namespace prefix information from the root XML element. When the XML string is parsed again by Zend_XmlRpc_Value, SimpleXMLElement throws warning if there is any XML namespace prefix used.

To reproduce the issue, you can use reponse XML:

<pre class="highlight">
<?xml version="1.0" encoding="utf-8"?>

The issue can be fixed just by removing the additional XML->String->XML conversion (removing the '->asXML()' part).

I also checked trunk and the issue is there as well.


No comments to display

Have you found an issue?

See the Overview section for more details.


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

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