2016-06-15 19 views

Antwort

1

In meiner Lösung, die ich die Abfrage entfernen beziehen, wenn es gleich zu propName = V1 oder propName = V2

<inSequence> 
    <property name="sw_prop" expression="$url:propName" 
       scope="default" type="STRING"/> 

    <property name="querystrings" expression="$axis2:REST_URL_POSTFIX"/> 

    <rewrite inProperty="querystrings" outProperty="querystrings"> 
     <rewriterule> 
      <condition> 
       <or> 
       <equal type="url" source="query" value="propName=V1"/> 
       <equal type="url" source="query" value="propName=V2"/> 
       </or> 
      </condition> 
      <action type="remove" fragment="query"/> 
     </rewriterule> 
    </rewrite> 

    <property name="REST_URL_POSTFIX" 
       expression="get-property('querystrings')" 
       scope="axis2"/> 

    <switch source="get-property('sw_prop')"> 
     <case regex="V1"> 
      <send> 
       <endpoint key="EP1"/> 
      </send> 
     </case> 
     <case regex="V2"> 
      <send> 
       <endpoint key="EP2"/> 
      </send> 
     </case> 
     <default> 
      <send> 
       <endpoint key="AggProxyEP"/> 
      </send> 
     </default> 
    </switch> 
</inSequence>