Name
WebServiceAttribute
Synopsis
This attribute is not required to create a web service, but it should
be used before a web service is deployed to specify a unique XML
namespace and allow clients to distinguish your web service from
others on the Web. By default, if you do not use this attribute, the
default namespace http://tempuri.org/ is used. Namespaces look like
URLs, but they do not actually need to correspond to valid locations on
the Web. In a web service, the XML namespace is used to uniquely
identify parts of the Service Description (WSDL) file that specifically
pertain to the web service. The Name
property identifies the local portion of the XML qualified name, which
will be the web service class name by default. Elements of the WSDL
contract that are specific to WSDL use the
http://schemas.xmlsoap.org/wsdl/ namespace.
Ideally, you should use a namespace that you control, such as your company’s web site address. This XML namespace should not be confused with the .NET namespace used programmatically by clients. For more information on XML qualified names, see http://www.w3.org/TR/REC-xml-names.
You can also set a Description
property, which contains information about your web service that will
be displayed in automatically generated description documents and the
Internet Explorer test page.
Public NotInheritable Class WebServiceAttribute : Inherits Attribute ' Public Constructors Public Sub New() ' Public Shared Fields public const DefaultNamespace As String // =http://tempuri.org/ ...
Get ASP.NET in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.