HttpBinding 类 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示添加到 XML Web services 中的 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 ServiceDescriptionFormatExtensionPublic 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 Services Using ASP.NET。 有关 Web 服务描述语言 (WSDL) 的详细信息,请参阅 WSDL 规范。
构造函数
| HttpBinding() | 初始化 HttpBinding 类的新实例。 | 
字段
| Namespace | 指定表示与 SOAP 一起使用的 HTTP 传输的 XML 命名空间的 URI。 此字段为常数。 | 
属性
| 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) |