SoapHeader.Actor 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
SOAP 헤더의 받는 사람을 가져오거나 설정합니다.
public:
property System::String ^ Actor { System::String ^ get(); void set(System::String ^ value); };
public string Actor { get; set; }
member this.Actor : string with get, set
Public Property Actor As String
속성 값
SOAP 헤더의 받는 사람입니다. 기본값은 빈 문자열("")입니다.
예제
다음 XML 웹 서비스 클라이언트는 형식의 MyWebMethod 사용자 지정 SOAP 헤더를 만들고 속성을 로 설정한 후 XML 웹 서비스 메서드를 Actor 호출합니다http://www.contoso.com/MySoapHeaderHandler.MyHeader
int main()
{
MyWebService^ ws = gcnew MyWebService;
try
{
MyHeader^ customHeader = gcnew MyHeader;
customHeader->MyValue = "Header Value for MyValue";
customHeader->Actor = "http://www.contoso.com/MySoapHeaderHandler";
ws->myHeader = customHeader;
int results = ws->MyWebMethod( 3, 5 );
}
catch ( Exception^ e )
{
Console::WriteLine( "Exception: {0}", e );
}
}
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.Actor = "http://www.contoso.com/MySoapHeaderHandler";
ws.myHeader = customHeader;
int results = ws.MyWebMethod(3,5);
}
catch (Exception e) {
Console.WriteLine ("Exception: {0}", e.ToString());
}
}
}
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.Actor = "http://www.contoso.com/MySoapHeaderHandler"
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
설명
SOAP 헤더의 받는 사람을 설정하려면 속성을 설정합니다 Actor . XML 웹 서비스와 통신하는 데 사용되는 SOAP 프로토콜 버전에 관계없이 .NET Framework는 SOAP 프로토콜 버전과 관련된 SOAP 메시지를 자동으로 생성합니다. 특히 받는 사람을 나타내는 XML 요소와 XML 네임스페이스는 두 버전마다 다릅니다.
SOAP 헤더를 수신하는 XML 웹 서비스는 또는 속성을 가져와 RoleActor 서 의도한 받는 사람을 가져올 수 있습니다.
요소의 받는 사람 Body 및 SOAP 메시지 요소 내 Header 의 각 SOAP 헤더는 동일할 필요가 없습니다.
Header SOAP 메시지에 요소가 있는 경우 XML 웹 서비스 메서드 또는 중개자와 주고받을 수 있는 추가 데이터를 나타냅니다. 버전 1.1의 SOAP Actor 라고 하는 해당 데이터의 수신자는 XML 웹 서비스 메서드의 URI와 다른 URI일 수 있습니다.
SOAP actor 특성에 대한 자세한 내용은 SOAP 사양을 참조하세요.