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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +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> _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
