MessageVersion Class

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

Specifies the versions of SOAP and WS-Addressing associated with a message and its exchange.

Inheritance Hierarchy

System.Object
  System.ServiceModel.Channels.MessageVersion

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

Syntax

'Declaration
Public NotInheritable Class MessageVersion
public sealed class MessageVersion

The MessageVersion type exposes the following members.

Properties

  Name Description
Public propertySupported by Silverlight for Windows Phone Addressing Gets the version of WS-Addressing that is associated with the current message version.
Public propertyStatic memberSupported by Silverlight for Windows Phone Default Gets the default message version used by Silverlight.
Public propertySupported by Silverlight for Windows Phone Envelope Gets the SOAP version associated with the current message version.
Public propertyStatic memberSupported by Silverlight for Windows Phone None Gets the message version that does not use SOAP or WS-Addressing.
Public propertyStatic memberSupported by Silverlight for Windows Phone Soap11 Gets the message version using SOAP 1.1.
Public propertyStatic memberSupported by Silverlight for Windows Phone Soap12WSAddressing10 Gets the message version using WS-Addressing 1.0 and SOAP 1.2.

Top

Methods

  Name Description
Public methodStatic memberSupported by Silverlight for Windows Phone CreateVersion(EnvelopeVersion) Creates a message version object by using WS-Addressing 1.0 and with a specified SOAP version.
Public methodStatic memberSupported by Silverlight for Windows Phone CreateVersion(EnvelopeVersion, AddressingVersion) Creates a message version object with specified WS-Addressing and SOAP versions.
Public methodSupported by Silverlight for Windows Phone Equals Returns a value that indicates whether the current message version is equal to a specified object. (Overrides Object.Equals(Object).)
Protected methodSupported by Silverlight for Windows Phone Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetHashCode Gets a hash code for the current message version. (Overrides Object.GetHashCode().)
Public methodSupported by Silverlight for Windows Phone GetType Gets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Silverlight for Windows Phone MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone ToString The current message version. (Overrides Object.ToString().)

Top

Remarks

The MessageVersion contains the versioning information both about the SOAP envelope and the addressing protocol that is used by a message. An instance of Message is bound upon creation to a specific MessageVersion by passing the version as a parameter into one of the CreateMessage overloads.

All the static "get" properties in this class indicate the possible message versions supported by the Silverlight 5 runtime.

There are currently two SOAP envelope versions available: SOAP 1.1 and SOAP 1.2. These versions of SOAP are represented by EnvelopeVersion and are returned by the Soap11 and Soap12WSAddressing10 properties. The version of SOAP associated with the MessageVersion can be recovered by using the Envelope property.

For more information, see

the schema for SOAP 1.1 and SOAP 1.2.

There is currently one version of WS-Addressing supported by the Silverlight 5 runtime: the one specified in the WS-Addressing 1.0 protocol. The address version used by the current message version can be recovered using the Addressing property. The version of WS-Addressing is represented by AddressingVersion and is returned by the WSAddressing10 property. The 9 May 2006 W3C Recommendation for WS-Addressing 1.0 - Core is available at 9 May 2006 W3C WS-Addressing 1.0 - Core.

The None property provides support for using "plain old XML" (POX)-style messaging. Enabling basic POX messaging is now a matter of setting up an HTTP binding on your service with a text encoder that uses the None property.

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.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.