summaryrefslogtreecommitdiff
path: root/ext/soap/php_sdl.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2010-05-05 07:43:45 +0000
committerDmitry Stogov <dmitry@php.net>2010-05-05 07:43:45 +0000
commitfa0a07ba97bf802018e3985594b282cb4a65aaa7 (patch)
treecdfa43670c469c2ac503b7200fba2b616e2e74ed /ext/soap/php_sdl.c
parent6e8db0b35a9e9148622e343c03cd3adb1ae9e099 (diff)
downloadphp-git-fa0a07ba97bf802018e3985594b282cb4a65aaa7.tar.gz
Fixed bug #50698 (SoapClient should handle wsdls with some incompatiable endpoints). (Justin Dearing)
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r--ext/soap/php_sdl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 35c5e1af58..6bdb9e1294 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -832,7 +832,12 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
if (strncmp((char*)tmp->children->content, WSDL_HTTP_TRANSPORT, sizeof(WSDL_HTTP_TRANSPORT)) == 0) {
soapBinding->transport = SOAP_TRANSPORT_HTTP;
} else {
- soap_error1(E_ERROR, "Parsing WSDL: PHP-SOAP doesn't support transport '%s'", tmp->children->content);
+ /* try the next binding */
+ efree(soapBinding);
+ efree(tmpbinding->location);
+ efree(tmpbinding);
+ trav = trav->next;
+ continue;
}
}
}
@@ -1128,6 +1133,10 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC)
soap_error0(E_ERROR, "Parsing WSDL: Couldn't bind to service");
}
+ if (ctx.sdl->bindings == NULL || ctx.sdl->bindings->nNumOfElements == 0) {
+ soap_error0(E_ERROR, "Parsing WSDL: Could not find any usable binding services in WSDL.");
+ }
+
zend_hash_destroy(&ctx.messages);
zend_hash_destroy(&ctx.bindings);
zend_hash_destroy(&ctx.portTypes);