다음을 통해 공유


Windows Web Services 예제

다음 예제에서는 Windows Web Services API를 사용하는 방법을 보여 줍니다.

서비스 모델 예제

계산기 서비스: 클라이언트: HttpCalculatorClientExample, 서버: HttpCalculatorServiceExample.

SSL 전송 보안을 사용하는 계산기 서비스: 클라이언트: HttpCalculatorWithSslClientExample, 서버: HttpCalculatorWithSslServiceExample.

SSL 혼합 모드 보안을 통해 사용자 이름을 사용하는 계산기 서비스: 클라이언트: HttpCalculatorWithUsernameOverSslClientExample, 서버: HttpCalculatorWithUserNameOverSslServiceExample.

SSL 혼합 모드 보안을 통해 Kerberos를 사용하는 계산기 서비스: 클라이언트: HttpCalculatorWithKerberosOverSslClientExample, 서버: HttpCalculatorWithKerberosOverSslServiceExample.

구매 주문 서비스: 클라이언트: HttpPurchaseOrderClientExample, 서버: HttpPurchaseOrderServiceExample.

SSL 전송 보안을 사용하는 구매 주문 서비스: 클라이언트: HttpPurchaseOrderWithSslClientExample, 서버: HttpPurchaseOrderWithSslServiceExample.

SSL 혼합 모드 보안을 통해 사용자 이름을 사용하여 주문 서비스 구매: 클라이언트: HttpPurchaseOrderWithUsernameOverSslClientExample, 서버: HttpPurchaseOrderWithUserNameOverSslServiceExample.

SSL 혼합 모드 보안을 통해 Kerberos를 사용하여 주문 서비스 구매: 클라이언트: HttpPurchaseOrderWithKerberosOverSslClientExample, 서버: HttpPurchaseOrderWithKerberosOverSslServiceExample.

UnTyped Purchase Order Service: Server: UnTypedServiceExample. 클라이언트: UnTypedClientExample

세션 계산기: 서버: SessionfullCalculatorServiceExample. Client:SessionfullCalculatorClientExample.

사용자 지정 채널 및 수신기 구현을 사용하는 계산기: Server:HttpCalculatorWithLayeredChannelServiceExample. Client:HttpCalculatorWithLayeredChannelClientExample.

인코딩된 채널을 사용하는 계산기: Server:HttpCalculatorWithEncodedChannelServiceExample. Client:HttpCalculatorWithEncodedChannelClientExample.

원시(비 SOAP) HTTP 요청을 처리하는 서비스: Client:HttpRawClientExample. 서버:HttpRawServiceExample.

서비스 작업 중단 알림: 서버: BlockingServiceExample. Client:ServiceCancellationExample.

호출 취소: 서버: SessionfullCalculatorServiceExample. Client:CallAbandonExample.

정책 설명을 수동으로 만들고 이를 사용하여 서비스 프록시 PolicyTemplateExample을 만듭니다.

TCP 채널 계층 예제

단방향 패턴을 사용하여 메시지를 보내는 TCP 예제: 클라이언트: OneWayTcpClientExample, 서버: OneWayTcpServerExample

요청-회신 패턴을 사용하여 메시지를 보내는 TCP 예제: 클라이언트: RequestReplyTcpClientExample, 서버: RequestReplyTcpServerExample

스트리밍 TCP 예제: 클라이언트: StreamingTcpClientExample, 서버: StreamingTcpServerExample

비동기 스트리밍 TCP 예제: 클라이언트: AsyncStreamingTcpClientExample, 서버: AsyncStreamingTcpServerExample

HTTP 채널 계층 예제

HTTP 예제: 클라이언트: HttpClientExample, 서버: HttpServerExample

스트리밍 API를 사용하는 HTTP 예제: 클라이언트: StreamingHttpClientExample, 서버: StreamingHttpServerExample

UDP 채널 계층 예제

단방향 패턴을 사용하여 메시지를 보내는 UDP 예제: 클라이언트: OneWayUdpClientExample, 서버: OneWayUdpServerExample

멀티캐스트 요청 응답 패턴을 사용하여 메시지를 보내는 UDP 예제: 클라이언트: MulticastUdpClientExample, 서버: MulticastUdpServerExample 다음은 동일한 예제이지만 IPv6 주소 지정을 사용하는 경우: Client: MulticastUdpClientExample6, Server: MulticastUdpServerExample6

명명된 파이프 채널 계층 예제

