cxf git commit: [CXF-6132] More changes to JaxrsServletContainerInitializer

2015-01-28 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master 2cb99eed1 - d021b9041


[CXF-6132] More changes to JaxrsServletContainerInitializer


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

Branch: refs/heads/master
Commit: d021b9041e00518099947274455b2027326a3c7c
Parents: 2cb99ee
Author: Sergey Beryozkin sberyoz...@talend.com
Authored: Wed Jan 28 13:32:51 2015 +
Committer: Sergey Beryozkin sberyoz...@talend.com
Committed: Wed Jan 28 13:32:51 2015 +

--
 .../JaxrsServletContainerInitializer.java   | 125 +++
 1 file changed, 99 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/d021b904/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
--
diff --git 
a/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
 
b/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
index 4eb3575..4f7f42b 100644
--- 
a/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
+++ 
b/rt/rs/http-sci/src/main/java/org/apache/cxf/jaxrs/servlet/JaxrsServletContainerInitializer.java
@@ -22,6 +22,7 @@ import java.lang.annotation.Annotation;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 import java.util.logging.Logger;
@@ -29,8 +30,10 @@ import java.util.logging.Logger;
 import javax.servlet.ServletContainerInitializer;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
+import javax.servlet.ServletRegistration;
 import javax.servlet.ServletRegistration.Dynamic;
 import javax.servlet.annotation.HandlesTypes;
+import javax.ws.rs.ApplicationPath;
 import javax.ws.rs.Path;
 import javax.ws.rs.core.Application;
 import javax.ws.rs.ext.Provider;
@@ -42,29 +45,111 @@ public class JaxrsServletContainerInitializer implements 
ServletContainerInitial
 private static final Logger LOG = 
LogUtils.getL7dLogger(JaxrsServletContainerInitializer.class);
 private static final String IGNORE_PACKAGE = org.apache.cxf;
 
-private static final String IGNORE_APP_PATH_PARAM = 
jaxrs.application.address.ignore;
-private static final String SERVICE_CLASSES_PARAM = jaxrs.serviceClasses;
-private static final String PROVIDERS_PARAM = jaxrs.providers;
 private static final String JAXRS_APPLICATION_PARAM = 
