summaryrefslogtreecommitdiff
path: root/ext/soap/php_sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_sdl.c')
-rw-r--r--ext/soap/php_sdl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c
index 462c589b1..256ece55c 100644
--- a/ext/soap/php_sdl.c
+++ b/ext/soap/php_sdl.c
@@ -17,7 +17,7 @@
| Dmitry Stogov <dmitry@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_sdl.c 293036 2010-01-03 09:23:27Z sebastian $ */
+/* $Id: php_sdl.c 299013 2010-05-05 07:43:45Z dmitry $ */
#include "php_soap.h"
#include "ext/libxml/php_libxml.h"
@@ -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);