通过


SoapHeaderAttribute.Required 属性

定义

注意

This property will be removed from a future version. The presence of a particular header in a SOAP message is no longer enforced

此成员已过时,没有功能。

public:
 property bool Required { bool get(); void set(bool value); };
[System.Obsolete("This property will be removed from a future version. The presence of a particular header in a SOAP message is no longer enforced", false)]
public bool Required { get; set; }
[<System.Obsolete("This property will be removed from a future version. The presence of a particular header in a SOAP message is no longer enforced", false)>]
member this.Required : bool with get, set
Public Property Required As Boolean

属性值

一个 Boolean 值。

属性

注解

若要验证 SOAP 标头是否已发送到 XML Web 服务,请确认属性 MemberName 中指定的成员是否为 nullnull如果是,则未发送 SOAP 标头。

在 .NET Framework SDK 的版本 1.0 中, Required 该属性指示接收方 XML Web 服务还是 XML Web 服务客户端必须理解和处理 SOAP 标头。 如果收件人未处理 SOAP 标头,则会引发异常。

适用于