summaryrefslogtreecommitdiff
path: root/ext/soap/php_schema.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2005-11-08 08:30:19 +0000
committerDmitry Stogov <dmitry@php.net>2005-11-08 08:30:19 +0000
commit270640283e4bceee208b09a843c02b2e79b71e07 (patch)
tree99229db27f7a0d3dcfe72112ab664aeb3240f3b3 /ext/soap/php_schema.c
parent9c14ce94f300a14a971dd10322234a23ce85ef64 (diff)
downloadphp-git-270640283e4bceee208b09a843c02b2e79b71e07.tar.gz
Fixed bug #35142 (SOAP Client/Server Complex Object Support)
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r--ext/soap/php_schema.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index d6183ffc93..565a7fb46b 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -2192,9 +2192,25 @@ static void schema_content_model_fixup(sdlCtx *ctx, sdlContentModelPtr model)
}
break;
}
- case XSD_CONTENT_SEQUENCE:
- case XSD_CONTENT_ALL:
case XSD_CONTENT_CHOICE: {
+ if (model->max_occurs != 1) {
+ HashPosition pos;
+ sdlContentModelPtr *tmp;
+
+ zend_hash_internal_pointer_reset_ex(model->u.content, &pos);
+ while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) {
+ (*tmp)->min_occurs = 0;
+ (*tmp)->max_occurs = model->max_occurs;
+ zend_hash_move_forward_ex(model->u.content, &pos);
+ }
+
+ model->kind = XSD_CONTENT_ALL;
+ model->min_occurs = 1;
+ model->max_occurs = 1;
+ }
+ }
+ case XSD_CONTENT_SEQUENCE:
+ case XSD_CONTENT_ALL: {
sdlContentModelPtr *tmp;
zend_hash_internal_pointer_reset(model->u.content);