SoapHeader.EncodedMustUnderstand 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
SOAP 프로토콜 버전 1.1을 사용하여 통신할 때 SOAP 헤더에 대한 mustUnderstand
XML 특성의 값을 가져오거나 설정합니다.
public:
property System::String ^ EncodedMustUnderstand { System::String ^ get(); void set(System::String ^ value); };
public string EncodedMustUnderstand { get; set; }
member this.EncodedMustUnderstand : string with get, set
Public Property EncodedMustUnderstand As String
속성 값
mustUnderstand
특성 값으로, 기본값은 "0"입니다.
예외
속성이 "0", "1", "true" 또는 "false" 이외의 다른 값으로 설정된 경우
예제
// MyHeader class is derived from the SoapHeader class.
MyHeader ^ customHeader = gcnew MyHeader;
customHeader->MyValue = "Header value for MyValue";
// Set the EncodedMustUnderstand property to true.
customHeader->EncodedMustUnderstand = "1";
WebService_SoapHeader_EncodedMustUnderstand ^ myWebService = gcnew WebService_SoapHeader_EncodedMustUnderstand;
myWebService->myHeader1 = customHeader;
String^ results = myWebService->MyWebMethod1();
Console::WriteLine( results );
try
{
results = myWebService->MyWebMethod2();
}
catch ( Exception^ myException )
{
Console::WriteLine( "Exception raised in MyWebMethod2." );
Console::WriteLine( "Message: {0}", myException->Message );
}
// MyHeader class is derived from the SoapHeader class.
MyHeader customHeader = new MyHeader();
customHeader.MyValue = "Header value for MyValue";
// Set the EncodedMustUnderstand property to true.
customHeader.EncodedMustUnderstand = "1";
WebService_SoapHeader_EncodedMustUnderstand myWebService =
new WebService_SoapHeader_EncodedMustUnderstand();
myWebService.MyHeaderValue = customHeader;
string results = myWebService.MyWebMethod1();
Console.WriteLine(results);
try
{
results = myWebService.MyWebMethod2();
}
catch(Exception myException)
{
Console.WriteLine("Exception raised in MyWebMethod2.");
Console.WriteLine("Message: " + myException.Message);
}
' MyHeader class inherits from the SoapHeader class.
Dim customHeader As New MyHeader()
customHeader.MyValue = "Header value for MyValue"
' Set the EncodedMustUnderstand property to true.
customHeader.EncodedMustUnderstand = "1"
Dim myWebService As New WebService_SoapHeader_EncodedMustUnderstand()
myWebService.MyHeaderValue = customHeader
Dim results As String = myWebService.MyWebMethod1()
Console.WriteLine(results)
Try
results = myWebService.MyWebMethod2()
Catch myException As Exception
Console.WriteLine("Exception raised in MyWebMethod2.")
Console.WriteLine("Message: " & myException.Message)
End Try
설명
이 속성은 사용할 수 없습니다. 대신 사용 하 여는 MustUnderstand 속성입니다.