cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1036921 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Fri, 19 Nov 2010 16:24:07 GMT
Author: sergeyb
Date: Fri Nov 19 16:24:06 2010
New Revision: 1036921

URL: http://svn.apache.org/viewvc?rev=1036921&view=rev
Log:
Merged revisions 1036920 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.3.x-fixes

................
  r1036920 | sergeyb | 2010-11-19 16:21:40 +0000 (Fri, 19 Nov 2010) | 9 lines
  
  Merged revisions 1036917 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1036917 | sergeyb | 2010-11-19 16:18:41 +0000 (Fri, 19 Nov 2010) | 1 line
    
    JAX-RS : fixing the build and minor update to improve the contexts injection via setters
  ........
................

Added:
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/HttpHeadersContext.java
      - copied unchanged from r1036920, cxf/branches/2.3.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/HttpHeadersContext.java
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsImpl.java
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Nov 19 16:24:06 2010
@@ -1,2 +1,2 @@
-/cxf/branches/2.3.x-fixes:1036007,1036260,1036394,1036842
-/cxf/trunk:1036004,1036258,1036391,1036840
+/cxf/branches/2.3.x-fixes:1036007,1036260,1036394,1036842,1036920
+/cxf/trunk:1036004,1036258,1036391,1036840,1036917

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

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java?rev=1036921&r1=1036920&r2=1036921&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
Fri Nov 19 16:24:06 2010
@@ -66,6 +66,7 @@ public abstract class AbstractResourceIn
         resourceClass = rClass;
         if (serviceClass.isInterface() && resourceClass != null && !resourceClass.isInterface())
{
             findContextFields(resourceClass);
+            findContextSetterMethods(resourceClass);
         }
     }
     

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsImpl.java?rev=1036921&r1=1036920&r2=1036921&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsImpl.java
Fri Nov 19 16:24:06 2010
@@ -24,14 +24,18 @@ import java.util.Map;
 
 import javax.ws.rs.WebApplicationException;
 import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
-public class BookStoreNoAnnotationsImpl implements BookStoreNoAnnotationsInterface {
+public class BookStoreNoAnnotationsImpl implements BookStoreNoAnnotationsInterface,
+    HttpHeadersContext {
 
     private Map<Long, Book> books = new HashMap<Long, Book>();
     @Context 
     private UriInfo ui;
+
+    private HttpHeaders hs;
     
     public BookStoreNoAnnotationsImpl() {
         Book b = new Book();
@@ -40,8 +44,16 @@ public class BookStoreNoAnnotationsImpl 
         books.put(b.getId(), b);
     }
     
+    public void setHttpHeaders(HttpHeaders headers) {
+        this.hs = headers;    
+    }
+    
     public Book getBook(Long id) throws BookNotFoundFault {
-        if (ui == null) {
+        if (hs == null) {
+            throw new WebApplicationException(Response.serverError().build());
+        }
+        boolean springProxy = hs.getRequestHeader("SpringProxy").contains("true");
+        if (!springProxy && ui == null) {
             throw new WebApplicationException(Response.serverError().build());
         }
         return books.get(id);

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java?rev=1036921&r1=1036920&r2=1036921&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java
Fri Nov 19 16:24:06 2010
@@ -105,6 +105,7 @@ public class JAXRSClientServerProxySprin
         URLConnection connect = url.openConnection();
         connect.addRequestProperty("Content-Type", "*/*");
         connect.addRequestProperty("Accept", "application/xml");
+        connect.addRequestProperty("SpringProxy", "true");
         InputStream in = connect.getInputStream();           
 
         InputStream expected = getClass()



Mime
View raw message