対話Webサービスでのグループのリストの取得

属性グループのリストを取得するには、AttributeGroupListConfigタイプとともにリクエストを使用します。

AttributeGroupListConfigの構文は次のとおりです。
<AttributeGroupListConfig Id="?">
    <StateName>?</StateName>
</AttributeGroupListConfig>
変数の意味は次のとおりです。
  • Idは、この構成の任意の識別子を提供するオプション属性です。
  • StateNameは、リクエストで状態の名前を指定するオプション属性です。(複数の状態があるリクエストにおいても)状態を指定しても結果に影響しないことに注意してください。

グループのリストの取得の手順:

次の例のようなリクエストを使用します。
<Request xmlns="http://www.endeca.com/MDEX/conversation/3/0">
   <State/>
   <AttributeGroupListConfig Id="AttrGroups"/>
</Request>
対話Webサービス・リクエストには、各グループの表示名と各グループ内の属性の数を指定する、現在定義されているグループのリストが含まれます。次の例に示すように、各グループに関する情報は、AttributeGroupListレスポンスのGroupSummary要素内に返されます。
<cs:Results ...>
   <ns:State .../>
   <cs:AttributeGroupList Id="AttrGroups">
      <cs:GroupSummary Key="WineGroup" Cardinality="4">
         <cs:Record>
            <cs:attribute name="system-group_DisplayName" type="mdex:string">Wine Refs</cs:attribute>
            <cs:attribute name="system-group_Key" type="mdex:string">WineGroup</cs:attribute>
         </cs:Record>
         <cs:GroupMembers>
            <cs:attribute name="mdex-property_Key">WineType</cs:attribute>
            <cs:attribute name="mdex-property_Key">Wine</cs:attribute>
            <cs:attribute name="mdex-property_Key">Region</cs:attribute>
            <cs:attribute name="mdex-property_Key">Flavors</cs:attribute>
         </cs:GroupMembers>
      </cs:GroupSummary>
   </cs:AttributeGroupList>
</cs:Results>

この例では、(WineGroupという)1つのグループが返されます。Cardinality属性は、グループ内の属性の数を示します。各グループ・メンバーの属性もリストされます。

注意: レスポンスには、他のどのユーザー作成グループのメンバーでもないすべての属性を含むグループsystem-navigation_InternalGroup (この例では示されていません)があることにも注意してください。このグループはOracle Endeca ServerとStudioで使用されるもので、アプリケーションで使用されることは意図していません。