다음을 통해 공유


메타데이터 검색

메타데이터 검색은 WS-MEX(WS-MetadataExchange) 메타데이터 끝점 또는 HTTP/GET 메타데이터 끝점 같은 메타데이터 끝점에서 메타데이터를 요청 및 검색하는 프로세스입니다.

Svcutil.exe를 사용하여 명령줄에서 메타데이터 검색

ServiceModel Metadata Utility Tool (Svcutil.exe) 도구를 사용하고 /target:metadata 스위치와 주소를 전달하여 WS-MetadataExchange 또는 HTTP/GET 요청을 통해 서비스 메타데이터를 검색할 수 있습니다. Svcutil.exe는 지정된 주소의 메타데이터를 다운로드하고 파일을 디스크에 저장합니다. Svcutil.exe는 System.ServiceModel.Description.MetadataExchangeClient 인스턴스를 내부적으로 사용하고, 구성에서 Svcutil.exe에 입력으로 전달된 주소 스키마와 이름이 같은 IMetadataExchange 끝점 구성을 로드합니다.

MetadataExchangeClient를 사용하여 프로그래밍 방식으로 메타데이터 검색

WCF(Windows Communication Foundation)에서는 WS-MetadataExchange 및 HTTP/GET 요청과 같은 표준화된 프로토콜을 통해 서비스 메타데이터를 검색할 수 있습니다. 이러한 프로토콜은 모두 MetadataExchangeClient 형식에서 지원합니다. 메타데이터 끝점의 주소와 선택적인 바인딩을 제공하여 System.ServiceModel.Description.MetadataExchangeClient 형식을 통해 서비스 메타데이터를 검색합니다. System.ServiceModel.Description.MetadataExchangeClient 인스턴스에서 사용되는 바인딩은 MetadataExchangeBindings 정적 클래스의 기본 바인딩, 사용자 제공 바인딩 또는 IMetadataExchange 계약의 끝점 구성에서 로드된 바인딩 중 하나입니다. System.ServiceModel.Description.MetadataExchangeClientHttpWebRequest 형식을 통해 메타데이터에 대한 HTTP URL 참조를 확인할 수도 있습니다.

기본적으로 System.ServiceModel.Description.MetadataExchangeClient 인스턴스는 단일 ChannelFactory 인스턴스에 연결됩니다. GetChannelFactory 가상 메서드를 재정의하여 System.ServiceModel.Description.MetadataExchangeClient에서 사용하는 System.ServiceModel.ChannelFactory 인스턴스를 변경하거나 바꿀 수 있습니다. 마찬가지로 System.ServiceModel.Description.MetadataExchangeClient.GetWebRequest(System.Uri,System.String,System.String) 가상 메서드를 재정의하여 HTTP/GET 요청을 만들기 위해 System.ServiceModel.Description.MetadataExchangeClient에서 사용하는 HttpWebRequest 인스턴스를 변경하거나 바꿀 수 있습니다.

단원 내용

참고 항목

참조

MetadataExchangeClient