WebMessageBodyStyle Enumeration

An enumeration that specifies whether to wrap parameter and return values within XML elements.

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

public enum WebMessageBodyStyle

Member nameDescription
BareBoth requests and responses are not wrapped.
WrappedBoth requests and responses are wrapped.
WrappedRequestRequests are wrapped, responses are not wrapped.
WrappedResponseResponses are wrapped, requests are not wrapped.

When the service or client serializes parameters and return values to a message, it writes them within infrastructure-provided XML elements. These XML elements are said to wrap the values. Sometimes developers do not want to wrap these extra XML elements around the serialized values. The WebMessageBodyStyle enumeration specifies whether to wrap parameters and return values.

This enumeration is used with the WebGetAttribute and the WebInvokeAttribute to control how the data passed to and from an operation appears on the wire. Both attributes default to Bare.


Supported in: 5, 4

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

Community Additions