OutputBinding Klasa

Definicja

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 .

Konstruktory

OutputBinding()

Inicjuje nowe wystąpienie klasy OutputBinding.

Właściwości

Documentation

Pobiera lub ustawia dokumentację tekstu dla wystąpienia klasy DocumentableItem.

(Odziedziczone po DocumentableItem)
DocumentationElement

Pobiera lub ustawia element dokumentacji dla elementu DocumentableItem.

(Odziedziczone po 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.

(Odziedziczone po DocumentableItem)
Extensions

Pobiera kolekcję elementów rozszerzalności skojarzonych z bieżącym OutputBindingelementem .

Name

Pobiera lub ustawia nazwę elementu MessageBinding.

(Odziedziczone po 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.

(Odziedziczone po DocumentableItem)
OperationBinding

OperationBinding Pobiera element, z którego bieżący MessageBinding jest elementem członkowskim.

(Odziedziczone po MessageBinding)

Metody

Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetType()

Type Pobiera bieżące wystąpienie.

(Odziedziczone po Object)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)

Dotyczy