MessageVersion.CreateVersion Method

Definition

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

Overloads

CreateVersion(EnvelopeVersion)

Creates a message version object by using WS-Addressing 1.0 and with a specified SOAP version.

CreateVersion(EnvelopeVersion, AddressingVersion)

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

CreateVersion(EnvelopeVersion)

Source:
MessageVersion.cs
Source:
MessageVersion.cs

Creates a message version object by using WS-Addressing 1.0 and with a specified SOAP version.

C#
public static System.ServiceModel.Channels.MessageVersion CreateVersion(System.ServiceModel.EnvelopeVersion envelopeVersion);

Parameters

envelopeVersion
EnvelopeVersion

The EnvelopeVersion that indicates the SOAP version to be used.

Returns

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

Exceptions

The envelopeVersion is null.

Examples

C#
msgVersion = MessageVersion.CreateVersion(envVersion);

Remarks

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.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

CreateVersion(EnvelopeVersion, AddressingVersion)

Source:
MessageVersion.cs
Source:
MessageVersion.cs

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

C#
public static System.ServiceModel.Channels.MessageVersion CreateVersion(System.ServiceModel.EnvelopeVersion envelopeVersion, System.ServiceModel.Channels.AddressingVersion addressingVersion);

Parameters

envelopeVersion
EnvelopeVersion

The EnvelopeVersion that indicates the SOAP version.

addressingVersion
AddressingVersion

The AddressingVersion that indicates the WS-Addressing version.

Returns

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

Exceptions

envelopeVersion or addressingVersion is null.

Examples

C#
msgVersion = MessageVersion.CreateVersion(envVersion, addrVersion);

Remarks

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.

Applies to

.NET 10 (package-provided) and other versions
Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0