Windows Web サービスの例
次の例は、Windows Web Services API の使用方法を示しています。
- サービス モデルの例
- TCP チャネル レイヤーの例
- HTTP チャネル レイヤーの例
- UDP チャネル レイヤーの例
- 名前付きパイプ チャネル レイヤの例
- メッセージの例
- XML の例
- 非同期モデルの例
- セキュリティ チャネル レイヤーの例
- ファイル レプリケーションの例
サービス モデルの例
Calculator Service: Client: HttpCalculatorClientExample、Server: HttpCalculatorServiceExample。
SSL トランスポート セキュリティを備えた電卓サービス: クライアント: HttpCalculatorWithSslClientExample、Server: HttpCalculatorWithSslServiceExample。
Ssl 混合モードのセキュリティを介したユーザー名を持つ電卓サービス: クライアント: HttpCalculatorWithUsernameOverSslClientExample、Server: HttpCalculatorWithUserNameOverSslServiceExample。
Kerberos over SSL 混合モード セキュリティを使用した電卓サービス: クライアント: HttpCalculatorWithKerberosOverSslClientExample、Server: HttpCalculatorWithKerberosOverSslServiceExample。
発注書サービス: クライアント: HttpPurchaseOrderClientExample、サーバー: HttpPurchaseOrderServiceExample。
SSL トランスポート セキュリティを備えた発注書サービス: クライアント: HttpPurchaseOrderWithSslClientExample、サーバー: HttpPurchaseOrderWithSslServiceExample。
SSL 混合モード セキュリティ経由のユーザー名を持つ発注書サービス: クライアント: HttpPurchaseOrderWithUsernameOverSslClientExample、サーバー: HttpPurchaseOrderWithUserNameOverSslServiceExample。
Kerberos over SSL 混合モード セキュリティを使用した発注書サービス: クライアント: HttpPurchaseOrderWithKerberosOverSslClientExample、Server: HttpPurchaseOrderWithKerberosOverSslServiceExample。
UnTyped Purchase Order Service: Server: UnTypedServiceExample。 クライアント: UnTypedClientExample
セッションフル計算ツール: サーバー: SessionfullCalculatorServiceExample。 Client:SessionfullCalculatorClientExample。
カスタム チャネルとリスナーの実装を使用した計算ツール: Server:HttpCalculatorWithLayeredChannelServiceExample。 Client:HttpCalculatorWithLayeredChannelClientExample。
エンコードされたチャネルを使用する電卓: Server:HttpCalculatorWithEncodedChannelServiceExample。 Client:HttpCalculatorWithEncodedChannelClientExample。
生 (SOAP 以外) HTTP 要求を処理するサービス: Client:HttpRawClientExample。 Server:HttpRawServiceExample。
サービス操作の中止通知: サーバー: BlockingServiceExample。 Client:ServiceCancellationExample。
通話の取り消し: Server: SessionfullCalculatorServiceExample。 Client:CallAbandonExample。
ポリシーの説明を手動で作成し、それを使用してサービス プロキシ ( PolicyTemplateExample) を作成します。
TCP チャネル レイヤーの例
一方向のパターンを使用してメッセージを送信する TCP の例: Client: OneWayTcpClientExample、Server: OneWayTcpServerExample
要求/応答パターンを使用してメッセージを送信する TCP の例: Client: RequestReplyTcpClientExample、Server: RequestReplyTcpServerExample
ストリーミング TCP の例: Client: StreamingTcpClientExample、Server: StreamingTcpServerExample
非同期ストリーミング TCP の例: クライアント: AsyncStreamingTcpClientExample、Server: AsyncStreamingTcpServerExample
HTTP チャネル レイヤーの例
HTTP の例: クライアント: HttpClientExample、Server: HttpServerExample
ストリーミング API を使用する HTTP 例: Client: StreamingHttpClientExample、Server: StreamingHttpServerExample
UDP チャネル レイヤーの例
一方向のパターンを使用してメッセージを送信する UDP の例: Client: OneWayUdpClientExample、Server: OneWayUdpServerExample
マルチキャスト要求応答パターンを使用してメッセージを送信する UDP の例: Client: MulticastUdpClientExample、Server: MulticastUdpServerExample 次の例は同じですが、IPv6 アドレス指定の使用: Client: MulticastUdpClientExample6、Server: MulticastUdpServerExample6
名前付きパイプ チャネル レイヤーの例
要求応答パターンを使用してメッセージを送信する名前付きパイプの例: Client: RequestReplyNamedPipesClientExample、Server: RequestReplyNamedPipesServerExample
ストリーミング名付きパイプの例: Client: StreamingNamedPipesClientExample、Server: 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、Server: RequestReplyTcpServerWithWindowsTransportSecurityExample。
名前付きパイプを介した Windows トランスポート セキュリティ: Client: RequestReplyNamedPipesClientWithWindowsTransportSecurityExample、Server: RequestReplyNamedPipesServerWithWindowsTransportSecurityExample。
SSL トランスポート セキュリティ: クライアント: HttpClientWithSslExample、Server: HttpServerWithSslExample。
SSL 混合モードセキュリティ経由のユーザー名: クライアント: HttpClientWithUsernameOverSslExample、Server: HttpServerWithUsernameOverSslExample。
SSL 混合モード セキュリティを介したユーザー名: クライアント: HttpClientWithKerberosOverSslExample、Server: 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_PROXY と WS_SERVICE_HOST でカスタム ヘッダーを使用する方法を示します。
クライアント: HttpCustomHeaderPurchaseOrderClientExample、Server: HttpCustomHeaderPurchaseOrderServiceExample。
ファイル レプリケーションのサンプル
ファイル レプリケーション サービスを実装する方法を示す包括的なサンプル: Tool: FileRepToolExample、Service: FileRepServiceExample。
WCF パブリック サービスの相互運用
Windows Web サービス クライアントは、WCF サービス クライアント WcfPublicServiceSample と通信します。
カスタム HTTP プロキシ
Windows Web サービス クライアントは、カスタム プロキシ クライアントを使用して ASMX TerraService サービスと通信します。 Asmx TerraServiceSampleWithCustomProxy