Soap12FaultCodes.VersionMismatchFaultCode 字段
定义
表示 SOAP 1.2 版 VersionMismatch 错误代码,用于指示 XML Web services 希望接收符合 SOAP 1.2 规范的 SOAP 消息,但收到一条符合 SOAP 1.1 规范的 SOAP 消息。Represents the SOAP version 1.2 VersionMismatch fault code indicating the XML Web service expected SOAP messages conforming to the SOAP 1.2 specification, yet received one conforming to SOAP 1.1.
public: static initonly System::Xml::XmlQualifiedName ^ VersionMismatchFaultCode;
public static readonly System.Xml.XmlQualifiedName VersionMismatchFaultCode;
staticval mutable VersionMismatchFaultCode : System.Xml.XmlQualifiedName
Public Shared ReadOnly VersionMismatchFaultCode As XmlQualifiedName
字段值
注解
SoapException Code Soap12FaultCodes.VersionMismatchFaultCode 如果 XML Web service 配置为仅接受 soap 1.2 请求并收到 soap 1.1 消息,则将引发,并将属性设置为。A SoapException is thrown with the Code property set to Soap12FaultCodes.VersionMismatchFaultCode when an XML Web service is configured to only accept SOAP 1.2 requests and it receives a SOAP 1.1 message. 同样,如果 XML Web service 配置为仅接受 SOAP 1.1 消息并收到 SOAP 1.2 消息,则会引发,并将 SoapException Code 属性设置为 SoapException.VersionMismatchFaultCode 。Likewise, if an XML Web service is configured to accept only SOAP 1.1 messages and it receives a SOAP 1.2 message, a SoapException is thrown with the Code property set to SoapException.VersionMismatchFaultCode. 有关配置 XML Web services 的详细信息,请参阅 使用 ASP.NET 创建的 XML Web services 的配置选项。For details on configuring XML Web services, see Configuration Options for XML Web Services Created Using ASP.NET.
SOAP 1.1 和1.2 都定义了 VersionMismatch 与所需 soap 协议版本不同的 soap 错误代码。Both SOAP 1.1 and 1.2 define VersionMismatch SOAP fault codes that differ on the version of the SOAP protocol expected. 此字段表示 SOAP 1.2 版本,而 SOAP 1.1 版本由表示 VersionMismatchFaultCode 。This field represents the SOAP 1.2 version, whereas the SOAP 1.1 version is represented by VersionMismatchFaultCode. 这两个字段映射到不同的限定名称,但你可以 Code 通过调用方法来检查该属性是否为错误代码之一 IsVersionMismatchFaultCode 。The two fields map to different qualified names, but you can check whether the Code property is either one of the fault codes by calling the IsVersionMismatchFaultCode method.