This article describes step by step creation of WCF RESTful services and its http methods like GET, PUT, DELETE and POST. In this article I am going to create a WCF rest service API which returns XML data as WCF attributes.
REST stands Representational state transfer works on http protocols. Any clients like ASP.net, C#, JAVA, jQuery who can communicate with http protocols can consume the WCF REST services. REST is stateless, sessionless and resource based architecture which helps you to easy access to wcf service and reduce message size.
GET: Retrieves the resource. POST: Creates new resource or submits data to be processed. PUT: Replace or update entire content of resource. DELETE: Deletes existing resource.
-
IProduct WCF Service Contract - WCF Service contract created with interface.
-
ProductService WCF Service - WCF Service contract implementation with RESTful architecture.
Following pictue shows the HTTP GET call to ProductService RESTful service and its response.
For more details check - How to create WCF RESTful service