diff options
author | Dmitry Stogov <dmitry@php.net> | 2004-01-27 15:48:19 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2004-01-27 15:48:19 +0000 |
commit | 1b6f17628156f55b339f006dba48aae1ac364e97 (patch) | |
tree | 8aa26ca667aeaea92698814c8f86daea2e42e68e /ext/soap/php_sdl.c | |
parent | 692726cdd3cad057a4f2d2fb5369c300b3da4c54 (diff) | |
download | php-git-1b6f17628156f55b339f006dba48aae1ac364e97.tar.gz |
Support for relative path in WSDL and XML Schema <import>
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r-- | ext/soap/php_sdl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 0077ee5a1c..c12b8b22fa 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -1,4 +1,5 @@ #include "php_soap.h" +#include "libxml/uri.h" typedef struct sdlCtx { sdlPtr root; @@ -198,7 +199,17 @@ static void load_wsdl_ex(char *struri, sdlCtx *ctx, int include) /* TODO: namespace ??? */ xmlAttrPtr tmp = get_attribute(trav->properties, "location"); if (tmp) { - load_wsdl_ex(tmp->children->content, ctx, 1); + xmlChar *uri; + xmlChar *base = xmlNodeGetBase(trav->doc, trav); + + if (base == NULL) { + uri = xmlBuildURI(tmp->children->content, trav->doc->URL); + } else { + uri = xmlBuildURI(tmp->children->content, base); + xmlFree(base); + } + load_wsdl_ex(uri, ctx, 1); + xmlFree(uri); } } else if (strcmp(trav->name,"message") == 0) { |