SoapHeader.DidUnderstand プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SoapHeader.DidUnderstand プロパティの意味・解説 

SoapHeader.DidUnderstand プロパティ

XML Web サービス メソッドSOAP ヘッダー適切に処理したかどうかを示す値を取得または設定します

名前空間: System.Web.Services.Protocols
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Dim instance As SoapHeader
Dim value As Boolean

value = instance.DidUnderstand

instance.DidUnderstand = value
public bool DidUnderstand { get;
 set; }
public:
property bool DidUnderstand {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_DidUnderstand ()

/** @property */
public void set_DidUnderstand (boolean value)
public function get DidUnderstand
 () : boolean

public function set DidUnderstand
 (value : boolean)

プロパティ
SOAP ヘッダー適切に処理され場合trueそれ以外場合false

解説解説
使用例使用例

MyWebService XML Web サービスMyHeader SOAP ヘッダー定義しMyWebMethod XML Web サービス メソッドへの呼び出しと共に送信されるようにする例を次に示しますまた、MyWebMethodMyHeader SOAP ヘッダー以外のすべての SOAP ヘッダー受信しますMyWebMethod処理できる SOAP ヘッダー場合DidUnderstandtrue設定されています。

<%@ WebService Language="VB" Class="MyWebService"%>

Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Xml
Imports System

' Define a SOAP header by deriving from the SoapHeader base class.
Public Class MyHeader
    Inherits SoapHeader
    Public MyValue As String
End Class

Public Class MyWebService
    
    Public theHeader As MyHeader
    ' Receive all SOAP headers besides the MyHeader SOAP header.
    Public unknownHeaders() As SoapUnknownHeader
    

    'Receive any SOAP headers other than MyHeader.    
    <WebMethod, _
     SoapHeader("theHeader", Direction := SoapHeaderDirection.InOut),
 _
     SoapHeader("unknownHeaders")> _
    Public Function MyWebMethod() As
 String
                
        Dim header As SoapUnknownHeader
        For Each header In
 unknownHeaders
            ' Perform some processing on the header.
            If header.Element.Name = "MyKnownHeader"
 Then
                header.DidUnderstand = True
            Else
                ' For those headers that cannot be
                ' processed, set the DidUnderstand propert to false.
                header.DidUnderstand = False
            End If
        Next header
        Return "Hello"
    End Function
    
End Class

<%@ WebService Language="C#" Class="MyWebService"%>
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml;
using System;

// Define a SOAP header by deriving from the SoapHeader base class.

public class MyHeader : SoapHeader {
    public string MyValue;
}

public class MyWebService {

    public MyHeader myHeader;
    // Receive all SOAP headers besides the MyHeader SOAP header.
    public SoapUnknownHeader[] unknownHeaders;
 
    [WebMethod]
    [SoapHeader("myHeader", Direction=SoapHeaderDirection.InOut)]

    //Receive any SOAP headers other than MyHeader.
    [SoapHeader("unknownHeaders",Required=false)]

    public string MyWebMethod() {

       foreach (SoapUnknownHeader header in
 unknownHeaders) {
           // Perform some processing on the header.
       if (header.Element.Name == "MyKnownHeader")
               header.DidUnderstand = true;
       else
                // For those headers that cannot be  
                // processed, set the DidUnderstand property to false.
                header.DidUnderstand = false;
       }
       return "Hello";
    }
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapHeader クラス
SoapHeader メンバ
System.Web.Services.Protocols 名前空間
MustUnderstand
SoapHeaderException


このページでは「.NET Framework クラス ライブラリ リファレンス」からSoapHeader.DidUnderstand プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSoapHeader.DidUnderstand プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSoapHeader.DidUnderstand プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SoapHeader.DidUnderstand プロパティ」の関連用語

SoapHeader.DidUnderstand プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SoapHeader.DidUnderstand プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS