The Web Service Attribute is a member of the
System.Web.Services namespace. This we can use to let the clients know where
to find information about a Web Service. There are three properties of the Web
Service attribute. They are as follows:
The Description property is used to provide a brief
description of the functionality of the class. We can write the same as
specified in Listing 2.
[WebService(Description="This class contains methods for working with Addition of numbers and Population of DataSet")]
The Namespace property sets the XML namespace for the
service. Generally we use an URL. It does not have to be an actual URL; it
can be any string value. The idea is that it should be unique. It is common
practice to use URL because a URL is always unique.
When the WSDL is generated for an ASP.NET Web Service, the
name of the class is used for the service name within the WSDL. When a proxy
uses the WSDL and builds a proxy class, the name of the class generated
corresponds to the name value of service. This property allows overriding the