My hack definately works well! https://github.com/pellcorp/cxf/blob/master/PolicySample/src/main/java/com/pellcorp/server/OperationDisablePolicyInterceptor.java
On Wed, Feb 6, 2013 at 9:35 PM, Jason Pell <[email protected]> wrote: > Hi, > > I thought I could get in just before the PolicyInInterceptor and check > the BindingOperationInfo, but that won't be available until the > data binding / soap action interceptors are executed which is after > this interceptor. > > Is it possible to somehow ignore policies failures in an interceptor > based on an operation. For instance I was wondering if I could > do something as simple as create an interceptor which executes > immediately before PolicyVerificationInInterceptor. Check the > BindingOperationInfo and if it matches an operation name for which we > want to ignore policies I remove the AssertionInfoMap > from the message. This would cause the > PolicyVerificationInInterceptor to bail out. > > I am going to give it a try, at first glance it feels like a giant > hack, but as I cannot get ws policy alternatives to work at > an operation level (CXF-4813) and I don't really have a lot of time > for this, I am thinking this would be a viable fallback > until the cxf issue is fixed (if it can easily be fixed) > > I want to disable ws policy for the Ping method in my service.
