cxf-users mailing list archives

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

Hello,

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:bus>
		<cxf:inInterceptors />
		<cxf:outInterceptors>
			<ref bean="soapHeaderSetter" />
		</cxf:outInterceptors>
		<cxf:inFaultInterceptors />
	</cxf:bus>


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: http://www.nabble.com/Setting-SOAP-header-in-SOAP-response-tf4697009.html#a13426234
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message