MessageVersion.CreateVersion 方法
定义
使用指定版本的 SOAP 信封和 WS-Addressing 创建消息版本对象。Creates a message version object with specified versions of the SOAP envelope and WS-Addressing.
重载
| CreateVersion(EnvelopeVersion) |
使用 WS-Addressing 1.0 和指定的 SOAP 版本创建消息版本对象。Creates a message version object by using WS-Addressing 1.0 and with a specified SOAP version. |
| CreateVersion(EnvelopeVersion, AddressingVersion) |
使用指定的 SOAP 和 WS-Addressing 版本创建消息版本对象。Creates a message version object with specified SOAP and WS-Addressing versions. |
CreateVersion(EnvelopeVersion)
使用 WS-Addressing 1.0 和指定的 SOAP 版本创建消息版本对象。Creates a message version object by using WS-Addressing 1.0 and with a specified SOAP version.
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 版本。The EnvelopeVersion that indicates the SOAP version to be used.
返回
MessageVersion,它使用指定版本的 SOAP 和 WS-Addressing 1.0。The MessageVersion using the specified version of SOAP and WS-Addressing 1.0.
例外
envelopeVersion 为 null。The envelopeVersion is null.
示例
msgVersion = MessageVersion.CreateVersion(envVersion);
msgVersion = MessageVersion.CreateVersion(envVersion)
注解
目前可用的 SOAP 版本为 SOAP 1.1 和 SOAP 1.2。The SOAP versions currently available are SOAP 1.1 and SOAP 1.2. 每个 SOAP 版本都有一个 EnvelopeVersion,其中包含与它的使用相关的数据。There is an EnvelopeVersion for each version of SOAP that contains the data relevant to its use.
适用于
CreateVersion(EnvelopeVersion, AddressingVersion)
使用指定的 SOAP 和 WS-Addressing 版本创建消息版本对象。Creates a message version object with specified SOAP and WS-Addressing versions.
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。The EnvelopeVersion that indicates the SOAP version.
- addressingVersion
- AddressingVersion
指示 WS-Addressing 版本的 AddressingVersion。The AddressingVersion that indicates the WS-Addressing version.
返回
MessageVersion,它使用指定版本的 WS-Addressing 和 SOAP。The MessageVersion using the specified versions of WS-Addressing and SOAP.
例外
envelopeVersion 或 addressingVersion 为 null。envelopeVersion or addressingVersion is null.
示例
msgVersion = MessageVersion.CreateVersion(envVersion, addrVersion);
msgVersion = MessageVersion.CreateVersion(envVersion, addrVersion)
注解
目前可用的 SOAP 版本为 SOAP 1.1 和 SOAP 1.2。The SOAP versions currently available are SOAP 1.1 and SOAP 1.2. 每个 SOAP 版本都有一个 EnvelopeVersion,其中包含与它的使用相关的数据。There is an EnvelopeVersion for each version of SOAP that contains the data relevant to its use.
目前,有两个 WS-Addressing 版本可用。There are currently two versions of WS-Addressing available. 一个版本于 2004 年 8 月 10 日提交,另一个版本于 2005 年 8 月提交,称为 WS-Addressing 1.0 协议。One submitted 10 August 2004 and the other submitted August 2005 and referred to as the WS-Addressing 1.0 protocol.