Hi Roland,

It's upto your requirement at which phase it should be added. I don't see any problem in the way you are setting header. Do you mean to say that interceptor kicks in but you don't see soap header other side?

Regards,

Ulhas Bhole

Ronald Pieterse wrote:
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


----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to