[Mono-bugs] [Bug 78780][Maj] New - XML-RPC.net and Remoting don't work together

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jul 6 17:23:46 EDT 2006


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 davidiw at ufl.edu.

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

--- shadow/78780	2006-07-06 17:23:46.000000000 -0400
+++ shadow/78780.tmp.28088	2006-07-06 17:23:46.000000000 -0400
@@ -0,0 +1,133 @@
+Bug#: 78780
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: Linux (Gentoo, Debian)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: remoting
+AssignedTo: lluis at ximian.com                            
+ReportedBy: davidiw at ufl.edu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XML-RPC.net and Remoting don't work together
+
+Description of Problem:
+When using remoting via XML-RPC.net, the server returns a 500 internal
+server error.  This was done using the sample code provded at the bottom.
+
+Steps to reproduce the problem:
+1. Run test.exe
+2. Run testclient.exe
+
+Actual Results:
+Unhandled Exception: CookComputing.XmlRpc.XmlRpcServerException: Internal
+Server Error
+in <0x00153> CookComputing.XmlRpc.XmlRpcClientProtocol:ReadResponse
+(CookComputing.XmlRpc.XmlRpcRequest req, System.Net.WebResponse webResp,
+System.IO.Stream respStm, System.Type returnType)
+in <0x00300> CookComputing.XmlRpc.XmlRpcClientProtocol:Invoke
+(System.Object clientObj, System.String methodName, System.Object[] parameters)
+in <0x00013> CookComputing.XmlRpc.XmlRpcClientProtocol:Invoke
+(System.String MethodName, System.Object[] Parameters)
+in <0x0007a>
+XmlRpcProxy68c1b972-f5ab-45a6-8990-00f3aebe59c1:SumAndDifference (Int32 ,
+Int32 )
+in <0x00098> test:Main (System.String[] args)
+
+
+Expected Results:
+5 -1
+
+How often does this happen? 
+Every time
+
+Additional Information:
+<test.cs>
+sing System;
+using System.Runtime.Remoting;
+using CookComputing.XmlRpc;
+
+public struct SumAndDiffValue
+{
+  public int sum;
+  public int difference;
+}
+
+public class SumAndDiff : MarshalByRefObject
+{
+  [XmlRpcMethod("sample.sumAndDifference")]
+  public SumAndDiffValue SumAndDifference(int x, int y)
+  {
+    SumAndDiffValue ret;
+    ret.sum = x + y;
+    ret.difference = x - y;
+    return ret;
+  }
+}
+
+class XmlRpcServer
+
+{
+  static void Main(string[] args)
+  {
+    RemotingConfiguration.Configure("sad.xmlrpc.config");
+    RemotingConfiguration.RegisterWellKnownServiceType(
+          typeof(SumAndDiff),
+      "SumAndDiff.rem",
+      WellKnownObjectMode.Singleton);
+    Console.WriteLine("Press to shutdown");
+    Console.ReadLine();
+  }
+}
+</test.cs>
+
+<testclient.cs>
+using CookComputing.XmlRpc;
+using System;
+
+struct SumAndDiffValue
+{
+  public int sum;
+  public int difference;
+}
+
+[XmlRpcUrl("http://127.0.0.1:61234/SumAndDiff.rem")]
+interface ISumAndDiff
+{
+  [XmlRpcMethod]
+  SumAndDiffValue SumAndDifference(int x, int y);
+}
+
+class test {
+  public static void Main(string [] args) {
+    ISumAndDiff proxy =
+(ISumAndDiff)XmlRpcProxyGen.Create(typeof(ISumAndDiff));
+    SumAndDiffValue ret = proxy.SumAndDifference(2, 3);
+    Console.WriteLine(ret);
+  }
+}
+</testclient.cs>
+
+<sad dhcp.xmlrpc.confg>
+<configuration>
+  <system.runtime.remoting>
+    <application>
+      <channels>
+        <channel ref="http" port="61234">
+          <serverProviders>
+            <formatter
+  type="CookComputing.XmlRpc.XmlRpcServerFormatterSinkProvider,
+CookComputing.XmlRpc"
+            />
+          </serverProviders>
+        </channel>
+      </channels>
+    </application>
+  </system.runtime.remoting>
+</configuration>
+</sad.xmlrpc.config>


More information about the mono-bugs mailing list