cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1469383 - in /cxf/branches/2.7.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:49:21 GMT
Author: sergeyb
Date: Thu Apr 18 15:49:20 2013
New Revision: 1469383

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

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

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

Modified: cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=1469383&r1=1469382&r2=1469383&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/branches/2.7.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Thu Apr 18 15:49:20 2013
@@ -256,7 +256,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.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java?rev=1469383&r1=1469382&r2=1469383&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSHttpsBookTest.java
Thu Apr 18 15:49:20 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 =

Copied: cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml
(from r1469376, cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml)
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml?p2=cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml&p1=cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml&r1=1469376&r2=1469383&rev=1469383&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml
(original)
+++ cxf/branches/2.7.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/jaxrs-https-client5.xml
Thu Apr 18 15:49:20 2013
@@ -20,14 +20,14 @@ under the License.
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:http="http://cxf.apache.org/transports/http/configuration"
-       xmlns:jaxrs="http://cxf.apache.org/jaxrs-client"
+       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
        xmlns:cxf="http://cxf.apache.org/core"
        xmlns:sec="http://cxf.apache.org/configuration/security"
        xsi:schemaLocation="
         http://www.springframework.org/schema/beans                 http://www.springframework.org/schema/beans/spring-beans.xsd
         http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
         http://cxf.apache.org/transports/http/configuration         http://cxf.apache.org/schemas/configuration/http-conf.xsd
-        http://cxf.apache.org/jaxrs-client http://cxf.apache.org/schemas/jaxrs-client.xsd
+        http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
         http://cxf.apache.org/configuration/security                http://cxf.apache.org/schemas/configuration/security.xsd
         ">
 	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>



Mime
View raw message