title: How to use $header in routes
body: <p>I'm creating a route using the Java DSL in Camel.</p>
  
  <p>I'd like to perform a text substitution without creating a new processor or bean.</p>
  
  <p>I have this:</p>
  
  <pre><code>.setHeader(MY_THING,
      constant(my_template.replace("{id1}", simple("${header.subs_val}").getText())))
  </code></pre>
  
  <p>If I don't add 'constant' I get type mismatch errors. If I don't put getText() on the simple() part, I get text mismatch answers. When I run my route, it replaces <code>{id}</code> with the literal <code>${header.subs_val}</code> instead of fetching my value from the header. Yet if I take the quotes off, I get compile errors; Java doesn't know the <code>${...}</code> syntax of course.</p>
  
  <p>Deployment takes a few minutes, so experiments are expensive.</p>
  
  <p>So, how can I just do a simple substitution. Nothing I am finding on the web actually seems to work.</p>
  
  <p>EDIT - what is the template?  Specifically, a string (it's a URL)</p>
  
  <pre><code>http://this/that/{id1}/another/thing
  </code></pre>
  
  <p>I've inherited some code, so I am unable to simply <code>to(...)</code> the URL and apply the special <code>.tof()</code> (??) formatting.</p>