cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1469385 - in /cxf/branches/2.6.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:52:59 GMT
Author: sergeyb
Date: Thu Apr 18 15:52:58 2013
New Revision: 1469385

URL: http://svn.apache.org/r1469385
Log:
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.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml
      - copied unchanged from r1469383, cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml
Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
    cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1469383
  Merged /cxf/trunk:r1469374-1469376

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

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=1469385&r1=1469384&r2=1469385&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Thu Apr 18 15:52:58 2013
@@ -248,7 +248,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.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java?rev=1469385&r1=1469384&r2=1469385&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
(original)
+++ cxf/branches/2.6.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
Thu Apr 18 15:52:58 2013
@@ -45,7 +45,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",
@@ -99,6 +101,26 @@ public class JAXRSHttpsBookTest extends 
         assertEquals(b.getId(), 123);
     }
     
+    @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