OperationFormatUse OperationFormatUse OperationFormatUse OperationFormatUse Enum

Definition

Bestimmt das Format der Nachricht.Determines the format of the message.

public enum class OperationFormatUse
public enum OperationFormatUse
type OperationFormatUse = 
Public Enum OperationFormatUse
Vererbung
OperationFormatUseOperationFormatUseOperationFormatUseOperationFormatUse

Felder

Encoded Encoded Encoded Encoded 1

Bedeutet, dass die Schemen in der WSDL abstrakte Spezifikationen sind, die gemäß den Regeln in SOAP 1.1 Abschnitt 5 codiert werden.Implies that the schemas in the WSDL are abstract specifications that are encoded according to the rules found in SOAP 1.1 section 5.

Literal Literal Literal Literal 0

Deutet an, dass die Nachricht eine Literalinstanz des Schemas in der WSDL ist.Implies that the message is a literal instance of the schema in the WSDL.

Beispiele

Der folgende Code veranschaulicht die Verwendung dieser Enumeration.The following code shows how to use this enumeration.

[ServiceContract(Namespace="http://Microsoft.ServiceModel.Samples"),
XmlSerializerFormat(Style = OperationFormatStyle.Rpc, 
                                 Use = OperationFormatUse.Encoded)]
public interface IUseAndStyleCalculator
{
    [OperationContract]
    double Add(double n1, double n2);
    [OperationContract]
    double Subtract(double n1, double n2);
    [OperationContract]
    double Multiply(double n1, double n2);
    [OperationContract]
    double Divide(double n1, double n2);
}
<ServiceContract(Namespace:="http://Microsoft.ServiceModel.Samples"), _
XmlSerializerFormat(Style:=OperationFormatStyle.Rpc, _
                    Use:=OperationFormatUse.Encoded)> _
Public Interface IUseAndStyleCalculator

    <OperationContract()> _
    Function Add(ByVal n1 As Double, ByVal n2 As Double) As Double

    <OperationContract()> _
    Function Subtract(ByVal n1 As Double, ByVal n2 As Double) As Double

    <OperationContract()> _
    Function Multiply(ByVal n1 As Double, ByVal n2 As Double) As Double

    <OperationContract()> _
    Function Divide(ByVal n1 As Double, ByVal n2 As Double) As Double

End Interface

Hinweise

Der Standardwert ist Literal.The default value is Literal. Literal bedeutet, dass die Nachricht eine literalinstanz des Schemas in der WSDL ist, wie im folgenden Dokument-/Literal-Beispiel gezeigt.Literal means that the message is a literal instance of the schema in the WSDL as shown in the following Document/Literal example.

<Add xmlns="http://Microsoft.ServiceModel.Samples">  
  <n1>100</n1>  
  <n2>15.99</n2>  
 </Add>  

Encoded bedeutet, dass die Schemen in der WSDL abstrakte Spezifikationen sind, die gemäß den Regeln in SOAP 1.1, Abschnitt 5 codiert werden.Encoded means that the schemas in the WSDL are abstract specifications that are encoded according to the rules found in SOAP 1.1 section 5. Es folgt ein RPC/Encoded-Beispiel.The following is an RPC/Encoded example.

<q1:Add xmlns:q1="http://Microsoft.ServiceModel.Samples">  
  <n1 xsi:type="xsd:double" xmlns="">100</n1>  
  <n2 xsi:type="xsd:double" xmlns="">15.99</n2>  
 </q1:Add>  

Verwenden Sie System.ServiceModel.XmlSerializerFormatAttribute, um diesen Wert festzulegen.Use the System.ServiceModel.XmlSerializerFormatAttribute to set this value.

Gilt für: