Creating the XmlRpcUrl Interface at Run Time

I am currently building my XML-RPC using (xml-rpc.net) interfaces statically with the following statement:

[XmlRpcUrl("http://dillieodigital.wordpress.com/xmlrpc.php")] public interface ICSBlog : IMetaWeblog { } 

However, I would like to specify the URL of the service at runtime, so I can dynamically switch to different services as needed.

How can I do it?

+7
url dynamic interface xml-rpc configuration
source share
1 answer

The URL can be set at runtime, for example:

 ISumAndDiff proxy = XmlRpcProxyGen.Create<ISumAndDiff>(); proxy.Url = "http://www.cookcomputing.com/SumAndDiff.rem"; SumAndDiffValue ret = proxy.SumAndDifference(2, 3); 

The proxy interface is supposed to come from IXmlRpcProxy. If not, you need to send to IXmlRpcProxy to set the Url property.

+9
source share

All Articles