Sunday, November 21, 2010

What Is A Web Service?

A Web Service is a program that can be invoked in a distributed web envi ronment. Web Service technologies like SOAP, WSDL, and UDDI are standards to describe, publish, discover, and use Web Services; they define a development model  for integrating applications over the web.

Steps to Create a Web Service

1.  Create (or use an existing) virtual directory for any folder on your computer.
2.  Create an empty file called “test.asmx” in the folder.
3.  Edit the file and add the  following text:
<%@ WebService Language="C#" Class="MyMath" %>
using System.Web.Services;
public class MyMath
{
    [WebMethod]
    public int Add(int num1, int num2)
    {
         return num1+num2;
    }
}

1 comment:

  1. Thanks yarr, my doubt's are clear now. Need more help, I will tell you later..

    ReplyDelete