diff options
author | Dmitry Stogov <dmitry@php.net> | 2010-05-05 07:43:45 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2010-05-05 07:43:45 +0000 |
commit | 6597e855622f5466935ac71c0cffc233ddc842b5 (patch) | |
tree | 5686a6115d08709b4fd23cde912c3170403bed07 /ext/soap/php_sdl.c | |
parent | 617e8a4f8c735bac0315fc0e6e2ba160e40f3fe6 (diff) | |
download | php-git-6597e855622f5466935ac71c0cffc233ddc842b5.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.c | 11 |
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); |