Working with Web Services Using ASP.NET
page 4 of 11
by SANJIT SIL
Feedback
Average Rating: 
Views (Total / Last 10 Days): 58573/ 204

The Web Service Attribute

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:

1.      Description

2.      Namespace

3.      Name

Description

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.

Listing 2

[WebService(Description="This class contains methods for working with Addition of numbers and Population of DataSet")]

Namespace

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.

Name

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 default value.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-10-08 9:21:31 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search