summaryrefslogtreecommitdiff
path: root/ext/soap/php_schema.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-08-31 10:48:45 +0000
committerDmitry Stogov <dmitry@php.net>2007-08-31 10:48:45 +0000
commit83647013afb6a071e43cb20a1b2ab3cfe2b6b5db (patch)
tree479487dea1b5920d362b07d08bc2efe15b74d602 /ext/soap/php_schema.c
parentcac7e107c62fc1463ab8f16957507352cdbf9554 (diff)
downloadphp-git-83647013afb6a071e43cb20a1b2ab3cfe2b6b5db.tar.gz
Fixed bug #42359 (xsd:list type not parsed)
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r--ext/soap/php_schema.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 9ba4f81604..0ae65ba39e 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -453,7 +453,14 @@ static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypeP
newType = emalloc(sizeof(sdlType));
memset(newType, 0, sizeof(sdlType));
- newType->name = estrdup("anonymous");
+ {
+ smart_str anonymous = {0};
+
+ smart_str_appendl(&anonymous, "anonymous", sizeof("anonymous")-1);
+ smart_str_append_long(&anonymous, zend_hash_num_elements(sdl->types));
+ smart_str_0(&anonymous);
+ newType->name = anonymous.c;
+ }
newType->namens = estrdup((char*)tns->children->content);
if (cur_type->elements == NULL) {
@@ -463,6 +470,7 @@ static int schema_list(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr listType, sdlTypeP
zend_hash_next_index_insert(cur_type->elements, &newType, sizeof(sdlTypePtr), (void **)&tmp);
schema_simpleType(sdl, tns, trav, newType);
+
trav = trav->next;
}
if (trav != NULL) {
@@ -541,7 +549,14 @@ static int schema_union(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr unionType, sdlTyp
newType = emalloc(sizeof(sdlType));
memset(newType, 0, sizeof(sdlType));
- newType->name = estrdup("anonymous");
+ {
+ smart_str anonymous = {0};
+
+ smart_str_appendl(&anonymous, "anonymous", sizeof("anonymous")-1);
+ smart_str_append_long(&anonymous, zend_hash_num_elements(sdl->types));
+ smart_str_0(&anonymous);
+ newType->name = anonymous.c;
+ }
newType->namens = estrdup((char*)tns->children->content);
if (cur_type->elements == NULL) {
@@ -1879,7 +1894,14 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
}
dummy_type = emalloc(sizeof(sdlType));
memset(dummy_type, 0, sizeof(sdlType));
- dummy_type->name = estrdup("anonymous");
+ {
+ smart_str anonymous = {0};
+
+ smart_str_appendl(&anonymous, "anonymous", sizeof("anonymous")-1);
+ smart_str_append_long(&anonymous, zend_hash_num_elements(sdl->types));
+ smart_str_0(&anonymous);
+ dummy_type->name = anonymous.c;
+ }
dummy_type->namens = estrdup((char*)tns->children->content);
schema_simpleType(sdl, tns, trav, dummy_type);
newAttr->encode = dummy_type->encode;