title: How to dynamically route message in WSO2 ESB based on XML configuration file
body: <p>I am trying to route a message based on information in a XML snippet  stored as a local entry (key=mapping_id_ep_v1.xml). The id used to look-up the correct endpoint and it is part of the message body.</p>
  
  <p>This is the XML snippet used to map id's to endpoints:</p>
  
  <pre><code>&lt;mappings&gt;
      &lt;mapping id="ep_1"&gt;http://localhost:8280/services/ep_1&lt;/mapping&gt;
      &lt;mapping id="ep_2"&gt;http://localhost:8280/services/ep_2&lt;/mapping&gt;
      &lt;mapping id="ep_3"&gt;http://localhost:8280/services/ep_3&lt;/mapping&gt;
  &lt;mappings&gt;
  </code></pre>
  
  <p>I retrieve the id from the body to look-up the endpoint using the following statement:</p>
  
  <pre><code>&lt;property name="LOOK-UP" expression="//controleFile/id" /&gt;
  </code></pre>
  
  <p>I can load the XML file into a property file using the following entry in a sequence:</p>
  
  <pre><code>&lt;property name="MAPPING" expression="get-property('mapping_id_ep_v1.xml')" /&gt;
  </code></pre>
  
  <p>I log the property using the following statement:</p>
  
  <pre><code>&lt;log level="custom"&gt;
      &lt;property name="Look-up" expression="get-property('LOOK-UP')" /&gt;
      &lt;property name="Mapping" expression="get-property('MAPPING')" /&gt;
  &lt;/log&gt;
  </code></pre>
  
  <p>So far so good. I haven't been able to figure out how to retrieve the correct endpoint from the MAPPING property. Can anyone help out?</p>