EnvelopeVersion 클래스

정의

메시지 및 해당 교환과 연결된 SOAP 버전 관련 정보를 포함합니다.

public ref class EnvelopeVersion sealed
public sealed class EnvelopeVersion
type EnvelopeVersion = class
Public NotInheritable Class EnvelopeVersion
상속
EnvelopeVersion

예제

다음 코드에서는 메서드 및 속성에 EnvelopeVersion액세스하는 방법을 보여 줍니다.


using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.Text;

namespace CS
{
    class Program
    {
        static void Main(string[] args)
        {
            // MessageVersion
            EnvelopeVersion envS11 = EnvelopeVersion.Soap11;
            string nextDestS11 = envS11.NextDestinationActorValue;
            string[] ultDestsS11 = envS11.GetUltimateDestinationActorValues();
            string ultS11 = ultDestsS11[0];
            string toStrS11 = envS11.ToString();

            EnvelopeVersion envS12 = EnvelopeVersion.Soap12;

            EnvelopeVersion envNotSOAP =  EnvelopeVersion.None;

            string nextDestS12 = envS12.NextDestinationActorValue;

            string[] ultDestsS12 = envS12.GetUltimateDestinationActorValues();

            string ultS12 = ultDestsS12[1];

            string toStrS12 = envS12.ToString();

            EnvelopeVersion envNone = EnvelopeVersion.None;
            string nextDestNone = envNone.NextDestinationActorValue;
            //The following code throws a System.ArgumentReferenceException.
            //The object reference is not set to an instance of an object
            // string[] ultDestsNone = envNone.GetUltimateDestinationActorValues();
            string toStrNone = envNone.ToString();

             //EnvelopeVersions
            Console.WriteLine("EnvelopeVersion.Soap11: {0}", envS11);
            Console.WriteLine("EnvelopeVersion.Soap12: {0}", envS12);
            Console.WriteLine("EnvelopeVersion.None: {0}", envNone);
            Console.WriteLine();

            //NextDestination
            Console.WriteLine("NextDest EnvelopeVersion.Soap11: {0}", nextDestS11);
            Console.WriteLine("NextDest EnvelopeVersion.Soap12: {0}", nextDestS12);
            Console.WriteLine("NextDest EnvelopeVersion.None: {0}", nextDestNone);
            Console.WriteLine();

            //UltimateDestinations
            Console.WriteLine("UltDest EnvelopeVersion.Soap11: {0}", ultS11);
            Console.WriteLine("UltDest EnvelopeVersion.Soap12: {0}", ultS12);
            //Console.WriteLine("UltDest EnvelopeVersion.None: {0}", ultDestsNone);
            Console.WriteLine();

            //ToString
            Console.WriteLine("EnvelopeVersion.Soap11.ToString(): {0}", toStrS11);
            Console.WriteLine("EnvelopeVersion.Soap11.ToString(): {0}", toStrS12);
            Console.WriteLine("EnvelopeVersion.Soap11.ToString(): {0}", toStrNone);
            Console.WriteLine();
        }
    }
}
/*
Output:
EnvelopeVersion.Soap11: Soap11 (http://schemas.xmlsoap.org/soap/envelope/)
EnvelopeVersion.Soap12: Soap12 (http://www.w3.org/2003/05/soap-envelope)
EnvelopeVersion.None: EnvelopeNone (http://schemas.microsoft.com/ws/2005/05/envelope/none)

NextDest EnvelopeVersion.Soap11: http://schemas.xmlsoap.org/soap/actor/next
NextDest EnvelopeVersion.Soap12: http://www.w3.org/2003/05/soap-envelope/role/next
NextDest EnvelopeVersion.None:

UltDest EnvelopeVersion.Soap11:
UltDest EnvelopeVersion.Soap12:

EnvelopeVersion.Soap11.ToString(): Soap11 (http://schemas.xmlsoap.org/soap/envelope/)
EnvelopeVersion.Soap11.ToString(): Soap12 (http://www.w3.org/2003/05/soap-envelope)
EnvelopeVersion.Soap11.ToString(): EnvelopeNone (http://schemas.microsoft.com/ws/2005/05/envelope/none)
*/


Imports System.Collections.Generic
Imports System.ServiceModel
Imports System.Text

