On CXF2.5.2, I have WS-Security policies declared on WSDL first approach and
works as expected when

@javax.jws.WebService(
                      serviceName = "PingService",
                      portName = "pingPort",
                      targetNamespace = "http://services.mycomp.com/ping";,
                      *wsdlLocation = "classpath:WEB-INF/wsdl/ping.wsdl",*
                      endpointInterface =
"com.mycomp.services.ping.PingPortType")


I try to annotate policies and also comment out wsdlLocation, so that I do
not have to carry all WSDL and supporting XSD's within my codebase. 

@Policies({
    @Policy(uri = "Tranpolicy.xml",
            placement = Policy.Placement.BINDING),
    @Policy(uri = "InPolicy.xml", 
            placement = Policy.Placement.BINDING_OPERATION_INPUT)
})

When I hit my service?WSDL url, I can see the policies embedded into my
WSDL, however when I shoot the payload it does not check for policies.

I uncomment wsdlLocation in @javax.jws.WebService, re-run the scenario and
now see the policies being checked.

I'm using WSDL first model, should I always tell @javax.jws.WebService the
wsdl location for the policies to pickup. If I do, I will end up maintaining
two copies of WSDL, one on my external service registry and the other here. 

Any thoughts please.

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Policy-Annotation-tp5490803p5490803.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to