cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1469388 - in /cxf/branches/2.5.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/
Date Thu, 18 Apr 2013 15:57:23 GMT
Author: sergeyb
Date: Thu Apr 18 15:57:22 2013
New Revision: 1469388

URL: http://svn.apache.org/r1469388
Log:
Merged revisions 1469385 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

................
  r1469385 | sergeyb | 2013-04-18 16:52:58 +0100 (Thu, 18 Apr 2013) | 20 lines
  
  Merged revisions 1469383 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
  
  ................
    r1469383 | sergeyb | 2013-04-18 16:49:20 +0100 (Thu, 18 Apr 2013) | 13 lines
    
    Merged revisions 1469374,1469376 via svnmerge from 
    https://svn.apache.org/repos/asf/cxf/trunk
    
    ........
      r1469374 | sergeyb | 2013-04-18 16:38:41 +0100 (Thu, 18 Apr 2013) | 1 line
      
      [CXF-4747] Making it possible to initialize WebClient with jaxrs:client
    ........
      r1469376 | sergeyb | 2013-04-18 16:39:27 +0100 (Thu, 18 Apr 2013) | 1 line
      
      [CXF-4747] Adding a missing test resource
    ........
  ................
................

Added:
    cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml
      - copied unchanged from r1469385, cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml
Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
    cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Apr 18 15:57:22 2013
@@ -0,0 +1,3 @@
+/cxf/branches/2.6.x-fixes:1469385
+/cxf/branches/2.7.x-fixes:1469383
+/cxf/trunk:1469374-1469376

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

Modified: cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=1469388&r1=1469387&r2=1469388&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Thu Apr 18 15:57:22 2013
@@ -247,7 +247,11 @@ public class JAXRSClientFactoryBean exte
      * @return the client
      */
     public Client create() { 
-        return createWithValues();
+        if (serviceClass == WebClient.class) {
+            return createWebClient();
+        } else {
+            return createWithValues();
+        }
     }
     
     /**

Modified: cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java?rev=1469388&r1=1469387&r2=1469388&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
Thu Apr 18 15:57:22 2013
@@ -44,7 +44,9 @@ public class JAXRSHttpsBookTest extends 
     private static final String CLIENT_CONFIG_FILE3 =
         "org/apache/cxf/systest/jaxrs/security/jaxrs-https-client3.xml";
     private static final String CLIENT_CONFIG_FILE4 =
-        "org/apache/cxf/systest/jaxrs/security/jaxrs-https-client4.xml";    
+        "org/apache/cxf/systest/jaxrs/security/jaxrs-https-client4.xml";
+    private static final String CLIENT_CONFIG_FILE5 =
+        "org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml";
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly",
@@ -81,6 +83,26 @@ public class JAXRSHttpsBookTest extends 
         doTestGetBook123ProxyFromSpring(CLIENT_CONFIG_FILE4);
     }
     
+    @Test
+    public void testGetBook123WebClientFromSpringWildcard() throws Exception {
+        ClassPathXmlApplicationContext ctx =
+            new ClassPathXmlApplicationContext(new String[] {CLIENT_CONFIG_FILE5});
+        Object bean = ctx.getBean("bookService.proxyFactory");
+        assertNotNull(bean);
+        JAXRSClientFactoryBean cfb = (JAXRSClientFactoryBean) bean;
+        
+        WebClient wc = (WebClient)cfb.create();
+        assertEquals("https://localhost:" + PORT, wc.getBaseURI().toString());
+        
+        wc.accept("application/xml");
+        wc.path("bookstore/securebooks/123");
+        TheBook b = wc.get(TheBook.class);
+        
+        assertEquals(b.getId(), 123);
+        b = wc.get(TheBook.class);
+        assertEquals(b.getId(), 123);
+    }
+    
     private void doTestGetBook123ProxyFromSpring(String cfgFile) throws Exception {
         
         ClassPathXmlApplicationContext ctx =



Mime
View raw message