OutputBinding 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
提供 XML Web 服务用于输出消息的数据格式和协议的一组规范。 此类不能被继承。
public ref class OutputBinding sealed : System::Web::Services::Description::MessageBinding
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class OutputBinding : System.Web.Services.Description.MessageBinding
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type OutputBinding = class
inherit MessageBinding
Public NotInheritable Class OutputBinding
Inherits MessageBinding
- 继承
- 继承
- 属性
示例
以下示例演示了类的典型用法 OutputBinding 。
// Used to create OperationBinding instances within 'Binding'.
static OperationBinding^ CreateOperationBinding( String^ operation, String^ targetNamespace )
{
// Create OperationBinding for operation.
OperationBinding^ myOperationBinding = gcnew OperationBinding;
myOperationBinding->Name = operation;
// Create InputBinding for operation.
InputBinding^ myInputBinding = gcnew InputBinding;
SoapBodyBinding^ mySoapBodyBinding = gcnew SoapBodyBinding;
mySoapBodyBinding->Use = SoapBindingUse::Literal;
myInputBinding->Extensions->Add( mySoapBodyBinding );
// Create OutputBinding for operation.
OutputBinding^ myOutputBinding = gcnew OutputBinding;
myOutputBinding->Extensions->Add( mySoapBodyBinding );
// Add InputBinding and OutputBinding to OperationBinding.
myOperationBinding->Input = myInputBinding;
myOperationBinding->Output = myOutputBinding;
// Create an extensibility element for SoapOperationBinding.
SoapOperationBinding^ mySoapOperationBinding = gcnew SoapOperationBinding;
mySoapOperationBinding->Style = SoapBindingStyle::Document;
mySoapOperationBinding->SoapAction = String::Concat( targetNamespace, operation );
// Add the extensibility element SoapOperationBinding to OperationBinding.
myOperationBinding->Extensions->Add( mySoapOperationBinding );
return myOperationBinding;
}
// Used to create OperationBinding instances within 'Binding'.
public static OperationBinding CreateOperationBinding(string operation,
string targetNamespace)
{
// Create OperationBinding for operation.
OperationBinding myOperationBinding = new OperationBinding();
myOperationBinding.Name = operation;
// Create InputBinding for operation.
InputBinding myInputBinding = new InputBinding();
SoapBodyBinding mySoapBodyBinding = new SoapBodyBinding();
mySoapBodyBinding.Use = SoapBindingUse.Literal;
myInputBinding.Extensions.Add(mySoapBodyBinding);
// Create OutputBinding for operation.
OutputBinding myOutputBinding = new OutputBinding();
myOutputBinding.Extensions.Add(mySoapBodyBinding);
// Add InputBinding and OutputBinding to OperationBinding.
myOperationBinding.Input = myInputBinding;
myOperationBinding.Output = myOutputBinding;
// Create an extensibility element for SoapOperationBinding.
SoapOperationBinding mySoapOperationBinding = new SoapOperationBinding();
mySoapOperationBinding.Style = SoapBindingStyle.Document;
mySoapOperationBinding.SoapAction = targetNamespace + operation;
// Add the extensibility element SoapOperationBinding to OperationBinding.
myOperationBinding.Extensions.Add(mySoapOperationBinding);
return myOperationBinding;
}
' Used to create OperationBinding instances within 'Binding'.
Public Shared Function CreateOperationBinding(operation As String, _
targetNamespace As String) As OperationBinding
' Create OperationBinding for operation.
Dim myOperationBinding As New OperationBinding()
myOperationBinding.Name = operation
' Create InputBinding for operation.
Dim myInputBinding As New InputBinding()
Dim mySoapBodyBinding As New SoapBodyBinding()
mySoapBodyBinding.Use = SoapBindingUse.Literal
myInputBinding.Extensions.Add(mySoapBodyBinding)
' Create OutputBinding for operation.
Dim myOutputBinding As New OutputBinding()
myOutputBinding.Extensions.Add(mySoapBodyBinding)
' Add InputBinding and OutputBinding to OperationBinding.
myOperationBinding.Input = myInputBinding
myOperationBinding.Output = myOutputBinding
' Create an extensibility element for SoapOperationBinding.
Dim mySoapOperationBinding As New SoapOperationBinding()
mySoapOperationBinding.Style = SoapBindingStyle.Document
mySoapOperationBinding.SoapAction = targetNamespace & operation
' Add the extensibility element SoapOperationBinding to OperationBinding.
myOperationBinding.Extensions.Add(mySoapOperationBinding)
Return myOperationBinding
End Function 'CreateOperationBinding
注解
该OutputBinding类对应于元素括起来的 <output> Web 服务描述语言(WSDL)<operation>元素,后者又对应于该OperationBinding类。 有关 WSDL 的详细信息,请参阅 WSDL 规范。
构造函数
| 名称 | 说明 |
|---|---|
| OutputBinding() |
初始化 OutputBinding 类的新实例。 |
属性
| 名称 | 说明 |
|---|---|
| Documentation |
获取或设置该实例 DocumentableItem的文本文档。 (继承自 DocumentableItem) |
| DocumentationElement |
获取或设置 . DocumentableItem的文档元素。 (继承自 DocumentableItem) |
| ExtensibleAttributes |
获取或设置一个类型 XmlAttribute 数组,该数组表示 WSDL 的属性扩展,以符合 Web 服务互操作性(WS-I) 基本配置文件 1.1。 (继承自 DocumentableItem) |
| Extensions |
获取与当前 OutputBinding关联的扩展性元素的集合。 |
| Name |
获取或设置 . 的名称 MessageBinding。 (继承自 MessageBinding) |
| Namespaces |
获取或设置构造对象时 ServiceDescription 用于保留命名空间前缀和命名空间的命名空间前缀和命名空间的字典。 (继承自 DocumentableItem) |
| OperationBinding |
OperationBinding获取当前MessageBinding成员所在的成员。 (继承自 MessageBinding) |
方法
| 名称 | 说明 |
|---|---|
| Equals(Object) |
确定指定的对象是否等于当前对象。 (继承自 Object) |
| GetHashCode() |
用作默认哈希函数。 (继承自 Object) |
| GetType() |
获取当前实例的 Type。 (继承自 Object) |
| MemberwiseClone() |
创建当前 Object的浅表副本。 (继承自 Object) |
| ToString() |
返回一个表示当前对象的字符串。 (继承自 Object) |