SoapHeaderDirection 열거형

정의

SoapHeader의 수신자가 XML Web services나 XML Web services 클라이언트인지 또는 둘 다인지 여부를 지정합니다.

이 열거형은 멤버 값의 비트 조합을 지원합니다.

public enum class SoapHeaderDirection
[System.Flags]
public enum SoapHeaderDirection
[<System.Flags>]
type SoapHeaderDirection = 
Public Enum SoapHeaderDirection
상속
SoapHeaderDirection
특성

필드

Fault 4

XML Web services 메서드에 의해 예외가 throw될 때 SoapHeader를 XML Web services 클라이언트로 보낼 것을 지정합니다.

In 1

SoapHeader를 XML Web services로 보내도록 지정합니다.

InOut 3

SoapHeader를 XML Web services와 XML Web services 클라이언트로 보내도록 지정합니다.

Out 2

SoapHeader를 XML Web services 클라이언트로 보내도록 지정합니다.

예제

다음 XML 웹 서비스 메서드는 지정 된 myHeaderSoapHeader XML 웹 서비스 XML 웹 서비스 클라이언트에서 전송 되 고 다음 XML 웹 서비스 클라이언트를 다시 XML Web 실행 하는 동안 throw 된 예외에 관계 없이 서비스 메서드입니다.

public ref class MyHeader: public SoapHeader
{
public:
   String^ MyValue;
};

public ref class MyWebService
{
public:
   MyHeader^ myHeader;

   [WebMethod]
   [SoapHeader("myHeader",
   Direction=SoapHeaderDirection::InOut|SoapHeaderDirection::Fault)]
   void MySoapHeaderReceivingMethod()
   {
      
      // Set myHeader->MyValue to some value.
   }

};
public class MyHeader : SoapHeader {
    public string MyValue;
}

public class MyWebService {

    public MyHeader myHeader;

    [WebMethod]
    [SoapHeader("myHeader",
                Direction=SoapHeaderDirection.InOut | SoapHeaderDirection.Fault)]
    public void MySoapHeaderReceivingMethod() {

        // Set myHeader.MyValue to some value.
    }
}
Public Class MyHeader
    Inherits SoapHeader
    Public MyValue As String
End Class

Public Class MyWebService
    
    Public myHeader As MyHeader    
    
    <WebMethod, _
    SoapHeader("myHeader", _
                Direction := SoapHeaderDirection.InOut Or SoapHeaderDirection.Fault)> _
    Public Sub MySoapHeaderReceivingMethod()

        ' Set myHeader.MyValue to some value.
        
    End Sub
    
End Class

설명

SoapHeaderAttribute XML 웹 서비스 메서드나 XML 웹 서비스 프록시 클래스의 메서드 중 하나에 적용할 수 있습니다. 두 경우 모두 받는 사람은 속성으로 SoapHeaderAttribute.Direction 지정됩니다. 실행 중에 예외가 throw될 때 XML 웹 서비스 메서드가 SOAP 헤더를 반환하도록 지정하려면 메서드에 를 SoapHeaderAttribute 적용하고 속성을 Fault로 설정합니다SoapHeaderAttribute.Direction.

적용 대상

추가 정보