[Mono-bugs] [Bug 45834][Maj] New - Marshalling of ArrayLists via remoting fails between Windows client and RedHat server

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Fri, 4 Jul 2003 01:37:10 -0400 (EDT)


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 matt.davey@finetix.com.

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

--- shadow/45834	Fri Jul  4 01:37:10 2003
+++ shadow/45834.tmp.24272	Fri Jul  4 01:37:10 2003
@@ -0,0 +1,104 @@
+Bug#: 45834
+Product: Mono/Runtime
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: matt.davey@finetix.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Marshalling of ArrayLists via remoting fails between Windows client and RedHat server
+
+Description of Problem:
+Configuration - Client running on Windows XP, Remoting server running on 
+RedHat 9.0, Mono 0.25 installed on server, client with Microsoft CLR 1.0. 
+
+Server code -
+		static void Main(string[] args)
+		{
+			Console.WriteLine("Starting 0.2");
+			ChannelServices.RegisterChannel(new TcpChannel
+(8085));
+
+			RemotingConfiguration.RegisterWellKnownServiceType
+(typeof(servicecomlib.HelloServer),"Test", WellKnownObjectMode.Singleton);
+			Console.ReadLine();
+			Console.WriteLine("Ending");
+		}
+
+Client code:
+			ChannelServices.RegisterChannel(new TcpChannel
+(0));
+			IServerObject s = Activator.GetObject(typeof
+(IServerObject),"tcp://192.168.0.4:8085/Test") as IServerObject;
+			string name = s.getName();
+			Console.WriteLine(name);
+
+			ArrayList al = new ArrayList();
+			al.Add("one");
+			al.Add("two");
+			s.Send(al);
+Other code:
+	public interface IServerObject
+	{
+		string getName();
+		void Send(ArrayList al);
+		[System.Runtime.Remoting.Messaging.OneWay]
+		void CallClient(IClientCallback c);
+	}
+
+	public class HelloServer: MarshalByRefObject , IServerObject
+	{
+		public HelloServer() 
+		{
+			Console.WriteLine("Create HelloServer 0.2");
+		}
+		public string getName()
+		{
+			Console.WriteLine("HelloServer.getName");
+			return "Matt";
+		}
+
+		public void Send(ArrayList al) 
+		{
+			foreach (object o in al) 
+			{
+				Console.WriteLine(o);
+			}
+		}
+
+                 .....
+        }
+
+When client tried to send ArrayList to server via the following call
+	s.Send(al);
+The client is notified that the socket has been closed.  The simplier 
+client to server call
+           string name = s.getName();
+Works fine.  Thus there appears to be an issue with marshalling 
+ArrayLists, DataSets etc over remoting from Windows to RedHat 9.0
+
+Steps to reproduce the problem:
+1. Run above code as defined above
+2. Effectively try sending an ArrayList from a Windows client to a RedHat 
+remoting server
+
+Actual Results:
+Socket connection closed by RedHat remoting server, resulting is 
+exception in Windows client
+
+Expected Results:
+ArrayList should be marshalled over to RedHat remoting server
+
+How often does this happen? 
+All the time
+
+Additional Information:
+None