OutputBinding Класс
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Предоставляет набор спецификаций для форматов данных и протоколов, используемых веб-службой XML для выходных сообщений. Этот класс не наследуется.
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 соответствует элементу языка описания веб-служб (WSDL), <output> заключенному <operation> элементом, который, в свою очередь, соответствует классу OperationBinding . Дополнительные сведения о WSDL см. в спецификации WSDL .
Конструкторы
| Имя | Описание |
|---|---|
| OutputBinding() |
Инициализирует новый экземпляр класса OutputBinding. |
Свойства
| Имя | Описание |
|---|---|
| Documentation |
Возвращает или задает текстовую документацию для экземпляра DocumentableItemобъекта . (Унаследовано от DocumentableItem) |
| DocumentationElement |
Возвращает или задает элемент документации для элемента DocumentableItem. (Унаследовано от DocumentableItem) |
| ExtensibleAttributes |
Возвращает или задает массив типа XmlAttribute , представляющий расширения атрибутов WSDL для соответствия требованиям взаимодействия веб-служб (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) |