cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1240260 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Fri, 03 Feb 2012 17:45:06 GMT
Author: sergeyb
Date: Fri Feb  3 17:45:05 2012
New Revision: 1240260

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

................
  r1240255 | sergeyb | 2012-02-03 17:39:00 +0000 (Fri, 03 Feb 2012) | 9 lines
  
  Merged revisions 1240252 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1240252 | sergeyb | 2012-02-03 17:34:33 +0000 (Fri, 03 Feb 2012) | 1 line
    
    Updating the client proxy to ignore the Context parameters
  ........
................

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
    cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
    cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
    cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb  3 17:45:05 2012
@@ -1,2 +1,2 @@
-/cxf/branches/2.5.x-fixes:1236643,1236851,1239368,1239381-1239385,1240147
-/cxf/trunk:1236624,1236849,1239365,1240136
+/cxf/branches/2.5.x-fixes:1236643,1236851,1239368,1239381-1239385,1240147,1240255
+/cxf/trunk:1236624,1236849,1239365,1240136,1240252

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

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java?rev=1240260&r1=1240259&r2=1240260&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
Fri Feb  3 17:45:05 2012
@@ -205,7 +205,8 @@ public class ClientProxyImpl extends Abs
         }
         for (Parameter p : parameters) {
             if (p.getType() == ParameterType.CONTEXT) {
-                reportInvalidResourceMethod(ori.getMethodToInvoke(), "NO_CONTEXT_PARAMETERS");
+                // ignore
+                continue;
             }
             map.add(p.getType(), p);
         }

Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java?rev=1240260&r1=1240259&r2=1240260&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java
Fri Feb  3 17:45:05 2012
@@ -32,7 +32,9 @@ import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.UriInfo;
 
 public interface BookSubresource {
     
@@ -42,6 +44,11 @@ public interface BookSubresource {
     Book getTheBook() throws BookNotFoundFault;
     
     @GET
+    @Path("/subresource")
+    @Produces("application/xml")
+    Book getTheBookWithContext(@Context UriInfo ui) throws BookNotFoundFault;
+    
+    @GET
     @Path("/subresource/noproduces")
     Book getTheBookNoProduces() throws BookNotFoundFault;
     

Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java?rev=1240260&r1=1240259&r2=1240260&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java
Fri Feb  3 17:45:05 2012
@@ -21,6 +21,8 @@ package org.apache.cxf.systest.jaxrs;
 
 import java.util.List;
 
+import javax.ws.rs.core.UriInfo;
+
 
 
 public class BookSubresourceImpl implements BookSubresource {
@@ -101,4 +103,9 @@ public class BookSubresourceImpl impleme
         return order;
     }
 
+    @Override
+    public Book getTheBookWithContext(UriInfo ui) throws BookNotFoundFault {
+        return getTheBook();
+    }
+
 }

Modified: cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=1240260&r1=1240259&r2=1240260&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++ cxf/branches/2.4.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Fri Feb  3 17:45:05 2012
@@ -89,7 +89,7 @@ public class JAXRSSoapBookTest extends A
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", 
-                   launchServer(BookServerRestSoap.class, true));
+                   launchServer(BookServerRestSoap.class));
     }
     
     @Test
@@ -458,6 +458,18 @@ public class JAXRSSoapBookTest extends A
     }
     
     @Test
+    public void testGetBookSubresourceClientWithContext() throws Exception {
+        
+        String baseAddress = "http://localhost:" + PORT + "/test/services/rest";
+        BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
+                                                                  BookStoreJaxrsJaxws.class);
+        BookSubresource bs = proxy.getBookSubresource("125");
+        Book b = bs.getTheBookWithContext(null);
+        assertEquals(125, b.getId());
+        assertEquals("CXF in Action", b.getName());
+    }
+    
+    @Test
     public void testGetBookSubresourceClientNoProduces() throws Exception {
         
         String baseAddress = "http://localhost:" + PORT + "/test/services/rest";



Mime
View raw message