title: Camel Processor not setting headers
body: <p>I am not able to inject/modify headers in a processor using the below spring DSL config. Could you please help in figuring out what I am doing wrong?</p>
  
  <pre><code>    &lt;routeContext xmlns="http://camel.apache.org/schema/spring"
      id="routes1"&gt;
  
      &lt;route id="sdPoll" de:name="Polling"
          de:systemName="Polling" streamCache="true"&gt;
          &lt;from uri="timer://sdPoll?fixedRate=true&amp;amp;period=60000" /&gt;
          &lt;process ref="refProcessor" /&gt;
          &lt;to uri="http://dummyhost" /&gt;
          &lt;to uri="log:DEBUG?showBody=true&amp;amp;showHeaders=true" /&gt;
      &lt;/route&gt;
  &lt;/routeContext&gt;
  &lt;bean id="refProcessor"
      class="com.abc.de.RefProcessor" /&gt;
  </code></pre>
  
  <p>Processor class</p>
  
  <pre><code>public class RefProcessor implements Processor {
  
  private final Logger log = Logger.getLogger(RefProcessor.class);
  
  @SuppressWarnings("unchecked")
  @Override
  public void process(Exchange exchange) throws Exception {
  
      exchange.getIn().setHeader("Authorization", "TODO");
      exchange.getIn().setHeader("CamelHttpMethod", "POST");
      exchange.getIn().setHeader("CamelHttpUri", "http://localhost:8280/api/check");
      exchange.getIn().setHeader("Content-Type", "application/json");
      exchange.getIn().setHeader("Accept", "application/json");
      exchange.getIn().setBody("TODO");
  
      //exchange.getOut().setHeaders(exchange.getIn().getHeaders());
      //exchange.getOut().setHeader("Authorization", "TODO");
      //exchange.getOut().setBody("TODO");
   }
  }
  </code></pre>
  
  <p>Logs-
  Message History
  RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
  [sdPoll]            [sdPoll] [timer://sdPoll?fixedRate=true&amp;period=60000                               ] [     21176]
  [null]              [onCompletion1     ] [onCompletion                                                                  ] [       106]
  [sdPoll]            [process7          ] [ref:refProcessor                                                      ] [     21067]
  [null]              [process3          ] [ref:GenericErrorHandle                                                        ] [     21016]</p>
  
  <p>Exchange[
          Id                  ID-ABC-63143-1516034486954-0-2
          ExchangePattern     InOnly
          <strong>Headers             {breadcrumbId=ID-ABC-63143-1516034486954-0-1, CamelRedelivered=false, CamelRedeliveryCounter=0, firedTime=Mon Jan 15 11:41:31 EST 2018}
          BodyType            null
          Body                [Body is null]</strong>
  ]</p>
  
  <p>Java DSL seem to work though! So what is wrong with my Spring DSL config</p>
  
  <pre><code>static RouteBuilder createRouteBuilder3() {
      return new RouteBuilder() {
          public void configure() {
              from("timer://timer1?period=60000").process(new Processor() {
                  public void process(Exchange exchange) throws UnsupportedEncodingException {
                      exchange.getIn().setHeader("CamelHttpMethod", "POST");
                      exchange.getIn().setHeader("Content-Type", "application/json");
                      exchange.getIn().setHeader("Accept", "application/json");
                      exchange.getIn().setHeader("CamelHttpUri",
                              "http://localhost:8280/api/check");
                      exchange.getIn().setHeader("Authorization", "TODO");
  
                      exchange.getIn().setBody("TODO");
                  }
              }).to("http://dummyhost").to("log:DEBUG?showBody=true&amp;showHeaders=true");
          }
      };
  }
  </code></pre>
  
  <p>Message History
  RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
  [route1            ] [route1            ] [timer://timer1?period=60000                                                   ] [        86]
  [route1            ] [process1          ] [RefProcessorCamel$3$1@258e2e41                                        ] [         6]
  [route1            ] [to1               ] [<a href="http://dummyhost" rel="nofollow noreferrer">http://dummyhost</a>                                                              ] [        76]</p>
  
  <p>Exchange[
      Id                  ID-ABC-63940-1516036107063-0-2
      ExchangePattern     InOnly
      <strong>Headers             {Accept=application/json, Authorization=TODO, breadcrumbId=ID-ABC-63994-1516036220042-0-1, CamelHttpMethod=POST, CamelHttpUri=<a href="http://localhost:8280/api/check" rel="nofollow noreferrer">http://localhost:8280/api/check</a>, CamelRedelivered=false, CamelRedeliveryCounter=0, Content-Type=application/json, firedTime=Mon Jan 15 12:10:21 EST 2018}
      BodyType            String
      Body                TODO</strong>
  ]</p>