cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald Pieterse <>
Subject Setting SOAP header in SOAP response
Date Fri, 26 Oct 2007 12:26:01 GMT


I'm trying to set a header in the SOAP response of all my calls.This header
must just contain the version of my service implementation. I'm trying to do
this using an OUT interceptor (extends AbstractSoapInterceptor) which is
defined in my spring file:

        <bean id="soapHeaderSetter"
		class="my.package.SoapHeaderSetter" />

		<cxf:inInterceptors />
			<ref bean="soapHeaderSetter" />
		<cxf:inFaultInterceptors />

The interceptor kicks in alright when I go back to the client but it's
unclear which Phase I need to be in to add the header and also how to set
the header. Do I just get the headers (btw there are no response headers
available - is that correct?) and then add one to the list like this:

        soapMsg.getHeaders().add(new Header(new
QName("http://some.namespace"), "api.version=1.7"));

I suspect that the way I set this header is not entirely correct :-) I could
use some help here. THNX

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message