> I'm not sure if you add a method like:
>
> public void handleMessage(Message m) {
>   if (m instanceof SoapMessage) {
>      handleMessage((SoapMessage)m);
>   }
> }
> or similar if the compiler will even allow that. 

I had similar thoughts, but it doesn't compile:
name clash: handleMessage(org.apache.cxf.message.Message) in
MySoapHeaderInterceptor and handleMessage(T) in
org.apache.cxf.interceptor.Interceptor<org.apache.cxf.binding.soap.SoapMessage>
have the same erasure, yet neither overrides the other

It is possible, though, to just extend AbstractPhaseInterceptor<Message>
directly and do the same thing. There's not too much in
AbstractSoapInterceptor anyway, I can probably live without it. Granted, all
the non-SOAP requests will end up getting intercepted unnecessarily, but I
think I can live with that versus having to configure each endpoint. 

Perhaps binding-level interceptor configuration can be a future enhancement?




-- 
View this message in context: 
http://www.nabble.com/Adding-interceptor-to-binding-via-configuration-tp25826173p25857285.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to