Yeah, you can do it by setting up a customer interceptor on the CXF endpoint.
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Tuesday, January 29, 2013 at 3:37 AM, peter.berkman wrote: > not sure if this is the same, but I had to do something similar for SAML. > > I did it through an Interecepter: > > {code} > public class SAMLResponseInterceptor extends AbstractSoapInterceptor { > > private static final transient Logger LOG = > LoggerFactory.getLogger(SAMLResponseInterceptor.class); > > public SAMLResponseInterceptor() { > super(Phase.PRE_PROTOCOL); > } > > @Override > public void handleMessage(SoapMessage message) throws Fault { > > LOG.debug("Out interceptor called....."); > > SAMLHelper sam = new SAMLHelper(); > > Element saml = sam.getResponseSAML(); > > if (saml != null) { > > QName q = new > QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","Security", > "wsse"); > Header h = message.getHeader(q); > > if (h == null) { > > QName q1 = new > QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd","Security", > "o"); > Header h1 = message.getHeader(q1); > > if (h1 == null) { > > h = new Header(q, saml); > message.getHeaders().add(h); > LOG.debug("New soap header added"); > } > else { > h1.setObject(saml); > LOG.debug("soap header updated"); > } > } > else { > h.setObject(saml); > LOG.debug("soap header updated"); > } > } > } > } > > {code} > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/insert-custom-Soap-Header-problem-tp5726415p5726438.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).