I have a issue with the *@Policy* annotation in CXF 3.2.0.
My web service is a Java First approach and must use WS-SecurityPolicy that
is implemented in a separated file named policyBinding.xml
In the service endpoint interface i put the reference of the Policy with
I use *JavaToWS *to generate the wsdl file and the policy is included in the
wsdl right,but CXF is not aware about it.
Although the url denoting the address location of the web service shows OK
the wsdl with the policy, CXF (integrated in Tomcat) complains with:
WARNING: Resource classpath:./resources/policyBinding.xml was not found in
and *no policy is enabled* in the web service.
I put the policyBinding.xml in a resource folder (so in the classpath) and
changed the annotation with:
Now the policy works fine in the web service,but command JavaToWS complains
WARNING: Resource classpath:policyBinding.xml was not found in the
How should be the right @Policy annotation that should work in both
I tried this approach that works (obviously with the two warnings) but is
not the best solution.