[Mono-bugs] [Bug 53170][Nor] New - WebService hangs when trying to pass a Dataset in the parameters

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 21 Jan 2004 10:03:34 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mono@appshelf.com.

http://bugzilla.ximian.com/show_bug.cgi?id=53170

--- shadow/53170	2004-01-21 10:03:34.000000000 -0500
+++ shadow/53170.tmp.2971	2004-01-21 10:03:34.000000000 -0500
@@ -0,0 +1,248 @@
+Bug#: 53170
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: RedHat 9.0, MySql 4.0, XSP, Mono 0.29, xsp 0.8
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web.Services
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mono@appshelf.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: WebService hangs when trying to pass a Dataset in the parameters
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+When calling a WebMethod with SOAP which passes a DataSet as a parameter, 
+it hangs and eventually returns a "Operation has timed out" message in 
+the Exception object.
+
+When retrieving a dataset (as a return value), the method is executed, 
+but fails to reutn any results.
+
+Note that testing the method returning the dataset via HTTP yields 
+correct results on the web page.
+
+
+Steps to reproduce the problem:
+1. Create a webmethod which 
+uses a DataSet	[WebMethod]
+	public int TestDS(DataSet ds)	{
+		return ds.Tables[0].Rows.Count;
+	}
+
+
+
+2. run it from within a windows program.
+3. wait for a while until you get a timeout.
+
+
+Actual Results:
+Additional information: Client found response content type of 'text/html; 
+charset=utf-8', but expected 'text/xml'.
+The request failed with the error message:
+--
+<html>
+<title>Error</title><body bgcolor="white"><h1><font color="red">Server 
+error in '/' application</font></h1><hr>
+<h2><font color="maroon"><i></i></font></h2>
+<b>Description: </b>Error processing request.
+<p>
+<b>Error Message: </b>
+<p>
+<b>Stack Trace: </b><table summary="Stack Trace" width="100%" 
+bgcolor="#ffffc">
+<tr><td><code><pre>
+System.Threading.ThreadAbortException: Thread was being aborted<br />in 
+&lt;0x001f0&gt; .StateMachine:ExecuteState (System.Web.
+
+HttpApplication/IStateHandler,bool&amp;)<br />in 
+&lt;0x00161&gt; .StateMachine:ExecuteNext (System.Exception)<br />in 
+&lt;0x00051
+
+&gt; .StateMachine:ExecuteNextAsync (System.Exception)<br />in 
+&lt;0x00022&gt; .StateMachine:Start ()<br />in &lt;0x0006d&gt; 
+
+System.Web.HttpApplication:System.Web.IHttpAsyncHandler.BeginProcessReques
+t (System.Web.HttpContext,System.AsyncCallback,object)<br 
+
+/>in &lt;0x001f7&gt; System.Web.HttpRuntime:InternalExecuteRequest 
+(System.Web.HttpWorkerRequest)<br /></pre></code>
+</td></tr>
+</table>
+<p>
+<hr>
+</body>
+</html>
+<!--
+System.Web.HttpException:  ---&gt; System.Threading.ThreadAbortException: 
+Thread was being aborted
+in &lt;0x001f0&gt; .StateMachine:ExecuteState 
+(System.Web.HttpApplication/IStateHandler,bool&amp;)
+in &lt;0x00161&gt; .StateMachine:ExecuteNext (System.Exception)
+in &lt;0x00051&gt; .StateMachine:ExecuteNextAsync (System.Exception)
+in &lt;0x00022&gt; .StateMachine:Start ()
+in &lt;0x0006d&gt; 
+System.Web.HttpApplication:System.Web.IHttpAsyncHandler.BeginProcessReques
+t (System.Web.HttpContext,System.
+
+AsyncCallback,object)
+in &lt;0x001f7&gt; System.Web.HttpRuntime:InternalExecuteRequest 
+(System.Web.HttpWorkerRequest)
+--- End of inner exception stack trace ---
+
+
+
+Expected Results:
+DataSet passed to WebMethod
+
+How often does this happen? 
+Every time I try to execute it
+
+Additional Information:
+
+The proxy generated by the web page dows not work because it declares the 
+dataset as "objet" which is not allowed - in order to pass a Dataset it 
+must be declared as System.Data.DataSet.
+
+
+Here is the proxy as generated by Visual Studio:
+
+//------------------------------------------------------------------------
+------
+// <autogenerated>
+//     This code was generated by a tool.
+//     Runtime Version: 1.1.4322.573
+//
+//     Changes to this file may cause incorrect behavior and will be lost 
+if 
+//     the code is regenerated.
+// </autogenerated>
+//------------------------------------------------------------------------
+------
+
+// 
+// This source code was auto-generated by Microsoft.VSDesigner, Version 
+1.1.4322.573.
+// 
+namespace SMSSuite.BusinessLayer.SMSSuiteWS {
+    using System.Diagnostics;
+    using System.Xml.Serialization;
+    using System;
+    using System.Web.Services.Protocols;
+    using System.ComponentModel;
+    using System.Web.Services;
+    
+    
+    /// <remarks/>
+    [System.Diagnostics.DebuggerStepThroughAttribute()]
+    [System.ComponentModel.DesignerCategoryAttribute("code")]
+    [System.Web.Services.WebServiceBindingAttribute
+(Name="PlatformServiceSoap", Namespace="http://tempuri.org/")]
+    public class PlatformService : 
+System.Web.Services.Protocols.SoapHttpClientProtocol {
+        
+        /// <remarks/>
+        public PlatformService() {
+            this.Url = "http://192.168.100.115:8080/platform.asmx";
+        }
+        
+        /// <remarks/>
+        [System.Web.Services.Protocols.SoapDocumentMethodAttribute
+("http://tempuri.org/RetrieveMessageSentUpdates", 
+
+RequestNamespace="http://tempuri.org/", 
+ResponseNamespace="http://tempuri.org/", 
+Use=System.Web.Services.Description.SoapBindingUse
+
+.Literal, 
+ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+        public System.Data.DataSet RetrieveMessageSentUpdates(string 
+ClientID) {
+            object[] results = this.Invoke("RetrieveMessageSentUpdates", 
+new object[] {
+                        ClientID});
+            return ((System.Data.DataSet)(results[0]));
+        }
+        
+        /// <remarks/>
+        public System.IAsyncResult BeginRetrieveMessageSentUpdates(string 
+ClientID, System.AsyncCallback callback, object 
+
+asyncState) {
+            return this.BeginInvoke("RetrieveMessageSentUpdates", new 
+object[] {
+                        ClientID}, callback, asyncState);
+        }
+        
+        /// <remarks/>
+        public System.Data.DataSet EndRetrieveMessageSentUpdates
+(System.IAsyncResult asyncResult) {
+            object[] results = this.EndInvoke(asyncResult);
+            return ((System.Data.DataSet)(results[0]));
+        }
+        
+        /// <remarks/>
+        [System.Web.Services.Protocols.SoapDocumentMethodAttribute
+("http://tempuri.org/SendMessages", RequestNamespace="http://
+
+tempuri.org/", ResponseNamespace="http://tempuri.org/", 
+Use=System.Web.Services.Description.SoapBindingUse.Literal, 
+ParameterStyle=
+
+System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+        public int SendMessages(System.Data.DataSet ds) {
+            object[] results = this.Invoke("SendMessages", new object[] {
+                        ds});
+            return ((int)(results[0]));
+        }
+        
+        /// <remarks/>
+        public System.IAsyncResult BeginSendMessages(System.Data.DataSet 
+ds, System.AsyncCallback callback, object asyncState) {
+            return this.BeginInvoke("SendMessages", new object[] {
+                        ds}, callback, asyncState);
+        }
+        
+        /// <remarks/>
+        public int EndSendMessages(System.IAsyncResult asyncResult) {
+            object[] results = this.EndInvoke(asyncResult);
+            return ((int)(results[0]));
+        }
+        
+        /// <remarks/>
+        [System.Web.Services.Protocols.SoapDocumentMethodAttribute
+("http://tempuri.org/TestDS", RequestNamespace="http://tempuri.
+
+org/", ResponseNamespace="http://tempuri.org/", 
+Use=System.Web.Services.Description.SoapBindingUse.Literal, 
+ParameterStyle=System.
+
+Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+        public int TestDS(System.Data.DataSet ds) {
+            object[] results = this.Invoke("TestDS", new object[] {
+                        ds});
+            return ((int)(results[0]));
+        }
+        
+        /// <remarks/>
+        public System.IAsyncResult BeginTestDS(System.Data.DataSet ds, 
+System.AsyncCallback callback, object asyncState) {
+            return this.BeginInvoke("TestDS", new object[] {
+                        ds}, callback, asyncState);
+        }
+        
+        /// <remarks/>
+        public int EndTestDS(System.IAsyncResult asyncResult) {
+            object[] results = this.EndInvoke(asyncResult);
+            return ((int)(results[0]));
+        }
+    }
+}