ASP.NET.in.a.Nutshell.Second.Edition [Electronic resources]

G. andrew Duthie; matthew Macdonald

نسخه متنی -صفحه : 873/ 240
نمايش فراداده

WebServiceBindingAttribute

System.Web.Services (system.web.services.dll)sealed class

This attribute is used to mark the class declaration of the proxy class that allows communication between a client and a web service. It defines a Web Service Description Language (WSDL) binding. The Name and the Namespace properties must be set to the name and XML namespace of the web service. These properties match the corresponding properties in the WebServiceAttribute.

You must also use a System.Web.Services.Protocols.SoapDocumentMethodAttribute or System.Web.Services.Protocols.SoapRpcMethodAttribute to describe the binding for each individual web service method represented in the proxy class. This code is generated automatically in the proxy class by adding a Visual Studio .NET web reference or using the WSDL.exe utility included with ASP.NET.

public sealed class 

WebServiceBindingAttribute : Attribute { // Public Constructors public

WebServiceBindingAttribute ( ); public

WebServiceBindingAttribute (string

name ); public

WebServiceBindingAttribute (string

name , string

ns ); public

WebServiceBindingAttribute (string

name , string

ns , string

location ); // Public Instance Properties public string

Location {set; get; } public string

Name {set; get; } public string

Namespace {set; get; } }

Hierarchy

System.Object System.Attribute WebServiceBindingAttribute

Valid On

Class