]> granicus.if.org Git - php/commitdiff
- Fixed bug #44811 (Improve error message when creating a new SoapClient that contain...
authorDavid Coallier <davidc@php.net>
Wed, 7 May 2008 15:23:10 +0000 (15:23 +0000)
committerDavid Coallier <davidc@php.net>
Wed, 7 May 2008 15:23:10 +0000 (15:23 +0000)
ext/soap/php_sdl.c

index e8698e15da085ffbf855059cb561c5a5688840b2..07c3b5d657287afda26578fae63625ff168c7dee 100644 (file)
@@ -240,7 +240,13 @@ static void load_wsdl_ex(zval *this_ptr, char *struri, sdlCtx *ctx, int include
        wsdl = soap_xmlParseFile(struri TSRMLS_CC);
        
        if (!wsdl) {
-               soap_error1(E_ERROR, "Parsing WSDL: Couldn't load from '%s'", struri);
+               xmlErrorPtr xmlErrorPtr = xmlGetLastError();
+
+               if (xmlErrorPtr) {
+                       soap_error2(E_ERROR, "Parsing WSDL: Couldn't load from '%s' : %s", struri, xmlErrorPtr->message);
+               } else {
+                       soap_error1(E_ERROR, "Parsing WSDL: Couldn't load from '%s'", struri);
+               }
        }
 
        zend_hash_add(&ctx->docs, struri, strlen(struri)+1, (void**)&wsdl, sizeof(xmlDocPtr), NULL);