WebService.SoapVersion 属性

定义

获取用于向 XML Web services 发送 SOAP 请求的 SOAP 协议的版本。Gets the version of the SOAP protocol used to make the SOAP request to the XML Web service.

public:
 property System::Web::Services::Protocols::SoapProtocolVersion SoapVersion { System::Web::Services::Protocols::SoapProtocolVersion get(); };
[System.ComponentModel.Browsable(false)]
[System.Runtime.InteropServices.ComVisible(false)]
public System.Web.Services.Protocols.SoapProtocolVersion SoapVersion { get; }
member this.SoapVersion : System.Web.Services.Protocols.SoapProtocolVersion
Public ReadOnly Property SoapVersion As SoapProtocolVersion

属性值

SoapProtocolVersion 值之一。One of the SoapProtocolVersion values. 默认值为 DefaultThe default is Default.

属性

注解

如果未使用 SOAP 协议与 XML Web service (如 http GET 或 http POST) 进行通信, 则SoapVersion属性的值为。 DefaultIf the SOAP protocol was not used to communicate with the XML Web service, such as HTTP-GET or HTTP-POST, the value of the SoapVersion property is Default.

对于不是WebService从类派生的 XML Web services, 还可以使用HttpContext.Items属性的 "WebServiceSoapVersion" 项访问用于向 XML Web service 发出 soap 请求的 soap 协议的版本。For XML Web services that do not derive from the WebService class, the version of the SOAP protocol used to make the SOAP request to the XML Web service can be also be accessed using the "WebServiceSoapVersion" entry of the HttpContext.Items property. 该条目的类型SoapProtocolVersion为。That entry is of type SoapProtocolVersion.

适用于

另请参阅