OperationFormatStyle Enumeration
TOC
Collapse the table of content
Expand the table of content

OperationFormatStyle Enumeration

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

No code example is currently available or this language may not be supported.

Member nameDescription
DocumentCauses the WSDL representation to contain a single element that represents the document that is exchanged for the operation.
RpcCauses the WSDL representation of messages exchanged for an operation and contains parameters as if it were a remote procedure call.

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.

Capabilities

If you use this API in your app, you must specify the following capabilities in the app manifest. Otherwise, your app might not work correctly or it might exit unexpectedly.

ID_CAP_NETWORKING

Windows Phone 8, Windows Phone OS 7.1

For more info, see App capabilities and hardware requirements for Windows Phone 8.

The following code shows how to use this enumeration.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft