Hi Freeman,
it doesn't work.
I created own interceptor and registered it in the cxfbc:provider as out
interceptor for the PRE_PROTOCOL phase.
But the headers map of the normalizedMessage is empty although the client
sends WS-Security headers and another interceptor for the cxfbc:consumer
shows this headers containing in the org.apache.cxf.headers.Header.list
entry of the message.
*Out interceptor:*
public TestOutInterceptor() {
super(Phase.PRE_PROTOCOL);
}
public void handleMessage(Message message) {
MessageExchange exchange = message.get(MessageExchange.class);
NormalizedMessage norMessage = (NormalizedMessage)
exchange.getMessage("in");
Map<String, Object> headers = (Map<String,
Object>)norMessage.getProperty(CxfJbiConstants.PROTOCOL_HEADERS);
System.out.println(headers.size());
}
*cxfbc:consumer:*
<cxfbc:consumer
service="isl-a:FakturaService"
endpoint="FakturaWS"
locationURI="http://${smxUrl}:${httpPort}/faktura"
wsdl="classpath:wsdl/isl_a.wsdl"
targetService="isl-a:FakturaService"
targetEndpoint="FakturaWSProvider"
delegateToJaas="true"
properties="#properties">
<cxfbc:inInterceptors>
<bean class="cz.aura.isl.gateway.security.TestInterceptor" />
<ref bean="UserName_RequestIn" />
</cxfbc:inInterceptors>
</cxfbc:consumer>
*cxfbc:provider:*
<cxfbc:provider
service="isl-a:FakturaService"
endpoint="FakturaWSProvider"
wsdl="classpath:wsdl/isl_a_provider.wsdl"
locationURI="http://${smxUrl}:${httpPort}/fakturaFile"
properties="#properties">
<cxfbc:outInterceptors>
<bean class="cz.aura.isl.gateway.security.TestOutInterceptor" />
</cxfbc:outInterceptors>
</cxfbc:provider>
Thanks,
Radomir
--
View this message in context:
http://servicemix.396122.n5.nabble.com/How-to-forward-soap-headers-tp5527861p5530466.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.