cvs: php-src /ext/soap php_encoding.c

From: Date: Thu, 06 Oct 2005 22:30:11 +0000
Subject: cvs: php-src /ext/soap php_encoding.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-34375@lists.php.net to get a copy of this message
gschlossnagle Thu Oct 6 18:30:11 2005 EDT Modified files: /php-src/ext/soap php_encoding.c Log: support complex types in restrictions and extensions http://cvs.php.net/diff.php/php-src/ext/soap/php_encoding.c?r1=1.107&r2=1.108&ty=u Index: php-src/ext/soap/php_encoding.c diff -u php-src/ext/soap/php_encoding.c:1.107 php-src/ext/soap/php_encoding.c:1.108 --- php-src/ext/soap/php_encoding.c:1.107 Thu Sep 29 06:00:59 2005 +++ php-src/ext/soap/php_encoding.c Thu Oct 6 18:30:08 2005 @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c,v 1.107 2005/09/29 10:00:59 dmitry Exp $ */ +/* $Id: php_encoding.c,v 1.108 2005/10/06 22:30:08 gschlossnagle Exp $ */ #include <time.h> @@ -319,6 +319,10 @@ node = encode->to_xml_after(&encode->details, node, style); } } + if(!node) { + node = xmlNewNode(NULL,"BOGUS"); + xmlAddChild(parent, node); + } return node; } @@ -1536,6 +1540,7 @@ enc = sdlType->encode; while (enc && enc->details.sdl_type && + enc->details.sdl_type->kind != XSD_TYPEKIND_COMPLEX && enc->details.sdl_type->kind != XSD_TYPEKIND_SIMPLE && enc->details.sdl_type->kind != XSD_TYPEKIND_LIST && enc->details.sdl_type->kind != XSD_TYPEKIND_UNION) { @@ -1545,11 +1550,8 @@ zval *tmp = get_zval_property(data, "_" TSRMLS_CC); if (tmp) { xmlParam = master_to_xml(enc, tmp, style, parent); - } else if (prop == NULL) { - xmlParam = master_to_xml(enc, data, style, parent); } else { - xmlParam = xmlNewNode(NULL,"BOGUS"); - xmlAddChild(parent, xmlParam); + xmlParam = master_to_xml(enc, data, style, parent); } } else { xmlParam = xmlNewNode(NULL,"BOGUS"); @@ -1558,6 +1560,7 @@ } else if (sdlType->kind == XSD_TYPEKIND_EXTENSION && sdlType->encode && type != &sdlType->encode->details) { if (sdlType->encode->details.sdl_type && + sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_COMPLEX && sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_SIMPLE && sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_LIST && sdlType->encode->details.sdl_type->kind != XSD_TYPEKIND_UNION) { @@ -1567,12 +1570,9 @@ if (tmp) { xmlParam = master_to_xml(sdlType->encode, tmp, style, parent); - } else if (prop == NULL) { - xmlParam = master_to_xml(sdlType->encode, data, style, parent); } else { - xmlParam = xmlNewNode(NULL,"BOGUS"); - xmlAddChild(parent, xmlParam); - } + xmlParam = master_to_xml(sdlType->encode, data, style, parent); + } } } else { xmlParam = xmlNewNode(NULL,"BOGUS");

« previous php.cvs (#34375) next »