title: Intercepting cxf web service header with Apache Camel (Java DSL)
body: <p>I created a web service client to handle cxf soap web services with apache camel.</p>
  
  <pre><code>String serviceUri = "cxf:http://localhost:10000/myservice?serviceClass=" + 
      MyRequest.class.getCanonicalName();
  
  from(uri).to("mock:xyz");
  </code></pre>
  
  <p>The web service receives the soap call but throws an exception since the request requires a handling for wss.</p>
  
  <p><em><code>org.apache.cxf.binding.soap.SoapFault: MustUnderstand headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood.</code></em></p>
  
  <p>The reason is, that the service requires ws security, which can be seen by lloking at the request.</p>
  
  <pre><code>&lt;SOAP-ENV:Header&gt;&lt;wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" SOAP-ENV:mustUnderstand="1"&gt;
  </code></pre>
  
  <p>I found out that I need to implement an interceptor to handle header properties.</p>
  
  <p><strong>My questions:</strong></p>
  
  <ul>
  <li><p>How can I add an interceptor to handle the header attributes with Camel Java-DSL?</p></li>
  <li><p>Will this be sufficient to get rid of the SOAP Fault?</p></li>
  </ul>