다음을 통해 공유


Port 클래스

정의

XML 웹 서비스에 포함된 개별 엔드포인트를 정의합니다. 이 클래스는 상속할 수 없습니다.

public ref class Port sealed : System::Web::Services::Description::DocumentableItem
public ref class Port sealed : System::Web::Services::Description::NamedItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class Port : System.Web.Services.Description.DocumentableItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class Port : System.Web.Services.Description.NamedItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type Port = class
    inherit DocumentableItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type Port = class
    inherit NamedItem
Public NotInheritable Class Port
Inherits DocumentableItem
Public NotInheritable Class Port
Inherits NamedItem
상속
상속
특성

예제

다음 예제에서는 a를 Port 만들고 기존 ServiceDescription 명명myDescriptionPorts 컬렉션에 추가합니다.

// Create a Port.
Port^ postPort = gcnew Port;
postPort->Name = "PortServiceHttpPost";
postPort->Binding = gcnew XmlQualifiedName( "s0:PortServiceHttpPost" );

// Create an HttpAddressBinding.
HttpAddressBinding^ postAddressBinding = gcnew HttpAddressBinding;
postAddressBinding->Location = "http://localhost/PortClass/PortService_cs.asmx";

// Add the HttpAddressBinding to the Port.
postPort->Extensions->Add( postAddressBinding );

// Get the Service of the postPort.
Service^ myService = postPort->Service;

// Print the service name for the port.
Console::WriteLine( "This is the service name of the postPort:*{0}*", myDescription->Services[ 0 ]->Ports[ 0 ]->Service->Name );

// Add the Port to the PortCollection of the ServiceDescription.
myDescription->Services[ 0 ]->Ports->Add( postPort );
// Create a Port.
Port postPort = new Port();
postPort.Name = "PortServiceHttpPost";
postPort.Binding = new XmlQualifiedName("s0:PortServiceHttpPost");

// Create an HttpAddressBinding.
HttpAddressBinding postAddressBinding = new HttpAddressBinding();
postAddressBinding.Location =
   "http://localhost/PortClass/PortService_cs.asmx";

// Add the HttpAddressBinding to the Port.
postPort.Extensions.Add(postAddressBinding);

// Get the Service of the postPort.
Service myService = postPort.Service;

// Print the service name for the port.
Console.WriteLine("This is the service name of the postPort:*" +
   myDescription.Services[0].Ports[0].Service.Name + "*");

// Add the Port to the PortCollection of the ServiceDescription.
myDescription.Services[0].Ports.Add(postPort);

' Create a Port.
Dim postPort As New Port()
postPort.Name = "PortServiceHttpPost"
postPort.Binding = New XmlQualifiedName("s0:PortServiceHttpPost")


' Create an HttpAddressBinding.
Dim postAddressBinding As New HttpAddressBinding()
postAddressBinding.Location = _
   "http://localhost/PortClass/PortService.vb.asmx"

' Add the HttpAddressBinding to the Port.
postPort.Extensions.Add(postAddressBinding)

' Get the Service of the postPort.
Dim myService As Service = postPort.Service

' Print the service name for the port.
Console.WriteLine("This is the service name of the postPort:*" & _
   myDescription.Services(0).Ports(0).Service.Name & "*")

' Add the Port to the PortCollection of the ServiceDescription.
myDescription.Services(0).Ports.Add(postPort)

설명

이 클래스는 지정된 PortType작업에 대한 작업 및 메시지에 대한 Binding메시지 형식 및 프로토콜 세부 정보를 정의하는 URI(단일 주소)를 지정합니다. 이 속성은 Binding 지정된 Port값에 대한 값을 가져오거나 설정합니다.

이 클래스는 요소로 묶인 WSDL(Web Services Description Language) <port> 요소에 <service> 해당합니다. WSDL에 대한 자세한 내용은 WSDL 사양을 참조하세요.

생성자

Name Description
Port()

Port 클래스의 새 인스턴스를 초기화합니다.

속성

Name Description
Binding

의 XML <binding> 특성 Port값을 가져오거나 설정합니다.

Documentation

인스턴스에 대한 DocumentableItem텍스트 설명서를 가져오거나 설정합니다.

(다음에서 상속됨 DocumentableItem)
DocumentationElement

에 대한 DocumentableItem설명서 요소를 가져오거나 설정합니다.

(다음에서 상속됨 DocumentableItem)
ExtensibleAttributes

Web Services 상호 운용성(WS-I) 기본 프로필 1.1을 준수하도록 WSDL의 특성 확장을 나타내는 형식 XmlAttribute 의 배열을 가져오거나 설정합니다.

(다음에서 상속됨 DocumentableItem)
Extensions

에 연결된 Port확장성 요소의 컬렉션을 가져옵니다.

Name

의 이름을 Port가져오거나 설정합니다.

Name

항목의 이름을 가져오거나 설정합니다.

(다음에서 상속됨 NamedItem)
Namespaces

개체가 생성될 때 네임스페이스 접두사 및 네임스페이스를 유지하는 데 사용되는 네임스페이스 접두사 및 네임스페이스의 사전을 ServiceDescription 가져오거나 설정합니다.

(다음에서 상속됨 DocumentableItem)
Service

멤버를 ServicePort 가져옵니다.

메서드

Name Description
Equals(Object)

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

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

기본 해시 함수로 사용됩니다.

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

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

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

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

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

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보