HttpBinding 類別

定義

表示已加入至 XML Web Service 內的 Binding 的擴充性項目。 此類別無法獲得繼承。

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
繼承
屬性

範例

下列範例顯示 類別的 HttpBinding 一般用法。

// 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 傳遞。 如需 XML Web 服務通訊協定規格的詳細資訊,請參閱 使用 xml Web 服務 ASP.NET。 如需 Web 服務描述語言 (WSDL) 的詳細資訊,請參閱 WSDL 規格。

建構函式

HttpBinding()

初始化 HttpBinding 類別的新執行個體。

欄位

Namespace

指定 XML 命名空間的 URI,表示用於 SOAP 的 HTTP 傳輸。 這個欄位為常數。

屬性

Handled

取得或設定值,指出 ServiceDescriptionFormatExtension 是否在擴充性項目匯入時由匯入處理序來使用。

(繼承來源 ServiceDescriptionFormatExtension)
Parent

取得 ServiceDescriptionFormatExtension 的父系。

(繼承來源 ServiceDescriptionFormatExtension)
Required

取得或設定值,指出 ServiceDescriptionFormatExtension 對它所參考的動作是否是必要的。

(繼承來源 ServiceDescriptionFormatExtension)
Verb

取得或設定值,指出是否會用 "GET" 或 "POST" 方法提出 HTTP 要求。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於