優先順位ルールのリスト操作と削除操作

構成Webサービスには、優先順位ルールをリストおよび削除する操作があります。

優先順位ルールのリスト

listPrecedenceRules操作とexportPrecedenceRules操作は、優先順位ルールの現在のセットに関する情報を返します。次に、listPrecedenceRules操作の例を示します。
<soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0" 
   xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:configTransaction>
         <ns:listPrecedenceRules/>
      </ns:configTransaction>
   </soapenv:Body>
</soapenv:Envelope>
優先順位ルールが定義されていない場合、レスポンスは次のようになります。
<config-types:results xmlns:config-types="http://www.endeca.com/MDEX/config/services/types/3/0">
   <precedenceRules xmlns="http://www.endeca.com/MDEX/config/XQuery/2009/09"/>
</config-types:results>
優先順位が定義されている場合、次の例に示すように、レスポンスには1つ以上のprecedenceRule要素が含まれます。
<config-types:results xmlns:config-types="http://www.endeca.com/MDEX/config/services/types/3/0">
   <precedenceRules xmlns="http://www.endeca.com/MDEX/config/XQuery/2009/09">
      <precedenceRule key="AUS_Rule" triggerAttributeKey="DimGeography_CountryRegionName" 
        triggerAttributeValue="Australia" targetAttributeKey="DimGeography_StateProvinceName" 
        isLeafTrigger="false"/>
      <precedenceRule key="City_Rule" triggerAttributeKey="DimGeography_StateProvinceName" 
        triggerAttributeValue="Victoria" targetAttributeKey="DimGeography_City" 
        isLeafTrigger="false"/>
   </precedenceRules>
</config-types:results>

優先順位ルールの削除

deletePrecedenceRules操作は、指定された1つ以上の優先順位ルールを削除します。次の例のように、指定する必要がある唯一の属性は、key属性の優先順位ルールの名前になります。
<soapenv:Envelope 
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
   xmlns:ns="http://www.endeca.com/MDEX/config/services/types/3/0" 
   xmlns:ns1="http://www.endeca.com/MDEX/config/XQuery/2009/09">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:configTransaction>
         <ns:deletePrecedenceRules>
            <ns1:precedenceRule key="City_Rule"/>
         </ns:deletePrecedenceRules>
      </ns:configTransaction>
   </soapenv:Body>
</soapenv:Envelope>
削除操作が成功した場合、レスポンスは次のようになります。
<config-types:results xmlns:config-types="http://www.endeca.com/MDEX/config/services/types/3/0"/>
指定した優先順位ルールが存在しないために削除操作が失敗した場合、レスポンスは次の例のようになります。
<soapenv:Fault>
   <faultcode>soapenv:Client</faultcode>
   <faultstring>endeca-err:MDEX0001 : Invalid input : No record has an assignment of 
     value 'Citty_Rule' for property 'mdex-precedenceRule_Key'</faultstring>
</soapenv:Fault>

この例では、優先順位ルールの名前にスペルミスがあったために操作が失敗しました。