MessageVersion.CreateVersion 方法

定义

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

重载

名称 说明
CreateVersion(EnvelopeVersion)

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

CreateVersion(EnvelopeVersion, AddressingVersion)

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

CreateVersion(EnvelopeVersion)

Source:
MessageVersion.cs
Source:
MessageVersion.cs
Source:
MessageVersion.cs

使用 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)

Source:
MessageVersion.cs
Source:
MessageVersion.cs
Source:
MessageVersion.cs

使用指定的 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

指示 EnvelopeVersion SOAP 版本。

addressingVersion
AddressingVersion

指示 AddressingVersion WS-Addressing 版本。

返回

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 协议。

适用于