javax.ws.rs.Application;
-
+private static final String CXF_JAXRS_APPLICATION_PARAM = 
jaxrs.application;
+private static final String CXF_JAXRS_CLASSES_PARAM = jaxrs.classes;
+
 @Override
 public void onStartup(final Set Class ?   classes, final 
ServletContext ctx) throws ServletException {
-final Dynamic servlet =  ctx.addServlet(CXFServlet, 
CXFNonSpringJaxrsServlet.class);
-servlet.addMapping(/*);
+Application app = null;
+String servletName = null;
+String servletMapping = null;
 
-final Class ?  application = findCandidate(classes);
-if (application != null) {
-servlet.setInitParameter(JAXRS_APPLICATION_PARAM, 
application.getName());
-servlet.setInitParameter(IGNORE_APP_PATH_PARAM, false);
-} else {
+final Class ?  appClass = findCandidate(classes);
+if (appClass != null) {
+// The best effort at detecting a CXFNonSpringJaxrsServlet 
handling this application.
+// Custom servlets using non-standard mechanisms to create 
Application will not be detected
+if (isApplicationServletAvailable(ctx, appClass)) {
+return;
+}
+try {
+app = (Application)appClass.newInstance();
+} catch (Throwable t) {
+throw new ServletException(t);
+}
+// Servlet name is the application class name
+servletName = appClass.getName();
+ApplicationPath appPath = 
appClass.getAnnotation(ApplicationPath.class);
+// If ApplicationPath is available - use its value as a mapping 
otherwise get it from 
+// a servlet registration with an application implementation class 
name 
+if (appPath != null) {
+servletMapping = appPath.value() + /*;
+} else {
+servletMapping = getServletMapping(ctx, servletName);
+}
+} 
+// If application is null or empty then try to create a new 
application 

cxf-fediz git commit: Fixing failing test

2015-01-28 Thread coheigea
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 70b5a85b1 - bf7fca89f


Fixing failing test


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

Branch: refs/heads/master
Commit: bf7fca89f2d1e584788df2c69ed9b09713fa0c1e
Parents: 70b5a85
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Wed Jan 28 10:55:14 2015 +
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Wed Jan 28 10:55:14 2015 +

--
 .../apache/cxf/fediz/core/federation/FederationResponseTest.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/bf7fca89/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/FederationResponseTest.java
--
diff --git 
a/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/FederationResponseTest.java
 
b/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/FederationResponseTest.java
index a9b873b..853ce56 100644
--- 
a/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/FederationResponseTest.java
+++ 
b/plugins/core/src/test/java/org/apache/cxf/fediz/core/federation/FederationResponseTest.java
@@ -1324,7 +1324,7 @@ public class FederationResponseTest {
 
 builder.setKeyIdentifierType(WSConstants.ISSUER_SERIAL);
 builder.setSymmetricEncAlgorithm(WSConstants.AES_128);
-builder.setKeyEncAlgo(WSConstants.KEYTRANSPORT_RSA15);
+builder.setKeyEncAlgo(WSConstants.KEYTRANSPORT_RSAOEP);
 builder.setEmbedEncryptedKey(true);
 
 WSEncryptionPart encryptionPart = new 
WSEncryptionPart(assertion.getId(), Element);



cxf git commit: [CXF-6200] Initial support for setting custom model java types and having default methods used with regular methods

2015-01-28 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/master e5e222baf - 4710298eb


[CXF-6200] Initial support for setting custom model java types and having 
default methods used with regular methods


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

Branch: refs/heads/master
Commit: 4710298ebad5e5acd3654b4bdb1a7839e444e39d
Parents: e5e222b
Author: Sergey Beryozkin sberyoz...@talend.com
Authored: Wed Jan 28 17:26:57 2015 +
Committer: Sergey Beryozkin sberyoz...@talend.com
Committed: Wed Jan 28 17:26:57 2015 +

--
 .../cxf/jaxrs/JAXRSServiceFactoryBean.java  |  2 +-
 .../org/apache/cxf/jaxrs/model/Parameter.java   | 11 ++-
 .../apache/cxf/jaxrs/utils/ResourceUtils.java   | 88 +++-
 .../src/main/resources/schemas/jaxrs-common.xsd |  1 +
 ...AXRSClientServerUserResourceDefaultTest.java | 23 -
 5 files changed, 83 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/4710298e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
index 6230e24..b674185 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
@@ -189,7 +189,7 @@ public class JAXRSServiceFactoryBean extends 
AbstractServiceFactoryBean {
 MapString, UserResource map = userResourcesAsMap(resources);
 for (Class? sClass : sClasses) {
 ClassResourceInfo cri = 
ResourceUtils.createServiceClassResourceInfo(
-map, map.get(sClass.getName()), sClass, false, true, 
enableStatic, getBus());
+map, map.get(sClass.getName()), sClass, true, enableStatic, 
getBus());
 if (cri != null) {
 classResourceInfos.add(cri);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4710298e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
index 4e04680..d2fbe40 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
@@ -28,6 +28,7 @@ public class Parameter {
 private String aValue;
 private boolean isEncoded;
 private String defaultValue;
+private Class? javaType;
 
 public Parameter() {
 
@@ -91,8 +92,14 @@ public class Parameter {
 public void setDefaultValue(String dValue) {
 defaultValue = dValue;
 }
+public void setJavaType(Class? jType) {
+this.javaType = jType;
+}
 public Class? getJavaType() {
-//TODO: support the conversion from xs:int or Java class names 
(DOMSource, etc)
-return type == ParameterType.REQUEST_BODY ? InputStream.class : 
String.class;
+if (javaType == null) {
+return type == ParameterType.REQUEST_BODY ? InputStream.class : 
String.class;
+} else {
+return javaType;
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4710298e/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
index c549936..f524f10 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
@@ -75,9 +75,11 @@ import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.jaxb.JAXBUtils;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+import org.apache.cxf.jaxrs.ext.DefaultMethod;
 import org.apache.cxf.jaxrs.ext.xml.ElementClass;
 import org.apache.cxf.jaxrs.ext.xml.XMLName;
 import org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider;
@@ -188,13 +190,12 

cxf git commit: [CXF-6200] Initial support for setting custom model java types and having default methods used with regular methods

2015-01-28 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 2783922f0 - 93c7a9839


[CXF-6200] Initial support for setting custom model java types and having 
default methods used with regular methods


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

Branch: refs/heads/3.0.x-fixes
Commit: 93c7a983914b27c2af3e614608abaef317b23a91
Parents: 2783922
Author: Sergey Beryozkin sberyoz...@talend.com
Authored: Wed Jan 28 17:26:57 2015 +
Committer: Sergey Beryozkin sberyoz...@talend.com
Committed: Wed Jan 28 17:28:05 2015 +

--
 .../cxf/jaxrs/JAXRSServiceFactoryBean.java  |  2 +-
 .../org/apache/cxf/jaxrs/model/Parameter.java   | 11 ++-
 .../apache/cxf/jaxrs/utils/ResourceUtils.java   | 88 +++-
 .../src/main/resources/schemas/jaxrs-common.xsd |  1 +
 ...AXRSClientServerUserResourceDefaultTest.java | 23 -
 5 files changed, 83 insertions(+), 42 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/93c7a983/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
index 6230e24..b674185 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
@@ -189,7 +189,7 @@ public class JAXRSServiceFactoryBean extends 
AbstractServiceFactoryBean {
 MapString, UserResource map = userResourcesAsMap(resources);
 for (Class? sClass : sClasses) {
 ClassResourceInfo cri = 
ResourceUtils.createServiceClassResourceInfo(
-map, map.get(sClass.getName()), sClass, false, true, 
enableStatic, getBus());
+map, map.get(sClass.getName()), sClass, true, enableStatic, 
getBus());
 if (cri != null) {
 classResourceInfos.add(cri);
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/93c7a983/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
index 4e04680..d2fbe40 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/Parameter.java
@@ -28,6 +28,7 @@ public class Parameter {
 private String aValue;
 private boolean isEncoded;
 private String defaultValue;
+private Class? javaType;
 
 public Parameter() {
 
@@ -91,8 +92,14 @@ public class Parameter {
 public void setDefaultValue(String dValue) {
 defaultValue = dValue;
 }
+public void setJavaType(Class? jType) {
+this.javaType = jType;
+}
 public Class? getJavaType() {
-//TODO: support the conversion from xs:int or Java class names 
(DOMSource, etc)
-return type == ParameterType.REQUEST_BODY ? InputStream.class : 
String.class;
+if (javaType == null) {
+return type == ParameterType.REQUEST_BODY ? InputStream.class : 
String.class;
+} else {
+return javaType;
+}
 }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/93c7a983/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
--
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
index c549936..f524f10 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
@@ -75,9 +75,11 @@ import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.jaxb.JAXBUtils;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
+import org.apache.cxf.jaxrs.ext.DefaultMethod;
 import org.apache.cxf.jaxrs.ext.xml.ElementClass;
 import org.apache.cxf.jaxrs.ext.xml.XMLName;
 import org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider;
@@ 

cxf git commit: Fixing a compilation issue on 2.7.x

2015-01-28 Thread sergeyb
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 76ca92b1f - 0300a5eb3


Fixing a compilation issue on 2.7.x


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

Branch: refs/heads/2.7.x-fixes
Commit: 0300a5eb33c434f4b682168933156b1c7768ed89
Parents: 76ca92b
Author: Sergey Beryozkin sberyoz...@talend.com
Authored: Wed Jan 28 17:40:15 2015 +
Committer: Sergey Beryozkin sberyoz...@talend.com
Committed: Wed Jan 28 17:40:15 2015 +

--
 .../apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java| 9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/0300a5eb/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
--
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
index c1c7237..c16fc18 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/atom/AtomPojoProvider.java
@@ -47,7 +47,6 @@ import javax.ws.rs.ext.MessageBodyWriter;
 import javax.ws.rs.ext.Provider;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.Unmarshaller;
-import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
 import org.apache.abdera.Abdera;
@@ -669,12 +668,8 @@ public class AtomPojoProvider extends 
AbstractConfigurableProvider
 } catch (Exception ex) {
 reportError(Object of type  + cls.getName() +  can not be 
deserialized from Entry, ex, 400);
 } finally {
-try {
-if (xreader != null) {
-StaxUtils.close(xreader);
-}
-} catch (XMLStreamException e) {
-//ignore
+if (xreader != null) {
+StaxUtils.close(xreader);
 }
 }
 }



cxf git commit: Fixing failing test with restricted security policies installed

2015-01-28 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 32e2daf83 - 2783922f0


Fixing failing test with restricted security policies installed


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

Branch: refs/heads/3.0.x-fixes
Commit: 2783922f009ce82e338633fc914b7095d5f43286
Parents: 32e2daf
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Wed Jan 28 16:59:30 2015 +
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Wed Jan 28 17:00:35 2015 +

--
 .../systest/ws/fault/ModifiedRequestTest.java   | 23 
 1 file changed, 23 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/2783922f/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
--
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
index 7205ce5..af38d6e 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
@@ -59,6 +59,9 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 private static final String NAMESPACE = 
http://www.example.org/contract/DoubleIt;;
 private static final QName SERVICE_QNAME = new QName(NAMESPACE, 
DoubleItService);
 
+private static boolean unrestrictedPoliciesInstalled = 
+SecurityTestUtil.checkUnrestrictedPoliciesInstalled();
+
 @BeforeClass
 public static void startServers() throws Exception {
 assertTrue(
@@ -77,6 +80,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedSignedTimestamp() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);
@@ -115,6 +122,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedSignature() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);
@@ -153,6 +164,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testUntrustedSignature() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = 
ModifiedRequestTest.class.getResource(client-untrusted.xml);
@@ -182,6 +197,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedEncryptedKey() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);
@@ -220,6 +239,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedEncryptedSOAPBody() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);



cxf git commit: Fixing failing test with restricted security policies installed

2015-01-28 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/master d021b9041 - e5e222baf


Fixing failing test with restricted security policies installed


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

Branch: refs/heads/master
Commit: e5e222baf93397dd33c4c7062a14e891061d3bd9
Parents: d021b90
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Wed Jan 28 16:59:30 2015 +
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Wed Jan 28 16:59:30 2015 +

--
 .../systest/ws/fault/ModifiedRequestTest.java   | 23 
 1 file changed, 23 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/e5e222ba/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
--
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
index 7205ce5..af38d6e 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
@@ -59,6 +59,9 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 private static final String NAMESPACE = 
http://www.example.org/contract/DoubleIt;;
 private static final QName SERVICE_QNAME = new QName(NAMESPACE, 
DoubleItService);
 
+private static boolean unrestrictedPoliciesInstalled = 
+SecurityTestUtil.checkUnrestrictedPoliciesInstalled();
+
 @BeforeClass
 public static void startServers() throws Exception {
 assertTrue(
@@ -77,6 +80,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedSignedTimestamp() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);
@@ -115,6 +122,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedSignature() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);
@@ -153,6 +164,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testUntrustedSignature() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = 
ModifiedRequestTest.class.getResource(client-untrusted.xml);
@@ -182,6 +197,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedEncryptedKey() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);
@@ -220,6 +239,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedEncryptedSOAPBody() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = ModifiedRequestTest.class.getResource(client.xml);



[2/2] cxf git commit: Fixing failing test with restricted security policies installed

2015-01-28 Thread coheigea
Fixing failing test with restricted security policies installed


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

Branch: refs/heads/2.7.x-fixes
Commit: da303b5a0e10cbd210868d72e87f995ea1feeea1
Parents: c5dee86
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Wed Jan 28 16:59:30 2015 +
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Wed Jan 28 17:08:37 2015 +

--
 .../systest/ws/fault/ModifiedRequestTest.java   | 23 
 1 file changed, 23 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/da303b5a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
--
diff --git 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
index bbcc4fe..50449ed 100644
--- 
a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
+++ 
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/fault/ModifiedRequestTest.java
@@ -58,6 +58,9 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 private static final String NAMESPACE = 
http://www.example.org/contract/DoubleIt;;
 private static final QName SERVICE_QNAME = new QName(NAMESPACE, 
DoubleItService);
 
+private static boolean unrestrictedPoliciesInstalled = 
+SecurityTestUtil.checkUnrestrictedPoliciesInstalled();
+
 @BeforeClass
 public static void startServers() throws Exception {
 assertTrue(
@@ -76,6 +79,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedSignedTimestamp() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = 
ModifiedRequestTest.class.getResource(client/client.xml);
@@ -104,6 +111,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedSignature() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = 
ModifiedRequestTest.class.getResource(client/client.xml);
@@ -132,6 +143,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testUntrustedSignature() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = 
ModifiedRequestTest.class.getResource(client/client-untrusted.xml);
@@ -155,6 +170,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedEncryptedKey() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = 
ModifiedRequestTest.class.getResource(client/client.xml);
@@ -183,6 +202,10 @@ public class ModifiedRequestTest extends 
AbstractBusClientServerTestBase {
 
 @org.junit.Test
 public void testModifiedEncryptedSOAPBody() throws Exception {
+
+if (!unrestrictedPoliciesInstalled) {
+return;
+}
 
 SpringBusFactory bf = new SpringBusFactory();
 URL busFile = 
ModifiedRequestTest.class.getResource(client/client.xml);



[1/2] cxf git commit: Recording .gitmergeinfo Changes

2015-01-28 Thread coheigea
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes c5dee8613 - 76ca92b1f


Recording .gitmergeinfo Changes


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

Branch: refs/heads/2.7.x-fixes
Commit: 76ca92b1f695aefb550b6568e6f5670199b14c83
Parents: da303b5
Author: Colm O hEigeartaigh cohei...@apache.org
Authored: Wed Jan 28 17:08:37 2015 +
Committer: Colm O hEigeartaigh cohei...@apache.org
Committed: Wed Jan 28 17:08:37 2015 +

--
 .gitmergeinfo | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/76ca92b1/.gitmergeinfo
--
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 4cdea82..411e37e 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -1830,6 +1830,7 @@ M 26c10829e48bb274100d4e160ccafa2a2768af74
 M 26fd9b739b9d83c7eb995302a6bff1f66203167b
 M 276343f2bbe1daecefcc1c18d5cb5e48b75a90d4
 M 276c35ea9bca26339f009cb50b64e54bf563ea4d
+M 2783922f009ce82e338633fc914b7095d5f43286
 M 27ec561253027ad1fe493fa1a835c1a21f5eef1d
 M 288f6816795d85804ab5eb13307d49f7b4596554
 M 28ce7e148f839587d4f0f04263af3bfdf4658342



cxf git commit: [CXF-6227] Do not call connection.setFixedLengthStreamingMode(i) to prevent https://bugs.openjdk.java.net/browse/JDK-8044726

2015-01-28 Thread asoldano
Repository: cxf
Updated Branches:
  refs/heads/master 4710298eb - ea4a8deb4


[CXF-6227] Do not call connection.setFixedLengthStreamingMode(i) to prevent 
https://bugs.openjdk.java.net/browse/JDK-8044726


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

Branch: refs/heads/master
Commit: ea4a8deb4f5cc994ab3896bd134c57783f2f8c51
Parents: 4710298
Author: Alessio Soldano asold...@redhat.com
Authored: Wed Jan 28 23:18:39 2015 +0100
Committer: Alessio Soldano asold...@redhat.com
Committed: Wed Jan 28 23:18:39 2015 +0100

--
 .../apache/cxf/transport/http/URLConnectionHTTPConduit.java  | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cxf/blob/ea4a8deb/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
--
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
index b8fc075..9f44f35 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
@@ -275,7 +275,13 @@ public class URLConnectionHTTPConduit extends HTTPConduit {
 return connection.usingProxy();
 }
 protected void setFixedLengthStreamingMode(int i) {
-connection.setFixedLengthStreamingMode(i);
+// [CXF-6227] do not call connection.setFixedLengthStreamingMode(i)
+// to prevent https://bugs.openjdk.java.net/browse/JDK-8044726
+}
+protected void handleNoOutput() throws IOException {
+if (POST.equals(getMethod())) {
+connection.getOutputStream().close();
+}
 }
 protected void setupNewConnection(String newURL) throws IOException {
 HTTPClientPolicy cp = getClient(outMessage);