Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4665A200B61 for ; Mon, 25 Jul 2016 17:30:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 450FE160A67; Mon, 25 Jul 2016 15:30:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 027B2160A9A for ; Mon, 25 Jul 2016 17:30:36 +0200 (CEST) Received: (qmail 69791 invoked by uid 500); 25 Jul 2016 15:30:36 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 69241 invoked by uid 99); 25 Jul 2016 15:30:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2016 15:30:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7CF5DE78B1; Mon, 25 Jul 2016 15:30:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dkulp@apache.org To: commits@cxf.apache.org Date: Mon, 25 Jul 2016 15:30:43 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [09/14] cxf git commit: Support @Policy annotation on impl methods. Fixes the Policy annotation test Colm added archived-at: Mon, 25 Jul 2016 15:30:38 -0000 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/cc929d44 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/cc929d44 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/cc929d44 Branch: refs/heads/3.0.x-fixes Commit: cc929d442fde164932a0e25571689accbad72015 Parents: 35b808c Author: Daniel Kulp Authored: Tue May 24 13:30:21 2016 -0400 Committer: Daniel Kulp Committed: Mon Jul 25 10:23:47 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/cc929d44/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/cc929d44/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 e93d790..872076e 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/cc929d44/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/cc929d44/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 81f8242..f81f452 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 @@ -261,10 +261,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();