[cxf] branch master updated: Ensuring OpenApiFeature.DefaultApplication does only consider the classes from the specified resourcePackages (if provided)

2018-02-08 Thread ilgrosso
This is an automated email from the ASF dual-hosted git repository.

ilgrosso pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
 new e7b178a  Ensuring OpenApiFeature.DefaultApplication does only consider 
the classes from the specified resourcePackages (if provided)
e7b178a is described below

commit e7b178a92302786eca0233f9d176ded2d9086dde
Author: Francesco Chicchiriccò 
AuthorDate: Thu Feb 8 14:14:11 2018 +0100

Ensuring OpenApiFeature.DefaultApplication does only consider the classes 
from the specified resourcePackages (if provided)
---
 .../apache/cxf/jaxrs/openapi/OpenApiFeature.java   | 32 ++
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git 
a/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java
 
b/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java
index c327b1f..68f837c 100644
--- 
a/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java
+++ 
b/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java
@@ -22,6 +22,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Enumeration;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Properties;
@@ -40,6 +41,7 @@ import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.feature.AbstractFeature;
 import org.apache.cxf.jaxrs.JAXRSServiceFactoryBean;
 import org.apache.cxf.jaxrs.model.ApplicationInfo;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
 import org.apache.cxf.jaxrs.swagger.SwaggerUiSupport;
 
