title: Issue with adding wsse:security header in Apache Camel Route
body: <p>I am using 
  camel: 2.12.1
  spring: 4.0.5.RELEASE
  CXF : 2.7.13</p>
  
  <p>My goal is to deliver a soap message with wsse:security header(as mentioned below) in Payload mode from my camel router to some endpoint.</p>
  
  <pre><code>&lt;wsse:Security soapenv:mustUnderstand="1"
      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"&gt;
  
      &lt;wsse:UsernameToken
          wsu:Id="UsernameToken-D5896C4D7E4684BCF8141101393698197"&gt;
          &lt;wsse:Username&gt;&lt;xsl:value-of select="User" /&gt;&lt;/wsse:Username&gt;
          &lt;wsse:Password
              Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"&gt;&lt;xsl:value-of select="password" /&gt;&lt;/wsse:Password&gt;
          &lt;wsu:Created&gt;&lt;xsl:value-of select="$START_TIME" /&gt;&lt;/wsu:Created&gt;
      &lt;/wsse:UsernameToken&gt;
  &lt;/wsse:Security&gt;
  </code></pre>
  
  <p>To achieve this, I have created a config file which has the below entry</p>
  
  <pre><code>&lt;jaxws:client name="{http://com.abc/CallingService}CallingService" createdFromAPI="true"&gt;
    &lt;jaxws:properties&gt;
      &lt;entry key="ws-security.username" value= "User" /&gt;
      &lt;entry key="ws-security.password" value="password" /&gt;
    &lt;/jaxws:properties&gt;
  &lt;/jaxws:client&gt;
  </code></pre>
  
  <p>But not sure how can I use this file or call this somewhere in route or some other spring config file , so that I can have a soap header in my out going message.</p>
  
  <p>I am currently getting the exception</p>
  
  <pre><code>org.apache.cxf.ws.policy.PolicyException: No username available
      at org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor.policyNotAsserted(AbstractTokenInterceptor.java:229) ~[cxf-rt-ws-security-2.7.13.jar:2.7.13]
      at org.apache.cxf.ws.security.wss4j.UsernameTokenInterceptor.addUsernameToken(UsernameTokenInterceptor.java:361) ~[cxf-rt-ws-security-2.7.13.jar:2.7.13]
      at org.apache.cxf.ws.security.wss4j.UsernameTokenInterceptor.addToken(UsernameTokenInterceptor.java:307) ~[cxf-rt-ws-security-2.7.13.jar:2.7.13]
      at org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor.handleMessage(AbstractTokenInterceptor.java:95) ~[cxf-rt-ws-security-2.7.13.jar:2.7.13]
      at org.apache.cxf.ws.security.wss4j.AbstractTokenInterceptor.handleMessage(AbstractTokenInterceptor.java:61) ~[cxf-rt-ws-security-2.7.13.jar:2.7.13]
  </code></pre>
  
  <p>My wsdl's policy is as below:</p>
  
  <pre><code> &lt;wsp:Policy wsu:Id="EndpointSecurityPolicy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"&gt;
      &lt;wsp:ExactlyOne&gt;
        &lt;wsp:All&gt;
          &lt;sp:TransportBinding&gt;
            &lt;wsp:Policy&gt;
              &lt;sp:TransportToken&gt;
                &lt;wsp:Policy&gt;
                  &lt;sp:HttpsToken&gt;
                    &lt;wsp:Policy&gt;
                      &lt;sp:RequireClientCertificate/&gt;
                    &lt;/wsp:Policy&gt;
                  &lt;/sp:HttpsToken&gt;
                &lt;/wsp:Policy&gt;
              &lt;/sp:TransportToken&gt;
              &lt;sp:AlgorithmSuite&gt;
                &lt;wsp:Policy&gt;
                  &lt;sp:Basic128/&gt;
                &lt;/wsp:Policy&gt;
              &lt;/sp:AlgorithmSuite&gt;
              &lt;sp:IncludeTimestamp/&gt;
            &lt;/wsp:Policy&gt;
          &lt;/sp:TransportBinding&gt;
          &lt;sp:SupportingTokens&gt;
            &lt;wsp:Policy&gt;
              &lt;sp:UsernameToken&gt;
                &lt;wsp:Policy&gt;
                  &lt;sp:NoPassword/&gt;
                &lt;/wsp:Policy&gt;
              &lt;/sp:UsernameToken&gt;
            &lt;/wsp:Policy&gt;
          &lt;/sp:SupportingTokens&gt;
        &lt;/wsp:All&gt;
        &lt;wsp:All&gt;
          &lt;sp:TransportBinding&gt;
            &lt;wsp:Policy&gt;
              &lt;sp:TransportToken&gt;
                &lt;wsp:Policy&gt;
                  &lt;sp:HttpsToken&gt;
                    &lt;wsp:Policy/&gt;
                  &lt;/sp:HttpsToken&gt;
                &lt;/wsp:Policy&gt;
              &lt;/sp:TransportToken&gt;
              &lt;sp:AlgorithmSuite&gt;
                &lt;wsp:Policy&gt;
                  &lt;sp:Basic128/&gt;
                &lt;/wsp:Policy&gt;
              &lt;/sp:AlgorithmSuite&gt;
              &lt;sp:IncludeTimestamp/&gt;
            &lt;/wsp:Policy&gt;
          &lt;/sp:TransportBinding&gt;
          &lt;sp:SupportingTokens&gt;
            &lt;wsp:Policy&gt;
              &lt;sp:UsernameToken&gt;
                &lt;wsp:Policy&gt;
                  &lt;sp:WssUsernameToken11/&gt;
                &lt;/wsp:Policy&gt;
              &lt;/sp:UsernameToken&gt;
            &lt;/wsp:Policy&gt;
          &lt;/sp:SupportingTokens&gt;
        &lt;/wsp:All&gt;
      &lt;/wsp:ExactlyOne&gt;
    &lt;/wsp:Policy&gt;
  </code></pre>
  
  <p>Any help or pointers?</p>