Thanks a lot Andrei! :) This is about a requirement from our end user.
User defines their web service provider without using WSDL (also doesn't use Spring), they just use @WebService annotation to define service, so they cannot get WSDL file and cannot add any policy in the WSDL file. But they also want to use Policy such as WS-Security for their application. And define some policy on operation level. I have know know to define and add a policy by using POLICY_OVERRIDE, like this: https://github.com/ashakirin/cxf.howtos/blob/master/ws-policy.dynamic/src/main/java/com/example/customerservice/interceptors/DynamicPolicyInInterceptor.java But you know, without WSDL file, I can only define policy by using POLICY_OVERRIDE, but I don't know where to define the WS-Policy attachments relationship between policy and operation. So you know I want to decide at runtime. :) I have a solution: create a new file(such as named attachment.xml) and define the policy and operation/service relationship, like this: wspolicy1|service1:operation1 wspolicy2|service2:operation1 Then I read this relationship and check in my DynamicPolicyInInterceptor if this operation need to bind the policy or not. So I would like to know if this is my right way to do that? or CXF has a better way? Thanks a lot! :) -- View this message in context: http://cxf.547215.n5.nabble.com/Dynamically-set-policy-via-message-property-tp5763695p5764182.html Sent from the cxf-user mailing list archive at Nabble.com.
