Partager via


OutputBinding Classe

Définition

Fournit un ensemble de spécifications pour des formats de données et des protocoles utilisés par le service Web XML pour des messages de sortie. Cette classe ne peut pas être héritée.

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
Héritage
Héritage
Attributs

Exemples

L’exemple suivant illustre une utilisation classique de la OutputBinding classe .

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

Remarques

La OutputBinding classe correspond à l’élément WSDL (Web Services Description Language) <output> inclus dans l’élément <operation> , qui à son tour correspond à la OperationBinding classe . Pour plus d’informations sur WSDL, consultez la spécification WSDL.

Constructeurs

OutputBinding()

Initialise une nouvelle instance de la classe OutputBinding.

Propriétés

Documentation

Obtient ou définit la documentation pour l'instance de DocumentableItem.

(Hérité de DocumentableItem)
DocumentationElement

Obtient ou définit l'élément documentation pour DocumentableItem.

(Hérité de DocumentableItem)
ExtensibleAttributes

Obtient ou définit un tableau de type XmlAttribute qui représente des extensions d'attribut de WSDL pour se conformer au Basic Profile 1.1 du WS-I (Web Services Interoperability).

(Hérité de DocumentableItem)
Extensions

Obtient la collection d'éléments d'extensibilité associée à OutputBinding en cours.

Name

Obtient ou définit le nom de l'objet MessageBinding.

(Hérité de MessageBinding)
Namespaces

Obtient ou définit le dictionnaire de préfixes d'espace de noms et d'espaces de noms utilisé pour conserver des préfixes d'espace de noms et des espaces de noms lorsqu'un objet ServiceDescription est construit.

(Hérité de DocumentableItem)
OperationBinding

Obtient OperationBinding dont MessageBinding en cours est membre.

(Hérité de MessageBinding)

Méthodes

Equals(Object)

Détermine si l'objet spécifié est égal à l'objet actuel.

(Hérité de Object)
GetHashCode()

Fait office de fonction de hachage par défaut.

(Hérité de Object)
GetType()

Obtient le Type de l'instance actuelle.

(Hérité de Object)
MemberwiseClone()

Crée une copie superficielle du Object actuel.

(Hérité de Object)
ToString()

Retourne une chaîne qui représente l'objet actuel.

(Hérité de Object)

S’applique à