Sabendo da importância dos Web Services na integração de sistemas hoje vamos fazer um tutorial demonstrando como construir um web service simples no VS 2008. Em seguida postarei outro tutorial mostrando como construir uma aplicação consumidora deste Web Service. Serão apenas 6 passos, mas que mostram a facilidade de construção de Web Services no Visual Studio:
Obs: Escreverei os textos em inglês, afim de exercitar.
Obs: Escreverei os textos em inglês, afim de exercitar.
1) First open the VS 2008 and create a new project:

2) In "New Project box" open select "ASP.NET Web service application" and give a name for it. I chose "WSestatistica" to be for calculate the average Arithmetic

3) So, after VS 2008 to create the solution, delete the file "Service 1" in the "Solution Explorer". This is to create a new service.

4) Then create a new service, place your mouse over the project name (WSestatistica) in Solution Explorer and select Add/New Item. After In "New Item box" open select "Web service" and give a name for it. I chose "Calculadora"

5)Then enter this code below of "Web Method". This method should be public, then will be used by the consumer application. I gave the name: media because going to be used for the calculation of average arithmetic of numbers(a and b)

6) Now, place your mouse over project's name, click right button and select "Build", if all right, congratulations: You make a web service!! If error, make again the previous steps.





