summaryrefslogtreecommitdiff
path: root/ext/soap/php_sdl.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2004-02-17 09:23:28 +0000
committerDmitry Stogov <dmitry@php.net>2004-02-17 09:23:28 +0000
commit0ecd198dc5b4a7328020c02b1147bd5eab593eb3 (patch)
treeff7ab56318fc6aa450fbafefd9b612965973424c /ext/soap/php_sdl.c
parent168dc362dfcb1141cb9c364c96999cee65d66306 (diff)
downloadphp-git-0ecd198dc5b4a7328020c02b1147bd5eab593eb3.tar.gz
fix: Using proper namespace for <soap:header> if it is not specified.
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r--ext/soap/php_sdl.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 2a74869e26..e9d7246f33 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -390,19 +390,6 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
memset(h, 0, sizeof(sdlSoapBindingFunctionHeader));
h->name = estrdup(tmp->children->content);
- tmp = get_attribute(part->properties, "type");
- if (tmp != NULL) {
- h->encode = get_encoder_from_prefix(ctx->sdl, part, tmp->children->content);
- } else {
- tmp = get_attribute(part->properties, "element");
- if (tmp != NULL) {
- h->element = get_element(ctx->sdl, part, tmp->children->content);
- if (h->element) {
- h->encode = h->element->encode;
- }
- }
- }
-
tmp = get_attribute(header->properties, "use");
if (tmp && !strncmp(tmp->children->content, "encoded", sizeof("encoded"))) {
h->use = SOAP_ENCODED;
@@ -428,6 +415,22 @@ static void wsdl_soap_binding_body(sdlCtx* ctx, xmlNodePtr node, char* wsdl_soap
}
}
+ tmp = get_attribute(part->properties, "type");
+ if (tmp != NULL) {
+ h->encode = get_encoder_from_prefix(ctx->sdl, part, tmp->children->content);
+ } else {
+ tmp = get_attribute(part->properties, "element");
+ if (tmp != NULL) {
+ h->element = get_element(ctx->sdl, part, tmp->children->content);
+ if (h->element) {
+ h->encode = h->element->encode;
+ if (!h->ns && h->element->namens) {
+ h->ns = estrdup(h->element->namens);
+ }
+ }
+ }
+ }
+
if (binding->headers == NULL) {
binding->headers = emalloc(sizeof(HashTable));
zend_hash_init(binding->headers, 0, NULL, delete_header, 0);
@@ -874,7 +877,7 @@ static sdlPtr load_wsdl(char *struri)
return ctx.sdl;
}
-#define WSDL_CACHE_VERSION 01
+#define WSDL_CACHE_VERSION 02
#define WSDL_CACHE_GET(ret,type,buf) memcpy(&ret,*buf,sizeof(type)); *buf += sizeof(type);
#define WSDL_CACHE_GET_INT(ret,buf) ret = ((int)(*buf)[0])|((int)(*buf)[1]<<8)|((int)(*buf)[2]<<16)|((int)(*buf)[3]<<24); *buf += 4;