Compartir a través de


OperationFormatStyle Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents the SOAP style that determines how the WSDL metadata for the service is formatted.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

Syntax

'Declaration
Public Enumeration OperationFormatStyle
public enum OperationFormatStyle

Members

Member name Description
Supported by Silverlight for Windows Phone Document Causes the WSDL representation to contain a single element that represents the document that is exchanged for the operation.
Supported by Silverlight for Windows Phone Rpc Causes the WSDL representation of messages exchanged for an operation and contains parameters as if it were a remote procedure call.

Remarks

By default, the message body is formatted with the style set to Document. The style RPC means that the WSDL representation of messages exchanged for an operation contains parameters as if it were a remote procedure call. The following is an example.

  <wsdl:message name="IUseAndStyleCalculator_Add_InputMessage">
    <wsdl:part name="n1" type="xsd:double"/>
    <wsdl:part name="n2" type="xsd:double"/>
  </wsdl:message>

Setting the style to Document means that the WSDL representation contains a single element that represents the document that is exchanged for an operation, as shown in the following example.

  <wsdl:message name="IUseAndStyleCalculator_Add_InputMessage">
    <wsdl:part name="parameters" element="tns:Add"/>
  </wsdl:message>

Use the System.ServiceModel.XmlSerializerFormatAttribute to set this value.

Examples

The following code shows how to use this enumeration.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference