+2003-11-24 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * Methods.cs, TypeStubManager.cs, SoapMessage.cs: Removed TODO comment.
+ * SoapDocumentationHandler.cs: Check that the documentation page exist.
+ * SoapHttpClientProtocol.cs: Removed cast from WebResponse to
+ HttpWebResponse. This fixes bug #51281.
+
2003-11-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpSoapWebServiceHandler.cs: WebException is ok here for wrong
vpath += "/" + help;
string physPath = Path.Combine (path, help);
+
+ if (!File.Exists (physPath))
+ throw new InvalidOperationException ("Documentation page '" + physPath + "' not found");
+
_pageHandler = PageParser.GetCompiledPageInstance (vpath, physPath, context);
}
// \r
object [] ReceiveResponse (WebResponse response, SoapClientMessage message, SoapExtension[] extensions)\r
{\r
- HttpWebResponse http_response = (HttpWebResponse) response;\r
- HttpStatusCode code = http_response.StatusCode;\r
SoapMethodStubInfo msi = message.MethodStubInfo;\r
-\r
- if (!(code == HttpStatusCode.Accepted || code == HttpStatusCode.OK || code == HttpStatusCode.InternalServerError))\r
- throw new WebException ("Request error. Return code was: " + http_response.StatusCode);\r
-\r
+ HttpWebResponse http_response = response as HttpWebResponse;\r
+ bool isSuccessful = true;\r
+ \r
+ if (http_response != null)\r
+ {\r
+ HttpStatusCode code = http_response.StatusCode;\r
+ \r
+ if (!(code == HttpStatusCode.Accepted || code == HttpStatusCode.OK || code == HttpStatusCode.InternalServerError))\r
+ throw new WebException ("Request error. Return code was: " + http_response.StatusCode);\r
+ \r
+ isSuccessful = (code != HttpStatusCode.InternalServerError);\r
+ }\r
+ \r
//\r
// Remove optional encoding\r
//\r
StreamReader reader = new StreamReader (stream, encoding, false);\r
XmlTextReader xml_reader = new XmlTextReader (reader);\r
\r
- bool isSuccessful = (code != HttpStatusCode.InternalServerError);\r
SoapHeaderCollection headers;\r
object content;\r
\r