I have a wsdl with security policy for signing messages. In my endpoint I
have the annotation @SchemaValidation. When a validation throws a SoapFault
the message (with the SoapFault) is not signed. Running CXF in debug mode I
see that the interceptor chain used is different compared to the chain when
no fault occurs. This is normal but what does not seem normal is that the
fault chain does not conatin interceptors
like: PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor which are
required for the message to be signed. Here is the chain when no fault
occurs:

14:14:56,310 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (default
task-4) Chain org.apache.cxf.phase.PhaseInterceptorChain@5a2ad9f8 was
modified. Current flow:
  setup [ServerPolicyOutFaultInterceptor]
  pre-logical [MAPAggregatorImpl, SoapHeaderOutFilterInterceptor,
SecurityVerificationOutInterceptor]
  prepare-send [MessageSenderInterceptor, GenericSecurityOutInterceptor,
Soap12FaultOutInterceptor]
  pre-stream [LoggingOutInterceptor, CustomizeLoggingOutInterceptor,
StaxOutInterceptor]
  pre-protocol [WebFaultOutInterceptor, MAPCodec,
PolicyBasedWSS4JOutInterceptor, UsernameTokenInterceptor]
  write [SoapOutInterceptor]
  marshal [Soap12FaultOutInterceptorInternal]
  post-protocol [PolicyBasedWSS4JOutInterceptorInternal]
  write-ending [SoapOutEndingInterceptor]
  pre-protocol-ending [SAAJOutEndingInterceptor]
  pre-stream-ending [StaxOutEndingInterceptor]
  prepare-send-ending [MessageSenderEndingInterceptor]


and when fault occurs:

12:55:34,500 FINE  [org.apache.cxf.phase.PhaseInterceptorChain] (default
task-3) Chain org.apache.cxf.phase.PhaseInterceptorChain@30f5696 was
created. Current flow:
  setup [ServerPolicyOutFaultInterceptor]
  pre-logical [SoapHeaderOutFilterInterceptor]
  prepare-send [MessageSenderInterceptor, GenericSecurityOutInterceptor,
Soap12FaultOutInterceptor]
  pre-stream [LoggingOutInterceptor, CustomizeLoggingOutInterceptor,
StaxOutInterceptor]
  pre-protocol [WebFaultOutInterceptor]
  write [SoapOutInterceptor]


Am I missing some configuration?

Thank you in advance

Reply via email to