Cook Computing

 

«  Invoke on non-existent proxy method  »

Tuesday 13 August 2002

I've updated the XML-RPC.NET FAQ with an answer to the question "Why does my client throw exception "Invoke on non-existent proxy method"?

I've had a number of queries about this issue and I'm plannning to add the functionality to generate an assembly containing a proxy class or dynamically generate the proxy class at runtime. The former would be useful where a proxy was going to be used in a restricted security environment becase the second approach would only work in a full trust scenario.

After reading the interesting article Generating Code at Run Time With Reflection.Emit I did some experimenting with the sample code to see how easy it would be to generate XML-RPC.NET proxies. It doesn't look too difficult to create a utility which, when given an assembly containing an interface representing the XML-RPC endpoint, would create an assembly containing a proxy class deriving from XmlRpcClientProtocol. The same code could also be used to dynamically generate the proxy for the second scenario mentioned above.

Posted by at 07:30 AM. Permalink.