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

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

SoapHeader.MustUnderstand プロパティ

SoapHeader を認識する必要があるかどうかを示す値を取得または設定します。

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

Dim instance As SoapHeader
Dim value As Boolean

value = instance.MustUnderstand

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

/** @property */
public void set_MustUnderstand (boolean value)
public function get MustUnderstand
 () : boolean

public function set MustUnderstand
 (value : boolean)

プロパティ値
XML Web サービスが SoapHeader を適切に解釈して処理する必要がある場合は true。それ以外の場合は false。既定値は false です。

解説解説
使用例使用例

XML Web サービス クライアントが、MyHeader 型のカスタム SOAP ヘッダーを定義し、MustUnderstand プロパティを true に設定して、MyWebMethod XML Web サービス メソッドを呼び出す例を次に示します。XML Web サービス メソッドが MyHeader SOAP ヘッダーの DidUnderstand プロパティを true に設定しない場合は、SoapHeaderException がスローされます。

Imports System

Public Class Sample
    
    Public Shared Sub Main()
        Dim ws As New MyWebService()

        Try
            Dim customHeader As New
 MyHeader1()

            customHeader.MyValue = "Header Value for MyValue"
            customHeader.MustUnderstand = True

            ws.myHeader = customHeader

        Dim results As Integer

            results = ws.MyWebMethod(3,5)
        Catch e As Exception
            Console.WriteLine("Exception: {0}", e.ToString())
        End Try
    End Sub
End Class

using System;

public class Sample {
    
    public static void Main()
 {
        MyWebService ws = new MyWebService();

        try {
            MyHeader customHeader = new MyHeader();
            customHeader.MyValue = "Header Value for MyValue";
            customHeader.MustUnderstand = true;
            ws.myHeader = customHeader;
            
        int results = ws.MyWebMethod(3,5);
        }
        catch (Exception e) {
            Console.WriteLine ("Exception: {0}", e.ToString());
        }
    }
}

int main()
{
   MyWebService^ ws = gcnew MyWebService;
   try
   {
      MyHeader^ customHeader = gcnew MyHeader;
      customHeader->MyValue = "Header Value for MyValue";
      customHeader->MustUnderstand = true;
      ws->myHeader = customHeader;
      int results = ws->MyWebMethod( 3, 5 );
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( "Exception: {0}", e );
   }

}

import System.*;

public class Sample
{
    public static void main(String[]
 args)
    {
        MyWebService ws = new MyWebService();
        try {
            MyHeader customHeader = new MyHeader();
            customHeader.myValue = "Header Value for MyValue";
            customHeader.set_MustUnderstand(true);
            ws.myHeader = customHeader;
            int results = ws.MyWebMethod(3, 5);
        }
        catch (System.Exception e) {
            Console.WriteLine("Exception: {0}", e.ToString());
        }
    } //main
} //Sample

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



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

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

   

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



SoapHeader.MustUnderstand プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS