Hi,

We intended to exclude the security header since in Sun's SAAJ impl, the ElementImpl has a field which doesn't implement Serializable interface, which will cause java.io.NotSerializableException when we try to serialize the JBI message, and generally the security header isn't necessary inside jbi container since we have already
delegate the AA to JAAS.
However, If you want to forward the UsernameToken ws-security header, we've already discussed how to do it[1] days ago

[1]http://servicemix.396122.n5.nabble.com/cxfbc-provider-with-WS-Security-and-previous-JAAS-authentication-td5518767.html

Freeman


On 2012-3-2, at 下午5:29, Radomir Kadlec wrote:

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.

---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com









Reply via email to