SoapHeaderAttribute.Direction 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
SOAP 헤더가 XML 웹 서비스 또는 XML 웹 서비스 클라이언트용인지 아니면 둘 다를 위한 것인지를 가져오거나 설정합니다.
public:
property System::Web::Services::Protocols::SoapHeaderDirection Direction { System::Web::Services::Protocols::SoapHeaderDirection get(); void set(System::Web::Services::Protocols::SoapHeaderDirection value); };
public System.Web.Services.Protocols.SoapHeaderDirection Direction { get; set; }
member this.Direction : System.Web.Services.Protocols.SoapHeaderDirection with get, set
Public Property Direction As SoapHeaderDirection
속성 값
SOAP 헤더의 의도된 받는 사람입니다. 기본값은 In의도한 받는 사람이 XML 웹 서비스일 뿐임을 의미합니다.
예제
다음 MyWebService XML 웹 서비스는 형식 SoapHeader중 하나를 MyHeader 정의합니다. XML 웹 서비스 메서드는 Hello XML 웹 서비스 메서드를 호출하기 위해 XML 웹 서비스 메서드 및 클라이언트로 보내야 하는 것을 지정 MyHeader 합니다.
#using <System.EnterpriseServices.dll>
#using <System.Web.Services.dll>
using namespace System;
using namespace System::Web::Services;
using namespace System::Web::Services::Protocols;
// Define a SOAP header by deriving from the SoapHeader base class.
// The header contains just one string value.
public ref class MyHeader: public SoapHeader
{
public:
String^ MyValue;
};
public ref class MyWebService
{
public:
// Member variable to receive the contents of the MyHeader SOAP header.
MyHeader^ myHeader;
[WebMethod]
[SoapHeader("myHeader",Direction=SoapHeaderDirection::InOut)]
void Hello(){}
};
using System;
using System.Web.Services;
using System.Web.Services.Protocols;
// Define a SOAP header by deriving from the SoapHeader base class.
// The header contains just one string value.
public class MyHeader : SoapHeader {
public string MyValue;
}
public class MyWebService {
// Member variable to receive the contents of the MyHeader SOAP header.
public MyHeader myHeader;
[WebMethod]
[SoapHeader("myHeader", Direction=SoapHeaderDirection.InOut)]
public void Hello() {
}
}
Imports System.Web.Services
Imports System.Web.Services.Protocols
' Define a SOAP header by deriving from the SoapHeader base class.
' The header contains just one string value.
Public Class MyHeader
Inherits SoapHeader
Public MyValue As String
End Class
Public Class MyWebService
' Member variable to receive the contents of the MyHeader SOAP header.
Public myHeader As MyHeader
<WebMethod, _
SoapHeader("myHeader", Direction := SoapHeaderDirection.InOut)> _
Public Sub Hello()
End Sub
End Class