2003-11-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 20 Nov 2003 05:19:25 +0000 (05:19 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 20 Nov 2003 05:19:25 +0000 (05:19 -0000)
* SoapHttpClientProtocol.cs:
* WebServiceHelper.cs: throw a WebException instead of an Exception.
Fixes bug #51193.

svn path=/trunk/mcs/; revision=20258

mcs/class/System.Web.Services/System.Web.Services.Protocols/ChangeLog
mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapHttpClientProtocol.cs
mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHelper.cs

index a4cb0fa8098d2f42cdfe88422c13ebf917817a8e..9219f6e46ff0972ad546f6503fdaf1fe1f47e6a2 100644 (file)
@@ -1,3 +1,9 @@
+2003-11-20  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * SoapHttpClientProtocol.cs:
+       * WebServiceHelper.cs: throw a WebException instead of an Exception.
+       Fixes bug #51193.
+
 2003-10-26  Miguel de Icaza  <miguel@ximian.com>
 
        * WebServiceHelper.cs: Compute content type and encoding
index 9f5e814b77d0ca2bde2d16de2974941d46cd89cf..eb631785b95e173bffadf0e009460f3b0dd84b03 100644 (file)
@@ -212,7 +212,7 @@ namespace System.Web.Services.Protocols {
                        SoapMethodStubInfo msi = message.MethodStubInfo;\r
 \r
                        if (!(code == HttpStatusCode.Accepted || code == HttpStatusCode.OK || code == HttpStatusCode.InternalServerError))\r
-                               throw new Exception ("Return code was: " + http_response.StatusCode);\r
+                               throw new WebException ("Request error. Return code was: " + http_response.StatusCode);\r
 \r
                        //\r
                        // Remove optional encoding\r
index ef1ba76034f81e5a641aebd48e8e52256487df02..fb82fcd98752ff81dd8769f609190c70c169d8f1 100755 (executable)
@@ -8,6 +8,7 @@
 //
 
 using System;
+using System.Net;
 using System.Text;
 using System.Xml;
 using System.Xml.Schema;
@@ -53,7 +54,7 @@ namespace System.Web.Services.Protocols
                        }
 
                        if (content_type != "text/xml")
-                               throw new Exception ("Content is not XML: " + content_type);
+                               throw new WebException ("Content is not XML: " + content_type);
 
                        return Encoding.GetEncoding (encoding);
                }