Hi, maybe this will help you out. It is an introduction to REST and WCF Services.
WCF REST, actually provides Plain-Old-Xml (POX), result when the WCF service is browsed. In correct word it can be explained that, as like in web services, it was possible to invoke WebMethod in browser by passing parameters to it, same thing we can do in WCF REST. WCF has FREST support form .NET 3.5 SP1.
Following are the cahnges we nedd to do:
Add refernece for System.ServiceModel.Web, in service application.
Use [WebGet] attribute on Operation in service conmtract
string GetData(string val)
WCF REST has support for Http verbs like GET,POST,PUT and DELETE
Http GET can be performed using [WebGet] and POST,PUT and DELETE can be using [WebInvoke] operation.
The binding ypu can use for WCF REST is webHttpBinding. And to activate it on IIS you need to use additional value in Service.svc file
For the further I have posted article on WCF REST and its consumption in varipous clients:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=387 -> Consuming in WPF 3.5
http://www.dotnetcurry.com/ShowArticle.aspx?ID=434 -> REST with Windows Authentication.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=472 -> Consuming in Windows Mobile 6.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=469 -> Consuming in Silverlight 3.0.
http://www.dotnetcurry.com/ShowArticle.aspx?ID=501 -> WIndows Phone 7.
All these articles will definately help you.
Actually I live in basic .Net world and these JASON, WPF, Silverlight are out of my scope currently. Though I know WCF some so when we create a REST service by this I mean we can access the service using the url (eg: http://www.xyz.com/GetProductInfo/HP) that means for consuming the REST service we don't have to create a proxy class and call the service method thru the proxy object and then pass the parameters. Please correct me if I am wrong. Because after looking into some example to REST service consumer as JSON,WPF I very much confused.
Moreover, generally bolgs have REST similar URL, I guess, like http://sample.wordpress.com/2010/05/24/linq/, please again correct me if I am wrong??
- Edited by GurunGuns Thursday, June 03, 2010 10:50 AM update