dmitry Tue Feb 17 04:23:30 2004 EDT
Modified files:
/php-src/ext/soap php_sdl.c
Log:
fix: Using proper namespace for <soap:header> if it is not specified.
http://cvs.php.net/diff.php/php-src/ext/soap/php_sdl.c?r1=1.60&r2=1.61&ty=u
Index: php-src/ext/soap/php_sdl.c
diff -u php-src/ext/soap/php_sdl.c:1.60 php-src/ext/soap/php_sdl.c:1.61
--- php-src/ext/soap/php_sdl.c:1.60 Mon Feb 16 11:32:52 2004
+++ php-src/ext/soap/php_sdl.c Tue Feb 17 04:23:28 2004
@@ -17,7 +17,7 @@
| Dmitry Stogov <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_sdl.c,v 1.60 2004/02/16 16:32:52 dmitry Exp $ */
+/* $Id: php_sdl.c,v 1.61 2004/02/17 09:23:28 dmitry Exp $ */
#include "php_soap.h"
#include "libxml/uri.h"
@@ -390,19 +390,6 @@
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 @@
}
}
+ 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 @@
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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php