SoapHeader.MustUnderstand プロパティ
アセンブリ: System.Web.Services (system.web.services.dll 内)

Dim instance As SoapHeader Dim value As Boolean value = instance.MustUnderstand instance.MustUnderstand = 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 サービス クライアントが MustUnderstand プロパティを true に設定して XML Web サービス メソッドの呼び出しに SOAP ヘッダーを追加すると、XML Web サービス メソッドは DidUnderstand プロパティを true に設定する必要があります。それ以外の場合は、ASP.NET が SoapHeaderException を XML Web サービス クライアントにスローします。
EncodedMustUnderstand プロパティと MustUnderstand プロパティの両方を使用して、SOAP ヘッダー内の mustUnderstand 属性の値を設定できますが、MustUnderstand プロパティでは、Boolean 値を使用して属性を設定できます。

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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からSoapHeader.MustUnderstand プロパティを検索する場合は、下記のリンクをクリックしてください。

- SoapHeader.MustUnderstand プロパティのページへのリンク