OutputBinding Klasse
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Stellt eine Reihe von Spezifikationen für Datenformate und Protokolle bereit, die vom XML-Webdienst für Ausgabemeldungen verwendet werden. Diese Klasse kann nicht vererbt werden.
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
- Vererbung
- Vererbung
- Attribute
Beispiele
Im folgenden Beispiel wird eine typische Verwendung der OutputBinding Klasse veranschaulicht.
// 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
Hinweise
Die OutputBinding Klasse entspricht dem vom Element eingeschlossenen <operation> Web Services Description Language (WSDL)<output>-Element, das wiederum der OperationBinding Klasse entspricht. Weitere Informationen zu WSDL finden Sie in der WSDL-Spezifikation .
Konstruktoren
| Name | Beschreibung |
|---|---|
| OutputBinding() |
Initialisiert eine neue Instanz der OutputBinding-Klasse. |
Eigenschaften
| Name | Beschreibung |
|---|---|
| Documentation |
Ruft die Textdokumentation für die Instanz der DocumentableItem. (Geerbt von DocumentableItem) |
| DocumentationElement |
Ruft ab oder legt das Dokumentationselement für die DocumentableItem. (Geerbt von DocumentableItem) |
| ExtensibleAttributes |
Dient zum Abrufen oder Festlegen eines Arrays vom Typ XmlAttribute , das Attributerweiterungen von WSDL darstellt, um web Services Interoperability (WS-I) Basic Profile 1.1 einzuhalten. (Geerbt von DocumentableItem) |
| Extensions |
Ruft die Auflistung der Erweiterbarkeitselemente ab, die dem aktuellen OutputBindingzugeordnet sind. |
| Name |
Dient zum Abrufen oder Festlegen des Namens der MessageBinding. (Geerbt von MessageBinding) |
| Namespaces |
Ruft das Wörterbuch der Namespacepräfixe und Namespaces ab, die zum Beibehalten von Namespacepräfixen und Namespaces verwendet werden, wenn ein ServiceDescription Objekt erstellt wird, oder legt es fest. (Geerbt von DocumentableItem) |
| OperationBinding |
Ruft ab OperationBinding , von dem das aktuelle MessageBinding Mitglied ist. (Geerbt von MessageBinding) |
Methoden
| Name | Beschreibung |
|---|---|
| Equals(Object) |
Bestimmt, ob das angegebene Objekt gleich dem aktuellen Objekt ist. (Geerbt von Object) |
| GetHashCode() |
Dient als Standardhashfunktion. (Geerbt von Object) |
| GetType() |
Ruft die Type der aktuellen Instanz ab. (Geerbt von Object) |
| MemberwiseClone() |
Erstellt eine flache Kopie der aktuellen Object. (Geerbt von Object) |
| ToString() |
Gibt eine Zeichenfolge zurück, die das aktuelle Objekt darstellt. (Geerbt von Object) |