You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/01/13 18:11:29 UTC

[1/3] cxf git commit: [CXF-6744] Handling the exceptions escaped at initial suspend time

Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes eb4d23a41 -> dca64408d


[CXF-6744] Handling the exceptions escaped at initial suspend time


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

Branch: refs/heads/3.0.x-fixes
Commit: 8bb8a5fe849190a08e3ea0b6dea42a48e456ba05
Parents: aac51e7
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Wed Jan 13 16:45:29 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Wed Jan 13 17:08:39 2016 +0000

----------------------------------------------------------------------
 .../jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java     | 2 +-
 .../apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java   | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/8bb8a5fe/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
index 086300d..ad2c627 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
@@ -207,7 +207,7 @@ public class JAXRSInvoker extends AbstractInvoker {
             }
         } catch (Fault ex) {
             Object faultResponse;
-            if (asyncResponse != null && !asyncResponse.suspendContinuationIfNeeded()) {
+            if (asyncResponse != null) {
                 faultResponse = handleAsyncFault(exchange, asyncResponse, ex.getCause());    
             } else {
                 faultResponse = handleFault(ex, inMessage, cri, methodToInvoke);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8bb8a5fe/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
index 283a3e0..d1441a0 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
@@ -83,7 +83,6 @@ public class JAXRSContinuationsServlet3Test extends AbstractJAXRSContinuationsTe
         assertString(cancel, AsyncResource.FALSE); 
     }
 
-    @org.junit.Ignore
     @Test
     public void testLostThrowFromSuspendedCall() throws Exception {
         String base = "http://localhost:" + getPort() + "/async/resource/";


[2/3] cxf git commit: CXF-6744: throwing from @Suspended method does not result in response.

Posted by se...@apache.org.
CXF-6744: throwing from @Suspended method does not result in response.


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

Branch: refs/heads/3.0.x-fixes
Commit: aac51e79a92cb1c6b8722fe1f27f6537e2728c20
Parents: 84187a3
Author: Benson Margulies <be...@basistech.com>
Authored: Tue Jan 12 13:20:15 2016 -0500
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Wed Jan 13 17:08:39 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/systest/jaxrs/AsyncResource.java |  7 +++++++
 .../systest/jaxrs/JAXRSContinuationsServlet3Test.java    | 11 +++++++++++
 2 files changed, 18 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/aac51e79/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java
index c5b9530..13856c4 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AsyncResource.java
@@ -25,6 +25,7 @@ import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.QueryParam;
+import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.Suspended;
 import javax.ws.rs.core.Response;
@@ -46,6 +47,12 @@ public class AsyncResource {
     public void suspend(@Suspended AsyncResponse asyncResponse) { 
         ASYNC_RESPONSES[0].add(asyncResponse); 
     }
+
+    @GET
+    @Path("suspendthrow")
+    public void suspendthrow(@Suspended AsyncResponse asyncResponse) {
+        throw new WebApplicationException("Oh Dear", 502);
+    }
     
     @GET
     @Path("cancelvoid")

http://git-wip-us.apache.org/repos/asf/cxf/blob/aac51e79/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
index a8f5641..283a3e0 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSContinuationsServlet3Test.java
@@ -19,6 +19,7 @@
 package org.apache.cxf.systest.jaxrs;
 
 import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
 
 import javax.ws.rs.client.AsyncInvoker;
 import javax.ws.rs.client.ClientBuilder;
@@ -81,6 +82,16 @@ public class JAXRSContinuationsServlet3Test extends AbstractJAXRSContinuationsTe
         Future<Response> cancel = invokeRequest(base + "cancelvoid?stage=1"); 
         assertString(cancel, AsyncResource.FALSE); 
     }
+
+    @org.junit.Ignore
+    @Test
+    public void testLostThrowFromSuspendedCall() throws Exception {
+        String base = "http://localhost:" + getPort() + "/async/resource/";
+        Future<Response> suspend = invokeRequest(base + "suspendthrow");
+        Response response = suspend.get(10, TimeUnit.SECONDS);
+        assertEquals(502, response.getStatus());
+    }
+
     @Test
     public void testSuspendSetTimeoutt() throws Exception { 
         final String base = "http://localhost:" + getPort() + "/async/resource2/";


[3/3] cxf git commit: Merge branch '3.0.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.0.x-fixes

Posted by se...@apache.org.
Merge branch '3.0.x-fixes' of https://git-wip-us.apache.org/repos/asf/cxf into 3.0.x-fixes


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

Branch: refs/heads/3.0.x-fixes
Commit: dca64408dd885d969944cbf84ba7a60beea69264
Parents: 8bb8a5f eb4d23a
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Wed Jan 13 17:11:14 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Wed Jan 13 17:11:14 2016 +0000

----------------------------------------------------------------------
 .gitmergeinfo                                   |  60 ++
 .../cxf/attachment/AttachmentDeserializer.java  |   6 +-
 .../apache/cxf/attachment/AttachmentUtil.java   |   4 +-
 .../apache/cxf/bus/blueprint/BlueprintBus.java  |   4 -
 .../org/apache/cxf/bus/spring/SpringBus.java    |   4 -
 .../cxf/common/injection/ResourceInjector.java  |   8 +-
 .../org/apache/cxf/common/util/CacheMap.java    |   2 +-
 .../configuration/ConfiguredBeanLocator.java    |   2 +-
 .../jsse/TLSParameterJaxBUtils.java             |  12 +-
 .../org/apache/cxf/endpoint/EndpointImpl.java   |  14 +-
 .../org/apache/cxf/helpers/ServiceUtils.java    |   6 +-
 .../AbstractAttributedInterceptorProvider.java  |   2 +-
 .../AbstractOutDatabindingInterceptor.java      |   3 +-
 .../cxf/interceptor/AnnotationInterceptors.java |   2 +-
 .../cxf/interceptor/FIStaxOutInterceptor.java   |   4 +-
 .../cxf/interceptor/StaxOutInterceptor.java     |   7 +-
 .../apache/cxf/service/ServiceModelVisitor.java |   4 +-
 .../factory/AnnotationsFactoryBeanListener.java |   4 +-
 .../invoker/spring/SpringBeanFactory.java       |   2 +-
 .../cxf/staxutils/W3CDOMStreamReader.java       |   5 -
 .../staxutils/transform/InTransformReader.java  |   4 +-
 .../apache/cxf/ws/addressing/ContextUtils.java  |   8 +-
 .../ws/addressing/EndpointReferenceUtils.java   |   2 +-
 .../cxf/ws/addressing/VersionTransformer.java   |   2 +-
 core/src/main/resources/META-INF/spring.schemas |  64 +-
 .../cxf/bus/extension/ExtensionManagerTest.java |   2 +-
 .../cxf/bus/osgi/OSGiBusListenerTest.java       |   8 +-
 .../common/injection/ResourceInjectorTest.java  |   2 -
 .../spring/ConfigurerImplTest.java              |  48 +-
 .../common/gzip/GZIPAcceptEncodingTest.java     |  14 +-
 .../javatowadl/ParseJavaDocMojo.java            |  12 +
 .../cxf/binding/soap/SoapBindingFactory.java    |   1 +
 .../SoapPreProtocolOutInterceptor.java          |   4 +-
 .../apache/cxf/aegis/type/basic/ObjectType.java |  46 --
 .../cxf/aegis/type/encoded/TrailingBlocks.java  |   1 -
 .../jaxrs/impl/HttpServletRequestFilter.java    |  51 ++
 .../cxf/jaxrs/spring/SpringResourceFactory.java |  29 +-
 .../org/apache/cxf/jaxrs/utils/JAXRSUtils.java  |   4 +-
 .../cxf/jaxrs/ext/MessageContextImplTest.java   |   8 +-
 .../jaxrs/resources/BookStoreConstructor.java   |  32 +
 .../jaxrs/spring/SpringResourceFactoryTest.java |  17 +-
 .../org/apache/cxf/jaxrs/spring/servers2.xml    |   4 +-
 .../apache/cxf/jaxrs/utils/JAXRSUtilsTest.java  |  21 +-
 .../support/JaxWsServiceConfiguration.java      |  17 +-
 .../cxf/jaxrs/client/ClientProxyImpl.java       |  13 +-
 .../cxf/jaxrs/swagger/JaxRs2Extension.java      |  85 +-
 .../search/AbstractSearchConditionParser.java   |  10 +
 .../jaxrs/ext/search/PropertyNameConverter.java |  25 +
 .../cxf/jaxrs/ext/search/SearchUtils.java       |   1 +
 .../jose/jaxrs/JwtAuthenticationFilter.java     |   3 +-
 .../jose/common/KeyManagementUtils.java         |   3 +
 .../cxf/rs/security/jose/jws/JwsUtils.java      |   2 +
 .../cxf/rs/security/jose/jwt/JwtClaims.java     |  35 +-
 .../jose/jws/JwsCompactReaderWriterTest.java    |   3 +-
 .../security/oauth2/common/OAuthPermission.java |  32 +
 .../rs/security/oauth2/common/Permission.java   |  54 ++
 .../oauth2/filters/OAuthRequestFilter.java      |   2 +-
 .../provider/AbstractOAuthDataProvider.java     |   4 +-
 .../oauth2/provider/OAuthDataProvider.java      |   4 +-
 .../services/AuthorizationCodeGrantService.java |   4 +-
 .../services/RedirectionBasedGrantService.java  |   2 +-
 .../rs/security/oauth2/utils/OAuthUtils.java    |  16 +-
 .../security/oidc/common/AbstractUserInfo.java  | 178 +++++
 .../cxf/rs/security/oidc/common/IdToken.java    |   2 +-
 .../cxf/rs/security/oidc/common/UserInfo.java   | 146 +---
 .../oidc/idp/IdTokenResponseFilter.java         |   9 +-
 .../rs/security/oidc/idp/UserInfoService.java   |   4 +-
 .../oidc/rp/AbstractTokenValidator.java         |   5 +-
 .../cxf/rs/security/oidc/rp/IdTokenReader.java  |   7 +-
 .../cxf/rs/security/oidc/rp/UserInfoClient.java |   6 +-
 .../cxf/rs/security/oidc/utils/OidcUtils.java   |   1 +
 .../saml/sso/SAMLProtocolResponseValidator.java | 116 +--
 .../saml/sso/SAMLSSOResponseValidator.java      |  18 +-
 .../src/main/resources/META-INF/spring.schemas  |  42 +-
 .../src/main/resources/META-INF/spring.schemas  |  42 +-
 .../transport/http/AbstractHTTPDestination.java |   8 +-
 .../transport/http/auth/DigestAuthSupplier.java |  16 +-
 .../httpclient/DefaultHostnameVerifier.java     |  71 +-
 .../transport/https/httpclient/DomainType.java  |  37 +
 .../https/httpclient/PublicSuffixList.java      |  11 +-
 .../httpclient/PublicSuffixListParser.java      | 101 ++-
 .../https/httpclient/PublicSuffixMatcher.java   |  99 ++-
 .../src/main/resources/META-INF/spring.schemas  |  44 +-
 .../httpclient/DefaultHostnameVerifierTest.java |  12 +-
 .../src/main/resources/META-INF/spring.schemas  |  42 +-
 .../src/main/resources/META-INF/spring.handlers |  48 +-
 .../src/main/resources/META-INF/spring.schemas  |  58 +-
 .../src/main/resources/META-INF/spring.schemas  |  44 +-
 .../cxf/ws/security/SecurityConstants.java      |   7 +
 .../wss4j/AttachmentCallbackHandler.java        |   5 +
 .../policyhandlers/AbstractBindingBuilder.java  |  49 +-
 .../factory/AbstractServiceConfiguration.java   |   4 +
 .../wsdl/service/factory/Messages.properties    |   3 +
 .../factory/ReflectionServiceFactoryBean.java   |  22 +-
 .../X509SymmetricBindingTest.java               |  67 ++
 .../systest/sts/x509_symmetric/DoubleIt.wsdl    |  94 +++
 .../systest/sts/x509_symmetric/cxf-client.xml   |   8 +
 .../systest/sts/x509_symmetric/cxf-service.xml  |   8 +
 .../sts/x509_symmetric/cxf-stax-service.xml     |   9 +
 .../org/apache/cxf/systest/jaxrs/BookStore.java |  24 +-
 .../cxf/systest/jaxrs/BookStoreSpring.java      |  23 +-
 .../jaxrs/JAXRSClientServerSpringBookTest.java  |  22 +
 .../src/test/resources/jaxrs/WEB-INF/beans.xml  |   7 +
 systests/rs-security/pom.xml                    |  10 -
 .../jose/jwt/BookServerJwtProperties.java       |  59 ++
 .../security/jose/jwt/JWTAlgorithmTest.java     | 153 +++-
 .../security/jose/jwt/JWTAuthnAuthzTest.java    |  15 +-
 .../security/jose/jwt/JWTPropertiesTest.java    | 418 ++++++++++
 .../jaxrs/security/oauth2/JAXRSOAuth2Test.java  | 209 ++++-
 .../security/oauth2/OAuthDataProviderImpl.java  |   1 +
 .../security/oauth2/SamlCallbackHandler.java    | 115 ++-
 .../grants/AuthorizationGrantNegativeTest.java  | 794 +++++++++++++++++++
 .../oauth2/grants/AuthorizationGrantTest.java   | 371 +++++++++
 .../security/oauth2/grants/BasicAuthFilter.java | 117 +++
 .../oauth2/grants/BookServerOAuth2Grants.java   |  48 ++
 .../grants/BookServerOAuth2GrantsNegative.java  |  48 ++
 .../oauth2/grants/CallbackHandlerImpl.java      |  52 ++
 .../grants/CallbackHandlerLoginHandler.java     |  83 ++
 .../oauth2/grants/OAuthDataProviderImpl.java    | 104 +++
 .../security/jose/jwt/algorithms-server.xml     |  16 +
 .../security/jose/jwt/properties-server.xml     |  72 ++
 .../jaxrs/security/oauth2/grants/client.xml     |  38 +
 .../oauth2/grants/grants-negative-server.xml    | 142 ++++
 .../security/oauth2/grants/grants-server.xml    | 142 ++++
 .../systest/jaxrs/security/oauth2/server.xml    |  29 +
 .../systest/jaxrs/security/smallkey.properties  |  21 +
 .../apache/cxf/systest/ws/fault/FaultTest.java  |  69 ++
 .../cxf/systest/ws/ut/UsernameTokenTest.java    |  27 +
 .../cxf/systest/ws/fault/DoubleItFault.wsdl     |  69 ++
 .../org/apache/cxf/systest/ws/fault/client.xml  |  16 +
 .../org/apache/cxf/systest/ws/fault/server.xml  |  13 +
 .../apache/cxf/systest/ws/ut/DoubleItUt.wsdl    |  34 +
 .../org/apache/cxf/systest/ws/ut/client.xml     |   6 +
 .../org/apache/cxf/systest/ws/ut/server.xml     |   5 +
 .../apache/cxf/systest/ws/ut/stax-server.xml    |   6 +
 .../cxf/systest/ws/addressing/spring/spring.xml |   2 +-
 .../ws/policy/AddressingPolicy0705Test.java     | 161 ++++
 .../systest/ws/policy/RM12PolicyWsdlTest.java   |   2 +-
 .../cxf/systest/ws/policy/addr-external0705.xml |  37 +
 .../apache/cxf/systest/ws/policy/addr0705.xml   |  31 +
 .../cxf/tools/common/VelocityGenerator.java     |   4 +-
 .../common/dom/ExtendedDocumentBuilder.java     |   4 +-
 .../cxf/tools/common/model/JavaMethod.java      |   2 +-
 .../common/toolspec/DummyToolContainer.java     |   6 +-
 144 files changed, 5090 insertions(+), 834 deletions(-)
----------------------------------------------------------------------