MessageVersion.CreateVersion 方法

定义

使用指定版本的 SOAP 信封和 WS-Addressing 创建消息版本对象。

重载

CreateVersion(EnvelopeVersion)

使用 WS-Addressing 1.0 和指定的 SOAP 版本创建消息版本对象。

CreateVersion(EnvelopeVersion, AddressingVersion)

使用指定的 SOAP 和 WS-Addressing 版本创建消息版本对象。

CreateVersion(EnvelopeVersion)

使用 WS-Addressing 1.0 和指定的 SOAP 版本创建消息版本对象。

public:
 static System::ServiceModel::Channels::MessageVersion ^ CreateVersion(System::ServiceModel::EnvelopeVersion ^ envelopeVersion);
public static System.ServiceModel.Channels.MessageVersion CreateVersion (System.ServiceModel.EnvelopeVersion envelopeVersion);
static member CreateVersion : System.ServiceModel.EnvelopeVersion -> System.ServiceModel.Channels.MessageVersion
Public Shared Function CreateVersion (envelopeVersion As EnvelopeVersion) As MessageVersion

参数

envelopeVersion
EnvelopeVersion

EnvelopeVersion,指示要使用的 SOAP 版本。

返回

MessageVersion,它使用指定版本的 SOAP 和 WS-Addressing 1.0。

例外

envelopeVersionnull

示例

msgVersion = MessageVersion.CreateVersion(envVersion);
msgVersion = MessageVersion.CreateVersion(envVersion)

注解

目前可用的 SOAP 版本为 SOAP 1.1 和 SOAP 1.2。 每个 SOAP 版本都有一个 EnvelopeVersion,其中包含与它的使用相关的数据。

适用于

CreateVersion(EnvelopeVersion, AddressingVersion)

使用指定的 SOAP 和 WS-Addressing 版本创建消息版本对象。

public:
 static System::ServiceModel::Channels::MessageVersion ^ CreateVersion(System::ServiceModel::EnvelopeVersion ^ envelopeVersion, System::ServiceModel::Channels::AddressingVersion ^ addressingVersion);
public static System.ServiceModel.Channels.MessageVersion CreateVersion (System.ServiceModel.EnvelopeVersion envelopeVersion, System.ServiceModel.Channels.AddressingVersion addressingVersion);
static member CreateVersion : System.ServiceModel.EnvelopeVersion * System.ServiceModel.Channels.AddressingVersion -> System.ServiceModel.Channels.MessageVersion
Public Shared Function CreateVersion (envelopeVersion As EnvelopeVersion, addressingVersion As AddressingVersion) As MessageVersion

参数

envelopeVersion
EnvelopeVersion

指示 SOAP 版本的 EnvelopeVersion

addressingVersion
AddressingVersion

指示 WS-Addressing 版本的 AddressingVersion

返回

MessageVersion,它使用指定版本的 WS-Addressing 和 SOAP。

例外

envelopeVersionaddressingVersionnull

示例

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

注解

目前可用的 SOAP 版本为 SOAP 1.1 和 SOAP 1.2。 每个 SOAP 版本都有一个 EnvelopeVersion,其中包含与它的使用相关的数据。

目前,有两个 WS-Addressing 版本可用。 一个版本于 2004 年 8 月 10 日提交,另一个版本于 2005 年 8 月提交,称为 WS-Addressing 1.0 协议。

适用于