MessageVersion.CreateVersion Method (EnvelopeVersion, AddressingVersion)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Creates a message version object with specified SOAP and WS-Addressing versions.

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

public static MessageVersion CreateVersion(
	EnvelopeVersion envelopeVersion,
	AddressingVersion addressingVersion
)

Parameters

envelopeVersion
Type: System.ServiceModel.EnvelopeVersion

The EnvelopeVersion that indicates the SOAP version.

addressingVersion
Type: System.ServiceModel.Channels.AddressingVersion

The AddressingVersion that indicates the WS-Addressing version.

Return Value

Type: System.ServiceModel.Channels.MessageVersion

The MessageVersion using the specified versions of WS-Addressing and SOAP.

Exception Condition
ArgumentNullException

envelopeVersion or addressingVersion is null.

The SOAP versions currently available are SOAP 1.1 and SOAP 1.2. There is an EnvelopeVersion for each version of SOAP that contains the data relevant to its use.

There are currently two versions of WS-Addressing available. One submitted 10 August 2004 and the other submitted August 2005 and referred to as the WS-Addressing 1.0 protocol.

msgVersion = MessageVersion.CreateVersion(envVersion, addrVersion);

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: