cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1514272 - in /cxf/branches/2.7.x-fixes: ./ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
Date Thu, 15 Aug 2013 13:43:11 GMT
Author: sergeyb
Date: Thu Aug 15 13:43:11 2013
New Revision: 1514272

URL: http://svn.apache.org/r1514272
Log:
Merged revisions 1514269 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1514269 | sergeyb | 2013-08-15 16:39:11 +0300 (Thu, 15 Aug 2013) | 1 line
  
  [CXF-5201] Updating test WriterInterceptor to add more headers
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
    cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1514269

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java?rev=1514272&r1=1514271&r2=1514272&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookServer20.java
Thu Aug 15 13:43:11 2013
@@ -33,6 +33,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import javax.ws.rs.BindingPriority;
 import javax.ws.rs.InternalServerErrorException;
 import javax.ws.rs.NameBinding;
@@ -354,9 +355,13 @@ public class BookServer20 extends Abstra
     
     public static class CustomWriterInterceptor implements WriterInterceptor {
 
+        @Context
+        private HttpServletResponse response;
         @Override
         public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException
{
             context.getHeaders().add("ServerWriterInterceptor", "serverWrite");
+            context.getHeaders().putSingle("ServerWriterInterceptor2", "serverWrite2");
+            response.addHeader("ServerWriterInterceptorHttpResponse", "serverWriteHttpResponse");
             String ct = context.getHeaders().getFirst("Content-Type").toString();
             if (!ct.endsWith("ISO-8859-1")) {
                 ct += "us-ascii";

Modified: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java?rev=1514272&r1=1514271&r2=1514272&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRS20ClientServerBookTest.java
Thu Aug 15 13:43:11 2013
@@ -150,6 +150,9 @@ public class JAXRS20ClientServerBookTest
         assertNull(response.getHeaderString("DynamicResponse"));
         assertNull(response.getHeaderString("Custom"));
         assertEquals("serverWrite", response.getHeaderString("ServerWriterInterceptor"));
+        assertEquals("serverWrite2", response.getHeaderString("ServerWriterInterceptor2"));
+        assertEquals("serverWriteHttpResponse", 
+                     response.getHeaderString("ServerWriterInterceptorHttpResponse"));
         assertEquals("text/plain;charset=us-ascii", response.getMediaType().toString());
     }
     



Mime
View raw message