title: Mule - test an http get request with choice component
body: <p>I have the following flow :</p>
  
  <pre><code> &lt;flow name="SOAPWebService" doc:name="SOAPWebService"&gt;
  
  &lt;http:inbound-endpoint address="http://localhost:8088/esb/"   exchange-pattern="request-response" doc:name="HTTP"&gt;          
  &lt;/http:inbound-endpoint&gt;
  
      &lt;choice doc:name="Choice"&gt;
          &lt;when expression="#[payload.contains('c22')]"&gt;
              &lt;set-variable variableName="paramCtr" value="#[message.inboundProperties['ctr']]" doc:name="conteneur"/&gt;
              &lt;set-variable variableName="paramC" value="#[message.inboundProperties['c']]" doc:name="critere"/&gt;
              &lt;component class="com.example.components.SampleComponent" doc:name="Java"/&gt;
              &lt;mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\MuleStudio\SandBox\resources\PrepareRequestXMLPort.xsl" doc:name="XSLT"&gt;
                  &lt;mulexml:context-property key="paramCtr" value="#[flowVars['paramCtr']]"/&gt;
                  &lt;mulexml:context-property key="paramC" value="#[flowVars['paramC']]"/&gt;
              &lt;/mulexml:xslt-transformer&gt;
              &lt;cxf:proxy-client payload="body" enableMuleSoapHeaders="true" doc:name="SOAP"/&gt;
              &lt;http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:8080/ClientsDB/port" doc:name="PortWS"/&gt;
          &lt;/when&gt;
          &lt;otherwise&gt;
              &lt;set-variable variableName="paramCtr" value="#[message.inboundProperties['ctr']]" doc:name="conteneur"/&gt;
              &lt;set-variable variableName="paramC" value="#[message.inboundProperties['c']]" doc:name="critere"/&gt;
              &lt;component class="com.example.components.SampleComponent" doc:name="Java"/&gt;
              &lt;mulexml:xslt-transformer maxIdleTransformers="2" maxActiveTransformers="5" xsl-file="C:\MuleStudio\SandBox\resources\PrepareRequestXMLDouane.xsl" doc:name="XSLT"&gt;
                  &lt;mulexml:context-property key="paramCtr" value="#[flowVars['paramCtr']]"/&gt;
                  &lt;mulexml:context-property key="paramC" value="#[flowVars['paramC']]"/&gt;
              &lt;/mulexml:xslt-transformer&gt;
              &lt;cxf:proxy-client payload="body" enableMuleSoapHeaders="true" doc:name="SOAP"/&gt;
              &lt;http:outbound-endpoint exchange-pattern="request-response" address="http://localhost:8080/ClientsDB/douane" doc:name="DouaneWS"/&gt;
          &lt;/otherwise&gt;
      &lt;/choice&gt;
  
  
  &lt;byte-array-to-string-transformer   doc:name="Byte Array to String" /&gt;
      &lt;file:outbound-endpoint path="C:\MuleStudio\SandBox\output" outputPattern="#[function:datestamp:dd-MM-yy]_#[function:systime].xml " responseTimeout="10000" doc:name="Outgoing File"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to test if an http request like <code>http://localhost:8088/esb/?type=xxxx&amp;id=1234</code> if it contains the String <code>xxxx</code> in a way to route the request to the desired web service proxy.
  I've tried withe the expression <code>expression="#[string.contains['xxxxx']]"</code> but it does not seem to work.</p>
  
  <p>any idea?</p>
  
  <p>thank you.</p>