summaryrefslogtreecommitdiff
path: root/ext/soap/php_schema.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_schema.c')
-rw-r--r--ext/soap/php_schema.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c
index 6e7303885..fb60b08ac 100644
--- a/ext/soap/php_schema.c
+++ b/ext/soap/php_schema.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_schema.c,v 1.58.2.6.2.5 2007/02/15 17:01:29 dmitry Exp $ */
+/* $Id: php_schema.c,v 1.58.2.6.2.6 2007/08/31 10:48:45 dmitry Exp $ */
#include "php_soap.h"
#include "libxml/uri.h"
@@ -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;