Not sure if its helpful, but if you define the policies on the jaxws web
service interface or impl, you can use the placement parameter to control
when they get applied.  For instance I use the following:

@Policy(uri = "#EndpointSecurityPolicy", placement =
Policy.Placement.BINDING_OPERATION_INPUT)

My #EndpointSecurityPolicy is defined in spring, but you could reference a
classpath uri .

Not sure what you meant by programmically, but this only works for java
first.


On Wed, Aug 28, 2013 at 9:00 PM, Phil Sladen <[email protected]>wrote:

> Thanks. I understand the interceptor mechanism a bit more now. In the end,
> because I didn't want to duplicate the policy configuration for each
> service
> (no way to set the policy via the bus), I just add a policy out interceptor
> (as can be found on the net) which creates the Policy and adds it as a
> message property. Thanks again for your help.
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/How-to-stop-WS-Security-policy-being-applied-to-inbound-message-tp5732575p5733159.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to