dmitry Sun Oct 9 08:41:15 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/ext/soap php_encoding.c
Log:
Fixed bug #34788 (SOAP Client not applying correct namespace to generated
values)
http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.71.2.28&r2=1.71.2.29&ty=u
Index: php-src/ext/soap/php_encoding.c
diff -u php-src/ext/soap/php_encoding.c:1.71.2.28
php-src/ext/soap/php_encoding.c:1.71.2.29
--- php-src/ext/soap/php_encoding.c:1.71.2.28 Sun Oct 9 07:05:08 2005
+++ php-src/ext/soap/php_encoding.c Sun Oct 9 08:41:12 2005
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_encoding.c,v 1.71.2.28 2005/10/09 11:05:08 dmitry Exp $ */
+/* $Id: php_encoding.c,v 1.71.2.29 2005/10/09 12:41:12 dmitry Exp $ */
#include <time.h>
@@ -1284,7 +1284,7 @@
}
}
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) {
@@ -1293,6 +1293,12 @@
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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php