I spent a couple of hours last night porting XML-RPC.NET to the .NET Compact Framework. After I had stripped out all the server-side code and the XmlRpcProxyGen code which used Reflection.Emit (unsupported on CF) there were several issues, including the following:
- XmlNode.Select* methods are not supported on CF, so I had to write some code to replace use of these methods.
- The overload of Activator.CreateInstance which takes two arguments, used in this case for instantiating arrays, is not supported so I had to instead invoke the constructor of array types explicitly.
- The property of AllowWriteStreamBuffering of HttpWebRequest defaults to false in CF, instead of true in the full framework, to encourage less memory usage I presume. I set this to true because, strictly speaking, chunked output is not part of the XML-RPC spec.
- The WebClientProtocol class in CF has less functionality and so I removed the dependency on this.
I don't have a device running the Compact Framework so I'm only testing the code in the emulator. If there is anyone who would like to use it in a real device, let me know and I'll send a dll for testing.