InputBinding 类

定义

提供一组由 XML Web services 用于输入消息的数据格式和协议规范。Provides a set of specifications for data formats and protocols used by the XML Web service for input messages. 此类不能被继承。This class cannot be inherited.

public ref class InputBinding sealed : System::Web::Services::Description::MessageBinding
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class InputBinding : System.Web.Services.Description.MessageBinding
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type InputBinding = class
    inherit MessageBinding
Public NotInheritable Class InputBinding
Inherits MessageBinding
继承
继承
属性

示例

下面的示例演示类的典型用法 InputBindingThe following example demonstrates a typical use of the InputBinding class.

// 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

注解

InputBinding类对应于 Web 服务描述语言 (WSDL) <input> 元素,该元素由元素括起来 <operation> ,后者又与类相对应 OperationBindingThe InputBinding class corresponds to the Web Services Description Language (WSDL) <input> element enclosed by the <operation> element, which in turn corresponds to the OperationBinding class. 有关 WSDL 的更多信息,请参阅 WSDL 规范。For more information about WSDL, see the WSDL specification.

构造函数

InputBinding()

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

属性

Documentation

获取或设置 DocumentableItem 的实例的文本文档。Gets or sets the text documentation for the instance of the DocumentableItem.

(继承自 DocumentableItem)
DocumentationElement

获取或设置 DocumentableItem 的文档元素。Gets or sets the documentation element for the DocumentableItem.

(继承自 DocumentableItem)
ExtensibleAttributes

获取或设置类型为 XmlAttribute 的数组,该数组表示为符合 Web 服务互操作性 (WS-I) 基本概要 1.1 而进行的 WSDL 特性扩展。Gets or sets an array of type XmlAttribute that represents attribute extensions of WSDL to comply with Web Services Interoperability (WS-I) Basic Profile 1.1.

(继承自 DocumentableItem)
Extensions

获取与当前 InputBinding 关联的扩展性元素的集合。Gets the collection of extensibility elements associated with the current InputBinding.

Name

获取或设置 MessageBinding 的名称。Gets or sets the name of the MessageBinding.

(继承自 MessageBinding)
Namespaces

获取或设置命名空间前缀和命名空间的字典,该字典用于在构造 ServiceDescription 对象时,保留命名空间的前缀和命名空间。Gets or sets the dictionary of namespace prefixes and namespaces used to preserve namespace prefixes and namespaces when a ServiceDescription object is constructed.

(继承自 DocumentableItem)
OperationBinding

获取当前 OperationBinding 为其成员的 MessageBindingGets the OperationBinding of which the current MessageBinding is a member.

(继承自 MessageBinding)

方法

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)

适用于