
Applying the WebService Attribute
Apply the optional WebService attribute to a class that implements a Web service to set the default XML namespace for the Web service, which originally is http://tempuri.org, along with a string to describe the Web service.
It is highly recommended that this default namespace, which is http://tempuri.org, be changed before the XML Web service is made publicly consumable. This is important because the XML Web service must be distinguished from other XML Web services that might inadvertently use the namespace as the default (<http://tempuri.org/>).
To set the XML namespace of which a Web service is a member
The following code example sets the XML namespace to http://www.contoso.com/.
<%@ WebService Language="C#" Class="Util" Debug=true%>
using System.Web.Services;
using System;
[WebService(Namespace="http://www.contoso.com/")]
public class Util: WebService
<%@ WebService Language="VB" Class="Util"%>
Imports System.Web.Services
Imports System
<WebService(Namespace:="http://www.contoso.com/")> _
Public Class Util
Inherits WebService