How to Use C# Client to Consume Google App Engine's RPC

Posted By  nsoonhui On 07 May 2010 09:05:23
emailbookmarkadd commentsprint
No of Views:1857
Bookmarked:0 times
Votes:0 times

Introduction

Google App Engine allows one to run the web apps on Google infrastructure. This is especially enticing to developers because it takes care of hardware, hosting,  scaling, authentication and deployment issues.

I'm glad to learn that one can create desktop clients in any language to take to the Google App Engine backend. The way this can be done is as thus. First, get the excellent xml rpc python code from here, integrate it into your Google App Engine application.

The meat of your web service method is defined inside the application class, assuming that we have the following method in the application class:

def getName(self,meta, keyInput): 
return keyInput

This is how you can call this service method from C# client, by making use of the xml-rpc.net library:

[XmlRpcUrl("http://localhost:8080/xmlrpc")]
 public interface AppTest: IXmlRpcProxy 
{
 [XmlRpcMethod("app.getName")] 
string GetName(string number);
 }
 public string GetName(string keyInput) 
{ 
var appProxy = XmlRpcProxyGen.Create<apptest>();
 appProxy.Url = "http://localhost:8080/xmlrpc/"; 
return appProxy.GetName(keyInput);
 }

So now your C# client can talk to Google App Engine backend with ease.

Conclusion

access the google API RPC with C#.

 

Sign Up to vote for this article
Other popular Tips/Tricks
    In this tip, I will explain how to use the BigInteger in C# 4.0.The BigInteger is new data type in .NET 4.0.
    Published Date : 22/Sep/2011
    In this tips,I am going to discuss about two important thing about Split function of String class. Split function of the string class split the string in array of string.
    Published Date : 29/Jul/2011
    The Facebook is very popular and it has great support to other development Languages by Facebook SDKs.In this tips, I going to explain how to upload Videos to Facebook through C# with few lines of code.
    Published Date : 13/Jun/2011
    In this tip, i will share with you , how to format time HH:MM:SS from seconds in C#.
    Published Date : 25/Feb/2011
    Enums in dot net programming is a great facility and we all used it to increase code readability. In earlier version of .NET framework we don’t have any method anything that will check whether a value is assigned to it or not. In C# 4.0 we have new static method called HasFlag which will check that particular value is assigned or not.
    Published Date : 01/Jan/2011
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top