You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2016/05/24 17:31:13 UTC

cxf git commit: Support @Policy annotation on impl methods. Fixes the Policy annotation test Colm added

Repository: cxf
Updated Branches:
  refs/heads/master abc147c8c -> 28f130c59


Support @Policy annotation on impl methods. Fixes the Policy annotation test Colm added


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/28f130c5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/28f130c5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/28f130c5

Branch: refs/heads/master
Commit: 28f130c59cad98037b4812f21d3610b96a3edc49
Parents: abc147c
Author: Daniel Kulp <dk...@apache.org>
Authored: Tue May 24 13:30:21 2016 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Tue May 24 13:30:21 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java | 5 ++---
 .../cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java  | 4 +++-
 .../cxf/systest/ws/fault/DoubleItPortTypeImplJavaFirst.java     | 4 +++-
 .../test/java/org/apache/cxf/systest/ws/fault/FaultTest.java    | 2 --
 4 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/28f130c5/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
index b35295e..c9e2e32 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
@@ -91,9 +91,8 @@ public class PolicyAnnotationListener implements FactoryBeanListener {
             if (ep.getEndpointInfo().getInterface() != null) {
                 addPolicies(factory, ep, cls);
             
-                // this will allow us to support annotations in Implementations, but only for
-                // class level annotations.  Method level annotations are not currently supported
-                // for implementations.  The call has been moved here so that the ServiceInfo
+                // this will allow us to support annotations in Implementations.
+                // The call has been moved here so that the ServiceInfo
                 // policy stuff is loaded before jaxws factory calls the PolicyEngineImpl
                 addEndpointImplPolicies(factory, ep, implCls);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/28f130c5/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
index 1c65fac..c55b832 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
+++ b/rt/wsdl/src/main/java/org/apache/cxf/wsdl/service/factory/ReflectionServiceFactoryBean.java
@@ -84,6 +84,7 @@ import org.apache.cxf.resource.ResourceManager;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.ServiceImpl;
 import org.apache.cxf.service.ServiceModelSchemaValidator;
+import org.apache.cxf.service.factory.FactoryBeanListener;
 import org.apache.cxf.service.factory.FactoryBeanListener.Event;
 import org.apache.cxf.service.factory.ServiceConstructionException;
 import org.apache.cxf.service.factory.SimpleMethodDispatcher;
@@ -355,7 +356,8 @@ public class ReflectionServiceFactoryBean extends org.apache.cxf.service.factory
     }
 
     public void updateBindingOperation(BindingOperationInfo boi) {
-        //nothing
+        Method m = getMethodDispatcher().getMethod(boi);
+        sendEvent(FactoryBeanListener.Event.BINDING_OPERATION_CREATED, boi.getBinding(), boi, m);
     }
 
     public Endpoint createEndpoint(EndpointInfo ei) throws EndpointException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/28f130c5/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/DoubleItPortTypeImplJavaFirst.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/DoubleItPortTypeImplJavaFirst.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/DoubleItPortTypeImplJavaFirst.java
index 0d3d6a7..fbbf957 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/DoubleItPortTypeImplJavaFirst.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/DoubleItPortTypeImplJavaFirst.java
@@ -30,7 +30,9 @@ import org.example.contract.doubleit.DoubleItFault;
 import org.example.contract.doubleit.DoubleItPortType;
 
 @WebService(targetNamespace = "http://www.example.org/contract/DoubleIt", 
-            serviceName = "DoubleItService", 
+            serviceName = "DoubleItService",
+            portName = "DoubleItSoap11NoPolicyBinding",
+            name = "DoubleItSoap11NoPolicyBinding",
             endpointInterface = "org.example.contract.doubleit.DoubleItPortType")
 @Features(features = "org.apache.cxf.feature.LoggingFeature")     
 // @Policy(uri = "classpath:/org/apache/cxf/systest/ws/fault/SymmetricUTPolicy.xml")

http://git-wip-us.apache.org/repos/asf/cxf/blob/28f130c5/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
index 755f11b..e34a511 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
@@ -259,10 +259,8 @@ public class FaultTest extends AbstractBusClientServerTestBase {
         bus.shutdown(true);
     }
     
-    // TODO - There seems to be a bug when a security policy is applied to a method as opposed to the class
     // See DoubleItPortTypeImplJavaFirst
     @org.junit.Test
-    @org.junit.Ignore
     public void testJavaFirst() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();