HttpBinding 类

定义

表示添加到 XML Web services 中的 Binding 的扩展性元素。Represents an extensibility element added to a Binding within an XML Web service. 此类不能被继承。This class cannot be inherited.

public ref class HttpBinding sealed : System::Web::Services::Description::ServiceDescriptionFormatExtension
[System.Web.Services.Configuration.XmlFormatExtension("binding", "http://schemas.xmlsoap.org/wsdl/http/", typeof(System.Web.Services.Description.Binding))]
[System.Web.Services.Configuration.XmlFormatExtensionPrefix("http", "http://schemas.xmlsoap.org/wsdl/http/")]
public sealed class HttpBinding : System.Web.Services.Description.ServiceDescriptionFormatExtension
[<System.Web.Services.Configuration.XmlFormatExtension("binding", "http://schemas.xmlsoap.org/wsdl/http/", typeof(System.Web.Services.Description.Binding))>]
[<System.Web.Services.Configuration.XmlFormatExtensionPrefix("http", "http://schemas.xmlsoap.org/wsdl/http/")>]
type HttpBinding = class
    inherit ServiceDescriptionFormatExtension
Public NotInheritable Class HttpBinding
Inherits ServiceDescriptionFormatExtension
继承
属性

示例

下面的示例演示类的典型用法 HttpBindingThe following example shows a typical usage of the HttpBinding class.

// Create the 'HttpBinding' object.
HttpBinding^ myHttpBinding = gcnew HttpBinding;
myHttpBinding->Verb = "POST";

// Add the 'HttpBinding' to the 'Binding'.
myBinding->Extensions->Add( myHttpBinding );

// Create the 'HttpBinding' object.
HttpBinding myHttpBinding = new HttpBinding();

myHttpBinding.Verb="POST";
// Add the 'HttpBinding' to the 'Binding'.
myBinding.Extensions.Add(myHttpBinding);
' Create the 'HttpBinding' object.
Dim myHttpBinding As New HttpBinding()

myHttpBinding.Verb = "POST"
' Add the 'HttpBinding' to the 'Binding'.
myBinding.Extensions.Add(myHttpBinding)

注解

将此类用作可扩展性元素,指定将通过 HTTP 传递信息。The use of this class as an extensibility element specifies that information is to be passed by HTTP. 有关 XML Web services 的协议规范的详细信息,请参阅 使用 ASP.NET 的 Xml Web servicesFor more information about specification of protocols for XML Web services, see XML Web Services Using ASP.NET. 有关 Web Services 描述语言 (WSDL) 的详细信息,请参阅 wsdl 规范。For more information about Web Services Description Language (WSDL), see the WSDL specification.

构造函数

HttpBinding()

初始化 HttpBinding 类的新实例。Initializes a new instance of the HttpBinding class.

字段

Namespace

指定表示与 SOAP 一起使用的 HTTP 传输的 XML 命名空间的 URI。Specifies the URI for the XML namespace representing the HTTP transport for use with SOAP. 此字段为常数。This field is constant.

属性

Handled

获取或设置一个值,该值指示当导入扩展性元素时,导入进程是否使用 ServiceDescriptionFormatExtensionGets or sets a value indicating whether the ServiceDescriptionFormatExtension is used by the import process when the extensibility element is imported.

(继承自 ServiceDescriptionFormatExtension)
Parent

获取 ServiceDescriptionFormatExtension 的父级。Gets the parent of the ServiceDescriptionFormatExtension.

(继承自 ServiceDescriptionFormatExtension)
Required

获取或设置一个值,该值指示 ServiceDescriptionFormatExtension 是否是它所引用的操作所必需的。Gets or sets a value indicating whether the ServiceDescriptionFormatExtension is necessary for the action to which it refers.

(继承自 ServiceDescriptionFormatExtension)
Verb

获取或设置一个值,该值指示是使用“GET”还是“POST”方法进行 HTTP 请求。Gets or sets a value indicating whether the HTTP request will be made using the "GET" or "POST" method.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于