OutputBinding Klasa
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Udostępnia zestaw specyfikacji formatów danych i protokołów używanych przez usługę sieci Web XML dla komunikatów wyjściowych. Klasa ta nie może być dziedziczona.
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
- Dziedziczenie
- Dziedziczenie
- Atrybuty
Przykłady
W poniższym przykładzie przedstawiono typowe użycie OutputBinding klasy.
// 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
Uwagi
Klasa OutputBinding odpowiada elementowi Web Services Description Language (WSDL) <output> ujętemu <operation> w element, który z kolei odpowiada OperationBinding klasie. Aby uzyskać więcej informacji na temat języka WSDL, zobacz specyfikację WSDL .
Konstruktorów
| Nazwa | Opis |
|---|---|
| OutputBinding() |
Inicjuje nowe wystąpienie klasy OutputBinding. |
Właściwości
| Nazwa | Opis |
|---|---|
| Documentation |
Pobiera lub ustawia dokumentację tekstu dla wystąpienia klasy DocumentableItem. (Dziedziczone od DocumentableItem) |
| DocumentationElement |
Pobiera lub ustawia element dokumentacji dla elementu DocumentableItem. (Dziedziczone od DocumentableItem) |
| ExtensibleAttributes |
Pobiera lub ustawia tablicę typu XmlAttribute , która reprezentuje rozszerzenia atrybutów WSDL w celu zachowania zgodności z współdziałaniem usług sieci Web (WS-I) Profilu podstawowego 1.1. (Dziedziczone od DocumentableItem) |
| Extensions |
Pobiera kolekcję elementów rozszerzalności skojarzonych z bieżącym OutputBindingelementem . |
| Name |
Pobiera lub ustawia nazwę elementu MessageBinding. (Dziedziczone od MessageBinding) |
| Namespaces |
Pobiera lub ustawia słownik prefiksów przestrzeni nazw i przestrzeni nazw używanych do zachowywania prefiksów przestrzeni nazw i przestrzeni nazw podczas ServiceDescription konstruowania obiektu. (Dziedziczone od DocumentableItem) |
| OperationBinding |
OperationBinding Pobiera element, z którego bieżący MessageBinding jest elementem członkowskim. (Dziedziczone od MessageBinding) |
Metody
| Nazwa | Opis |
|---|---|
| Equals(Object) |
Określa, czy dany obiekt jest taki sam, jak bieżący obiekt. (Dziedziczone od Object) |
| GetHashCode() |
Służy jako domyślna funkcja skrótu. (Dziedziczone od Object) |
| GetType() |
Type Pobiera bieżące wystąpienie. (Dziedziczone od Object) |
| MemberwiseClone() |
Tworzy płytkią kopię bieżącego Objectelementu . (Dziedziczone od Object) |
| ToString() |
Zwraca ciąg reprezentujący bieżący obiekt. (Dziedziczone od Object) |