In this article, you will learn how to create your first REST based XML Web Service in Visual Studio 2015.
For Service contract detail, see WCF Service Components.
It is a class, which implements Service contract (interface) and in this class, you will define your business logic or behaviors.
Configuration file (web.config) is the place, where you can define the end points (see the details for the end points WCF Service Components) and other configurations for your Web Service.
A prompt will open, which asks about the changes of all the references. Click OK and Visual Studio will automatically rename these files throughout the project
Alternatively you can delete these files and recreate by right clicking on the project, followed by going to Add > New item, as shown below in fFgure-5.
Now, select WCF Service. Write the name WelcomeWCFService and click Add. It will automatically generate IWelcomeWCFService and WelcomeWCFService, as shown below.
Add the namespace for WebGet attribute (this attribute maps your methods and its parameters to the specific URL, which can be accessed through Http GET request) by clicking Quick acitons icon, as show in Figure-7.
endpointBehaviors indicates that this Web Service endpoint will be accessed, using REST and add element specifies the REST based Http communication protocol.
As you can see the response is in XML format; this is all about REST based XML WCF Web Service. For more information regarding REST, see SOAP and REST
Essential WCF Practical Implementation