cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1388107 - in /cxf/branches/2.5.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/
Date Thu, 20 Sep 2012 16:35:20 GMT
Author: sergeyb
Date: Thu Sep 20 16:35:20 2012
New Revision: 1388107

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

................
  r1388104 | sergeyb | 2012-09-20 17:31:58 +0100 (Thu, 20 Sep 2012) | 9 lines
  
  Merged revisions 1388096 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1388096 | sergeyb | 2012-09-20 17:19:00 +0100 (Thu, 20 Sep 2012) | 1 line
    
    [CXF-4514] Updating JAX-RS client code to recognize bean enum properties
  ........
................

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/utils/InjectionUtils.java
    cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
    cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/OrderBean.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Thu Sep 20 16:35:20 2012
@@ -0,0 +1,2 @@
+/cxf/branches/2.6.x-fixes:1388104
+/cxf/trunk:1388096

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/utils/InjectionUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=1388107&r1=1388106&r2=1388107&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
Thu Sep 20 16:35:20 2012
@@ -1033,6 +1033,8 @@ public final class InjectionUtils {
                 }
                 if (isPrimitive(value.getClass())) {
                     values.putSingle(propertyName, value);
+                } else if (value.getClass().isEnum()) {
+                    values.putSingle(propertyName, value.toString());
                 } else if (isSupportedCollectionOrArray(value.getClass())) {
                     List<Object> theValues = null;
                     if (value.getClass().isArray()) {

Modified: cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java?rev=1388107&r1=1388106&r2=1388107&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSSoapBookTest.java
Thu Sep 20 16:35:20 2012
@@ -54,6 +54,8 @@ import org.apache.cxf.interceptor.FIStax
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorProvider;
+import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.interceptor.LoggingOutInterceptor;
 import org.apache.cxf.interceptor.transform.TransformInInterceptor;
 import org.apache.cxf.interceptor.transform.TransformOutInterceptor;
 import org.apache.cxf.io.CachedOutputStream;
@@ -532,12 +534,18 @@ public class JAXRSSoapBookTest extends A
         String baseAddress = "http://localhost:" + PORT + "/test/services/rest";
         BookStoreJaxrsJaxws proxy = JAXRSClientFactory.create(baseAddress,
                                                               BookStoreJaxrsJaxws.class);
+        
+        WebClient.getConfig(proxy).getOutInterceptors().add(new LoggingOutInterceptor());
+        WebClient.getConfig(proxy).getInInterceptors().add(new LoggingInInterceptor());
+        
         BookSubresource bs = proxy.getBookSubresource("139");
         OrderBean order = new OrderBean();
         order.setId(123L);
         order.setWeight(100);
+        order.setCustomerTitle(OrderBean.Title.MS);
         OrderBean order2 = bs.addOrder(order);
         assertEquals(Long.valueOf(123L), Long.valueOf(order2.getId()));
+        assertEquals(OrderBean.Title.MS, order2.getCustomerTitle());
     }
     
     @Test

Modified: cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/OrderBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/OrderBean.java?rev=1388107&r1=1388106&r2=1388107&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/OrderBean.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/OrderBean.java
Thu Sep 20 16:35:20 2012
@@ -25,6 +25,7 @@ public class OrderBean {
     
     private Long id;
     private int weight;
+    private Title customerTitle; 
     
     public void setId(Long id) {
         this.id = id;
@@ -38,4 +39,16 @@ public class OrderBean {
     public int getWeight() {
         return weight;
     }
+    
+    public Title getCustomerTitle() {
+        return customerTitle;
+    }
+    public void setCustomerTitle(Title customerTitle) {
+        this.customerTitle = customerTitle;
+    }
+
+    public static enum Title {
+        MR,
+        MS;
+    } 
 }



Mime
View raw message