dmitry Thu Oct 16 15:36:46 2008 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/soap php_encoding.c Log: Fixed bug #43723 (SOAP not sent properly from client for <choice>) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1259&r2=1.2027.2.547.2.1260&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1259 php-src/NEWS:1.2027.2.547.2.1260 --- php-src/NEWS:1.2027.2.547.2.1259 Thu Oct 16 01:02:39 2008 +++ php-src/NEWS Thu Oct 16 15:36:45 2008 @@ -15,6 +15,7 @@ - Fixed buf #45722 (mb_check_encoding() crashes). (Moriyoshi) - Fixed bug #44251, #41125 (PDO + quote() + prepare() can result in segfault). (tsteiner at nerdclub dot net) +- Fixed bug #43723 (SOAP not sent properly from client for <choice>). (Dmitry) - Fixed bug #42078 (pg_meta_data mix tables metadata from different schemas). (Felipe) - Fixed bug #37100 (data is returned truncated with BINARY CURSOR). (Tony) http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?r1=1.103.2.21.2.40&r2=1.103.2.21.2.41&diff_format=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.103.2.21.2.40 php-src/ext/soap/php_encoding.c:1.103.2.21.2.41 --- php-src/ext/soap/php_encoding.c:1.103.2.21.2.40 Wed Oct 1 08:39:49 2008 +++ php-src/ext/soap/php_encoding.c Thu Oct 16 15:36:46 2008 @@ -17,7 +17,7 @@ | Dmitry Stogov <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.103.2.21.2.40 2008/10/01 08:39:49 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.103.2.21.2.41 2008/10/16 15:36:46 dmitry Exp $ */ #include <time.h> @@ -360,6 +360,7 @@ static xmlNodePtr master_to_xml_int(encodePtr encode, zval *data, int style, xmlNodePtr parent, int check_class_map) { xmlNodePtr node = NULL; + int add_type = 0; TSRMLS_FETCH(); /* Special handling of class SoapVar */ @@ -450,14 +451,15 @@ encodePtr enc = NULL; if (SOAP_GLOBAL(sdl)) { enc = get_encoder(SOAP_GLOBAL(sdl), SOAP_GLOBAL(sdl)->target_ns, type_name); + if (!enc) { + enc = find_encoder_by_type_name(SOAP_GLOBAL(sdl), type_name); + } } if (enc) { + if (encode != enc && style == SOAP_LITERAL) { + add_type = 1; + } encode = enc; - } else if (SOAP_GLOBAL(sdl)) { - enc = find_encoder_by_type_name(SOAP_GLOBAL(sdl), type_name); - if (enc) { - encode = enc; - } } break; } @@ -484,6 +486,9 @@ } if (encode->to_xml) { node = encode->to_xml(&encode->details, data, style, parent); + if (add_type) { + set_ns_and_type(node, &encode->details); + } } } return node; @@ -1623,6 +1628,13 @@ encodePtr enc; data = get_zval_property(object, model->u.element->name TSRMLS_CC); + if (data && + Z_TYPE_P(data) == IS_NULL && + !model->u.element->nillable && + model->min_occurs > 0 && + !strict) { + return 0; + } if (data) { enc = model->u.element->encode; if ((model->max_occurs == -1 || model->max_occurs > 1) &&
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php