요청-회신 패턴을 사용하여 메시지를 보내는 명명된 파이프 예제: Client: RequestReplyNamedPipesClientExample, Server: RequestReplyNamedPipesServerExample

명명된 스트리밍 파이프 예제: 클라이언트: StreamingNamedPipesClientExample, 서버: StreamingNamedPipesServerExample

메시지 예제

사용자 지정 메시지 헤더를 사용하는 예제: CustomHeaderExample

메시지를 인코딩하고 디코딩하는 예제: MessageEncodingExample

메시지를 전달하는 예제: ForwardMessageExample

XML 예

XML 버퍼 ReadWriteXmlExample을 사용하여 xml을 작성하고 읽는 예제

MTOM, WsWriteBytes, WsPushBytes 및 WsPullBytes ReadWriteBytesXmlExample을 사용하여 이진 데이터를 작성하고 읽는 예제

XML 버퍼 NavigateXmlExample을 탐색하는 예제

ReadXmlExample 노드별로 XML 문서 노드를 읽는 예제

XML 특성 ReadAttributeExample을 찾아서 표시하는 예제

ReadWriteArrayExample 요소의 배열을 작성하고 읽는 예제

XML 버퍼 InsertElementExample에 요소를 삽입하는 예제

일부 XML 버퍼 도우미 함수 XmlBufferExample의 사용을 보여 주는 예제

wsutil 생성 도우미 함수 DerivedTypeExample을 사용하여 파생 형식을 작성하고 읽는 예제

비동기 모델 예제

비동기 함수에 대한 모델을 보여 주는 예제입니다. AsyncModelExample

보안 채널 계층 예제

TCP를 통해 Windows 전송 보안: 클라이언트: RequestReplyTcpClientWithWindowsTransportSecurityExample, 서버: RequestReplyTcpServerWithWindowsTransportSecurityExample.

명명된 파이프를 통해 Windows 전송 보안: 클라이언트: RequestReplyNamedPipesClientWithWindowsTransportSecurityExample, Server: RequestReplyNamedPipesServerWithWindowsTransportSecurityExample.

SSL 전송 보안: 클라이언트: HttpClientWithSslExample, 서버: HttpServerWithSslExample.

SSL 혼합 모드 보안을 통한 사용자 이름: 클라이언트: HttpClientWithUsernameOverSslExample, 서버: HttpServerWithUsernameOverSslExample.

SSL 혼합 모드 보안을 통한 사용자 이름: 클라이언트: HttpClientWithKerberosOverSslExample, 서버: HttpServerWithKerberosOverSslExample.

메타데이터 예제

다음 예제에서는 엔드포인트가 지원하는 프로토콜에 대한 정보를 추출하기 위해 WSDL 및 정책 문서를 처리하는 방법을 보여 줍니다.

SSL 혼합 모드 보안을 통해 사용자 이름: MetadataImportWithUsernameOverSslExample. SSL 혼합 모드 보안을 통해 발급된 토큰: MetadataImportWithIssuedTokenOverSslExample. SSL 혼합 모드 보안을 통해 X509 인증서: MetadataImportWithX509OverSslExample.

WS-Metadata Exchange 예제

다음 예제에서는 WS_SERVICE_HOST WS-MetadataExchange 사용하도록 설정하는 방법을 보여 줍니다.

WS-MetadataExchange 사용하도록 설정된 TCP 서비스: MetadataExchangeSample. WS-MetadataExchange 사용하도록 설정된 TCP 서비스를 호출하는 WCF 서비스 모 니커 클라이언트: ServiceMonikerSample.

사용자 지정 헤더 및 서비스 모델

다음 예제에서는 각각 WS_SERVICE_PROXYWS_SERVICE_HOST 사용자 지정 헤더를 사용하는 방법을 보여 줍니다.

클라이언트: HttpCustomHeaderPurchaseOrderClientExample, Server: HttpCustomHeaderPurchaseOrderServiceExample.

파일 복제 샘플

파일 복제 서비스를 구현하는 방법을 보여 주는 포괄적인 샘플: 도구: FileRepToolExample, 서비스: FileRepServiceExample.

WCF 공용 서비스 상호 운용

Windows Web Services 클라이언트는 WCF 서비스 클라이언트: WcfPublicServiceSample과 통신합니다.

사용자 지정 HTTP 프록시

Windows Web Services 클라이언트는 사용자 지정 프록시 클라이언트를 사용하여 ASMX TerraService 서비스와 통신합니다. AsmxTerraServiceSampleWithCustomProxy