@@ -99,11 +101,19 @@ public class OpenApiFeature extends AbstractFeature 
implements SwaggerUiSupport,
 private String propertiesLocation = DEFAULT_PROPS_LOCATION;
 
 protected static class DefaultApplication extends Application {
+
 private final Set> serviceClasses;
-
-DefaultApplication(Set> serviceClasses) {
-this.serviceClasses = serviceClasses;
+
+DefaultApplication(final List cris, final 
Set resourcePackages) {
+this.serviceClasses = 
cris.stream().map(ClassResourceInfo::getServiceClass).
+filter(cls -> {
+return resourcePackages == null || 
resourcePackages.isEmpty()
+   ? true
+   : resourcePackages.stream().
+   anyMatch(pkg -> 
cls.getPackage().getName().startsWith(pkg));
+}).collect(Collectors.toSet());
 }
+
 @Override
 public Set> getClasses() {
 return serviceClasses;
@@ -424,21 +434,21 @@ public class OpenApiFeature extends AbstractFeature 
implements SwaggerUiSupport,
 }
 
 /**
- * Detects the application (if present) or creates the default application 
(in case the
- * scan is disabled)
+ * Detects the application (if present) or creates the default application 
(in case the scan is disabled).
  */
-protected Application getApplicationOrDefault(Server server, 
ServerProviderFactory factory, 
-JAXRSServiceFactoryBean sfb, Bus bus) {
+protected Application getApplicationOrDefault(
+final Server server,
+final ServerProviderFactory factory,
+final JAXRSServiceFactoryBean sfb,
+final Bus bus) {
 
 ApplicationInfo appInfo = null;
 if (!isScan()) {
 appInfo = factory.getApplicationProvider();
 
 if (appInfo == null) {
-Set> serviceClasses = 
sfb.getClassResourceInfo().stream().
-map(cri -> cri.getServiceClass()).
-collect(Collectors.toSet());
-appInfo = new ApplicationInfo(new 
DefaultApplication(serviceClasses), bus);
+appInfo = new ApplicationInfo(
+new DefaultApplication(sfb.getClassResourceInfo(), 
resourcePackages), bus);
 server.getEndpoint().put(Application.class.getName(), appInfo);
 }
 }

-- 
To stop receiving notification emails like this one, please contact
ilgro...@apache.org.


[cxf] 02/02: Recording .gitmergeinfo Changes

2018-02-08 Thread coheigea
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit ad44e257dffa43587f97368ec92e1d5a0dcd189d
Author: Colm O hEigeartaigh 
AuthorDate: Thu Feb 8 09:53:09 2018 +

Recording .gitmergeinfo Changes
---
 .gitmergeinfo|  1 +
 .../java/org/apache/cxf/systest/ws/action/ActionTest.java| 12 ++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/.gitmergeinfo b/.gitmergeinfo
index c1c16d5..14f5dc6 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -829,6 +829,7 @@ M 5afec44d741580762fb5d6f4f4fac7d34446ae95
 M 5b7b014cc1d24cba1191bc07fd48b13dbf4d4391
 M 5c7031e8f555686ba6fe6d37e23db229dd4b73c7
 M 5cff82c735c7543ce6dfb6c52ac72f583dbb5d22
+M 5d67785208334062a950dc7f85ffcb7d52af3db5
 M 5d7a27d87a44d3e87f97d446e14301ad0a4e457c
 M 5e17bc043723353937ee7f1f9ac1c51c83b74679
 M 5f6cb0745adc5d8cb6dd53a46751f56f42928d94
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
index 6cd6b43..41cf09e 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
@@ -458,8 +458,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
 URL busFile = ActionTest.class.getResource("client.xml");
 
 Bus bus = bf.createBus(busFile.toString());
-BusFactory.setDefaultBus(bus);
-BusFactory.setThreadDefaultBus(bus);
+SpringBusFactory.setDefaultBus(bus);
+SpringBusFactory.setThreadDefaultBus(bus);
 
 URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
 Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -493,8 +493,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
 URL busFile = ActionTest.class.getResource("client.xml");
 
 Bus bus = bf.createBus(busFile.toString());
-BusFactory.setDefaultBus(bus);
-BusFactory.setThreadDefaultBus(bus);
+SpringBusFactory.setDefaultBus(bus);
+SpringBusFactory.setThreadDefaultBus(bus);
 
 URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
 Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -535,8 +535,8 @@ public class ActionTest extends 
AbstractBusClientServerTestBase {
 URL busFile = ActionTest.class.getResource("client.xml");
 
 Bus bus = bf.createBus(busFile.toString());
-BusFactory.setDefaultBus(bus);
-BusFactory.setThreadDefaultBus(bus);
+SpringBusFactory.setDefaultBus(bus);
+SpringBusFactory.setThreadDefaultBus(bus);
 
 URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
 Service service = Service.create(wsdl, SERVICE_QNAME);

-- 
To stop receiving notification emails like this one, please contact
cohei...@apache.org.


[cxf] branch 3.1.x-fixes updated (abdad0d -> ad44e25)

2018-02-08 Thread coheigea
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a change to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


from abdad0d  [CXF-7637] Making openapi json path configurable
 new 4fe93ce  Adding WS-Security dispatch tests
 new ad44e25  Recording .gitmergeinfo Changes

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitmergeinfo  |   1 +
 .../apache/cxf/systest/ws/action/ActionTest.java   | 166 +++--
 .../systest/ws/action/SignatureWhitespaceTest.java |  19 +-
 .../systest/ws/algsuite/AlgorithmSuiteTest.java|  42 ++--
 .../ws/algsuite/StaxAlgorithmSuiteTest.java|  10 +-
 .../cxf/systest/ws/basicauth/BasicAuthTest.java|  10 +-
 .../systest/ws/bindings/BindingPropertiesTest.java |  50 ++--
 .../apache/cxf/systest/ws/cache/CachingTest.java   |  12 +-
 .../CryptoCoverageCheckerTest.java |  36 +--
 .../org/apache/cxf/systest/ws/fault/FaultTest.java |  22 +-
 .../org/apache/cxf/systest/ws/gcm/GCMTest.java |  27 ++-
 .../cxf/systest/ws/https/HttpsTokenTest.java   |  16 +-
 .../org/apache/cxf/systest/ws/parts/PartsTest.java |  48 ++--
 .../systest/ws/tokens/BinarySecurityTokenTest.java |   6 +-
 .../ws/tokens/EndorsingSupportingTokenTest.java|  12 +-
 .../cxf/systest/ws/tokens/SupportingTokenTest.java |  24 +-
 .../systest/ws/ut/UsernameTokenDerivedTest.java|  42 ++--
 .../cxf/systest/ws/ut/UsernameTokenPolicyTest.java |  30 +--
 .../cxf/systest/ws/ut/UsernameTokenTest.java   |  64 ++---
 .../apache/cxf/systest/ws/wssc/WSSCUnitTest.java   |  12 +-
 .../apache/cxf/systest/ws/x509/X509TokenTest.java  | 258 ++---
 .../org/apache/cxf/systest/ws/xkms/XKMSTest.java   |  12 +-
 .../cxf/systest/ws/action/DoubleItAction.wsdl  |   3 +
 .../org/apache/cxf/systest/ws/action/server.xml|  13 ++
 24 files changed, 549 insertions(+), 386 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
cohei...@apache.org.


[cxf] 01/02: Adding WS-Security dispatch tests

2018-02-08 Thread coheigea
This is an automated email from the ASF dual-hosted git repository.

coheigea pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 4fe93ce2e2e31fe794436e1cb339d1f9bf41ef6a
Author: Colm O hEigeartaigh 
AuthorDate: Wed Feb 7 18:25:55 2018 +

Adding WS-Security dispatch tests

(cherry picked from commit 5d67785208334062a950dc7f85ffcb7d52af3db5)

# Conflicts:
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/SignatureWhitespaceTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/AlgorithmSuiteTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/algsuite/StaxAlgorithmSuiteTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/cache/CachingTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/coverage_checker/CryptoCoverageCheckerTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/FaultTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/gcm/GCMTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/https/HttpsTokenTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/parts/PartsTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/BinarySecurityTokenTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/EndorsingSupportingTokenTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/tokens/SupportingTokenTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenDerivedTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenPolicyTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/ut/UsernameTokenTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/wssc/WSSCUnitTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/x509/X509TokenTest.java
#   
systests/ws-security/src/test/java/org/apache/cxf/systest/ws/xkms/XKMSTest.java
---
 .../apache/cxf/systest/ws/action/ActionTest.java   | 166 +++--
 .../systest/ws/action/SignatureWhitespaceTest.java |  19 +-
 .../systest/ws/algsuite/AlgorithmSuiteTest.java|  42 ++--
 .../ws/algsuite/StaxAlgorithmSuiteTest.java|  10 +-
 .../cxf/systest/ws/basicauth/BasicAuthTest.java|  10 +-
 .../systest/ws/bindings/BindingPropertiesTest.java |  50 ++--
 .../apache/cxf/systest/ws/cache/CachingTest.java   |  12 +-
 .../CryptoCoverageCheckerTest.java |  36 +--
 .../org/apache/cxf/systest/ws/fault/FaultTest.java |  22 +-
 .../org/apache/cxf/systest/ws/gcm/GCMTest.java |  27 ++-
 .../cxf/systest/ws/https/HttpsTokenTest.java   |  16 +-
 .../org/apache/cxf/systest/ws/parts/PartsTest.java |  48 ++--
 .../systest/ws/tokens/BinarySecurityTokenTest.java |   6 +-
 .../ws/tokens/EndorsingSupportingTokenTest.java|  12 +-
 .../cxf/systest/ws/tokens/SupportingTokenTest.java |  24 +-
 .../systest/ws/ut/UsernameTokenDerivedTest.java|  42 ++--
 .../cxf/systest/ws/ut/UsernameTokenPolicyTest.java |  30 +--
 .../cxf/systest/ws/ut/UsernameTokenTest.java   |  64 ++---
 .../apache/cxf/systest/ws/wssc/WSSCUnitTest.java   |  12 +-
 .../apache/cxf/systest/ws/x509/X509TokenTest.java  | 258 ++---
 .../org/apache/cxf/systest/ws/xkms/XKMSTest.java   |  12 +-
 .../cxf/systest/ws/action/DoubleItAction.wsdl  |   3 +
 .../org/apache/cxf/systest/ws/action/server.xml|  13 ++
 23 files changed, 548 insertions(+), 386 deletions(-)

diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
index cab2667..6cd6b43 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
@@ -19,18 +19,30 @@
 
 package org.apache.cxf.systest.ws.action;
 
+import java.io.StringReader;
 import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.xml.namespace.QName;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.ws.Dispatch;
 import javax.xml.ws.Service;
 
+import org.w3c.dom.Document;
+
 import org.apache.cxf.Bus;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.jaxws.DispatchImpl;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.systest.ws.common.KeystorePasswordCallback;
 impor