<client>

client 要素は、クライアントが接続可能なエンドポイントの一覧を定義します。

configuration
  system.serviceModel
    <クライアント>

構文

<system.serviceModel>
  <client>
    <endpoint>
    </endpoint>
    <metadata>
    </metadata>
  </client>
</system.serviceModel>

属性および要素

以降のセクションでは、属性、子要素、および親要素について説明します。

属性

なし

子要素

要素 説明
<endpoint> このクライアントが接続可能なエンドポイントを指定するエンドポイント要素のコレクションを含みます。
<metadata> メタデータを処理するための設定を含みます。

親要素

要素 説明
<system.serviceModel> すべての Windows Communication Foundation (WCF) 構成要素のルート要素です。

解説

client セクションは、クライアントが接続可能なエンドポイントの一覧を定義します。 クライアント セクションに示される各エンドポイントは、独自のバインディング、動作、およびコントラクトを定義します。 各エンドポイントは、name 属性と contract 属性の組み合わせで一意に識別されます。 クライアント コードは、クライアントが実装するサービスのエンドポイントに接続するための name を指定します。 name 属性が省略されている場合、クライアントが実装するコントラクトのエンドポイントが既定のエンドポイントとして機能します。

さらに、このセクションはメタデータを処理するための設定も指定します。

<client>
  <endpoint address="/HelloWorld/"
            bindingConfiguration="usingDefaults"
            name="MyBinding"
            binding="customBinding"
            contract="HelloWorld">
    <addressProperties actingAs="http://www.microsoft.com/TestActor"
                       identityData="BasicReadWrite"
                       identityType="Spn"
                       isAddressPrivate="false" />
  </endpoint>
</client>

関連項目