Namespace CS
    Module Module1
        Sub Main(ByVal args() As String)

            ' MessageVersion
            Dim envS11 As EnvelopeVersion = EnvelopeVersion.Soap11
            Dim nextDestS11 As String = envS11.NextDestinationActorValue
            Dim ultDestsS11() As String = envS11.GetUltimateDestinationActorValues()
            Dim ultS11 As String = ultDestsS11(0)
            Dim toStrS11 As String = envS11.ToString()

            Dim envS12 As EnvelopeVersion = EnvelopeVersion.Soap12

            Dim envNotSOAP As EnvelopeVersion = EnvelopeVersion.None

            Dim nextDestS12 As String = envS12.NextDestinationActorValue

            Dim ultDestsS12() As String = envS12.GetUltimateDestinationActorValues()

            Dim ultS12 As String = ultDestsS12(1)

            Dim toStrS12 As String = envS12.ToString()

            Dim envNone As EnvelopeVersion = EnvelopeVersion.None
            Dim nextDestNone As String = envNone.NextDestinationActorValue
            'The following code throws a System.ArgumentReferenceException.
            'The object reference is not set to an instance of an object
            ' string[] ultDestsNone = envNone.GetUltimateDestinationActorValues();
            Dim toStrNone As String = envNone.ToString()

            'EnvelopeVersions
            Console.WriteLine("EnvelopeVersion.Soap11: {0}", envS11)
            Console.WriteLine("EnvelopeVersion.Soap12: {0}", envS12)
            Console.WriteLine("EnvelopeVersion.None: {0}", envNone)
            Console.WriteLine()

            'NextDestination
            Console.WriteLine("NextDest EnvelopeVersion.Soap11: {0}", nextDestS11)
            Console.WriteLine("NextDest EnvelopeVersion.Soap12: {0}", nextDestS12)
            Console.WriteLine("NextDest EnvelopeVersion.None: {0}", nextDestNone)
            Console.WriteLine()

            'UltimateDestinations
            Console.WriteLine("UltDest EnvelopeVersion.Soap11: {0}", ultS11)
            Console.WriteLine("UltDest EnvelopeVersion.Soap12: {0}", ultS12)
            'Console.WriteLine("UltDest EnvelopeVersion.None: {0}", ultDestsNone);
            Console.WriteLine()

            'ToString
            Console.WriteLine("EnvelopeVersion.Soap11.ToString(): {0}", toStrS11)
            Console.WriteLine("EnvelopeVersion.Soap11.ToString(): {0}", toStrS12)
            Console.WriteLine("EnvelopeVersion.Soap11.ToString(): {0}", toStrNone)
            Console.WriteLine()

        End Sub
    End Module
End Namespace
'
' * 
' * 
' * 
'Output:
'EnvelopeVersion.Soap11: Soap11 (http://schemas.xmlsoap.org/soap/envelope/)
'EnvelopeVersion.Soap12: Soap12 (http://www.w3.org/2003/05/soap-envelope)
'EnvelopeVersion.None: EnvelopeNone (http://schemas.microsoft.com/ws/2005/05/envelope/none)
'
'NextDest EnvelopeVersion.Soap11: http://schemas.xmlsoap.org/soap/actor/next
'NextDest EnvelopeVersion.Soap12: http://www.w3.org/2003/05/soap-envelope/role/next
'NextDest EnvelopeVersion.None:
'
'UltDest EnvelopeVersion.Soap11:
'UltDest EnvelopeVersion.Soap12:
'
'EnvelopeVersion.Soap11.ToString(): Soap11 (http://schemas.xmlsoap.org/soap/envelope/)
'EnvelopeVersion.Soap11.ToString(): Soap12 (http://www.w3.org/2003/05/soap-envelope)
'EnvelopeVersion.Soap11.ToString(): EnvelopeNone (http://schemas.microsoft.com/ws/2005/05/envelope/none)
'

설명

현재 사용할 수 있는 SOAP 버전은 SOAP 1.1과 SOAP 1.2입니다. EnvelopeVersion 이러한 각 SOAP 버전에 대해 및 Soap12 속성을 사용하여 Soap11 복구할 수 있습니다. SOAP 서식을 None 사용하지 않는 XML 메시지를 보내고 받는 데 사용되는 메시지 버전도 있습니다. 속성 및 메서드를 사용하여 NextDestinationActorValue 각 메시지 버전과 GetUltimateDestinationActorValues 연결된 처리 역할을 복구할 수 있습니다.

속성

NextDestinationActorValue

다음 대상의 현재 메시지 버전과 연결된 SOAP 역할의 URI 이름이 포함된 문자열을 가져옵니다.

None

SOAP 버전을 사용하지 않는 봉투 버전을 가져옵니다.

Soap11

SOAP1.1 봉투 버전을 가져옵니다.

Soap12

SOAP1.2 봉투 버전을 가져옵니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
GetUltimateDestinationActorValues()

최종 대상의 현재 메시지 버전과 연결된 SOAP 역할의 URI 이름이 포함된 문자열을 가져옵니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 봉투 버전을 나타내는 문자열을 가져옵니다.

적용 대상