Example WCF XML-RPC client C# code against custom XML-RPC server implementation?

Posted by mr.b on Stack Overflow See other posts from Stack Overflow or by mr.b
Published on 2010-05-20T22:54:10Z Indexed on 2010/05/20 23:00 UTC
Read the original article Hit count: 1313

Filed under:
|
|
|
|

I have built my own little custom XML-RPC server, and since I'd like to keep things simple, on both server and client side (server side PHP runs, by the way), what I would like to accomplish is to create a simplest possible client in C# using WCF.

Let's say that Contract for service exposed via XML-RPC is as follows.

[ServiceContract]
public interface IContract
{
    [OperationContract(Action="Ping")]
    string Ping(); // server returns back string "Pong"

    [OperationContract(Action="Echo")]
    string Echo(string message); // server echoes back whatever message is
}

So, there are two example methods, one without any arguments, and another with simple string argument, both returning strings (just for sake of example). Service is exposed via http.

What's next?

Thanks for reading!

P.S. I have done my homework of googling around for samples and similar, but all that I could come up with are some blog-related samples that use existing (and very big) classes, which implement correct IContract (or IBlogger) interfaces, so that most of what I am interested is hidden below several layers of abstraction...

© Stack Overflow or respective owner

Related posts about xml-rpc

Related posts about wcf