diff options
| author | Dmitry Stogov <dmitry@php.net> | 2005-10-09 12:41:44 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2005-10-09 12:41:44 +0000 |
| commit | 303a642a0d2c8d755ec45ab22590cbc39ee58ca0 (patch) | |
| tree | 6f5f273eab45e29e161d84c517ed12ac321fe48d | |
| parent | 5dd9ad8f53ea9f41232ed68d9f3bde1fafd972e4 (diff) | |
| download | php-git-303a642a0d2c8d755ec45ab22590cbc39ee58ca0.tar.gz | |
Fixed bug #34788 (SOAP Client not applying correct namespace to generated values)
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | ext/soap/php_encoding.c | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -43,6 +43,8 @@ PHP NEWS - Fixed "make test" to work for phpized extensions. (Hartmut, Jani) - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems. (Andrey) +- Fixed bug #34788 (SOAP Client not applying correct namespace to generated + values). (Dmitry) - Fixed bug #34787 (SOAP Client not handling boolean types correctly). (Dmitry) - Fixed bug #34785 (subclassing of mysqli_stmt does not work). (Georg) - Fixed bug #34771 (strtotime() fails with 1-12am/pm). (Derick) diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 7652c1d391..5905bc2d6a 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -1380,7 +1380,7 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval * } } return 1; - } else if (strict && model->u.element->nillable) { + } else if (strict && model->u.element->nillable && model->min_occurs > 0) { property = xmlNewNode(NULL,model->u.element->name); xmlAddChild(node, property); if (style == SOAP_ENCODED) { @@ -1389,6 +1389,12 @@ static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval * xmlNsPtr xsi = encode_add_ns(property,XSI_NAMESPACE); xmlSetNsProp(property, xsi, "nil", "true"); } + if (style == SOAP_LITERAL && + model->u.element->namens && + model->u.element->form == XSD_FORM_QUALIFIED) { + xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); + xmlSetNs(property, nsp); + } return 1; } else if (model->min_occurs == 0) { return 2; |
