Author: sergeyb
Date: Wed Aug 14 13:16:58 2013
New Revision: 1513867

URL: http://svn.apache.org/r1513867
Log:
[CXF-5204] Better support for TypeVariable in JAX-RS frontend

Added:
    
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java
   (with props)
    
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestController.java
   (with props)
    
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestResource.java
   (with props)
    
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/RestResource.java
   (with props)
    
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
   (with props)
    
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpring.java
   (with props)
    
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBookInterface.java
   (with props)
Modified:
    
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerResponseContextImpl.java
    
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
    
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
    
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
    
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
    
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
    
cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
    
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java
    
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
    
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
    
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBook.java
    
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_jackson_provider/WEB-INF/beans.xml

Modified: 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerResponseContextImpl.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerResponseContextImpl.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerResponseContextImpl.java
 (original)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerResponseContextImpl.java
 Wed Aug 14 13:16:58 2013
@@ -32,12 +32,15 @@ import org.apache.cxf.message.Message;
 public class ContainerResponseContextImpl extends AbstractResponseContextImpl 
     implements ContainerResponseContext {
 
+    private Class<?> serviceCls;
     private Method invoked;
     
     public ContainerResponseContextImpl(ResponseImpl r, 
                                         Message m,
+                                        Class<?> serviceCls,
                                         Method invoked) {
         super(r, m);
+        this.serviceCls = serviceCls;
         this.invoked = invoked;
     }
     
@@ -53,7 +56,8 @@ public class ContainerResponseContextImp
 
     @Override
     public Type getEntityType() {
-        return InjectionUtils.getGenericResponseType(invoked, 
+        return InjectionUtils.getGenericResponseType(invoked,
+                                              serviceCls,       
                                               super.r.getActualEntity(), 
                                               getEntityClass(), 
                                               super.m.getExchange());

Modified: 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
 (original)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
 Wed Aug 14 13:16:58 2013
@@ -240,8 +240,9 @@ public class JAXRSOutInterceptor extends
             
getResponseMediaType(responseHeaders.getFirst(HttpHeaders.CONTENT_TYPE));
         
         Class<?> targetType = InjectionUtils.getRawResponseClass(entity);
-        Type genericType = 
-            InjectionUtils.getGenericResponseType(invoked, 
response.getActualEntity(), targetType, exchange);
+        Class<?> serviceCls = invoked != null ? 
ori.getClassResourceInfo().getServiceClass() : null;
+        Type genericType = InjectionUtils.getGenericResponseType(invoked, 
serviceCls, 
+                                                                 
response.getActualEntity(), targetType, exchange);
         annotations = response.getEntityAnnotations();        
         
         List<WriterInterceptor> writers = providerFactory

Modified: 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
 (original)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
 Wed Aug 14 13:16:58 2013
@@ -130,12 +130,6 @@ public final class InjectionUtils {
             }
         }
         
-        Type[] bounds = var.getBounds();
-        int boundPos = bounds.length > pos ? pos : 0; 
-        if (bounds.length > boundPos && bounds[boundPos] != Object.class) {
-            return bounds[boundPos];
-        }
-                
         Type genericSubtype = serviceClass.getGenericSuperclass();
         if (genericSubtype == Object.class) {
             Type[] genInterfaces = serviceClass.getGenericInterfaces();
@@ -146,7 +140,14 @@ public final class InjectionUtils {
         }
         Type result = genericSubtype != Object.class ? 
InjectionUtils.getActualType(genericSubtype, pos)
                                               : genericSubtype;
-        return result == null ? Object.class : result;
+        if (result == null || result == Object.class) {
+            Type[] bounds = var.getBounds();
+            int boundPos = bounds.length > pos ? pos : 0; 
+            if (bounds.length > boundPos && bounds[boundPos] != Object.class) {
+                result = bounds[boundPos];
+            }
+        }
+        return result;
     }
     
     public static Method checkProxy(Method methodToInvoke, Object 
resourceObject) {
@@ -222,13 +223,18 @@ public final class InjectionUtils {
             } else if (genericType instanceof GenericArrayType) {
                 genericType = 
((GenericArrayType)genericType).getGenericComponentType();
             }
-
-            Class<?> cls = (Class<?>)genericType;
+            Class<?> cls = null;
+            if (!(genericType instanceof ParameterizedType)) {
+                cls = (Class<?>)genericType;
+            } else {
+                cls = (Class<?>)((ParameterizedType)genericType).getRawType();
+            }
             return cls.isArray() ? cls.getComponentType() : cls;
+            
         }
         ParameterizedType paramType = (ParameterizedType)genericType;
         Type t = getType(paramType.getActualTypeArguments(), pos);
-        return t instanceof Class ? (Class<?>)t : getActualType(t, pos);
+        return t instanceof Class ? (Class<?>)t : getActualType(t, 0);
     }
     
     public static Type getType(Type[] types, int pos) {
@@ -1247,7 +1253,8 @@ public final class InjectionUtils {
         }
     }
     
-    public static Type getGenericResponseType(Method invoked, 
+    public static Type getGenericResponseType(Method invoked,
+                                        Class<?> serviceCls,      
                                         Object targetObject, 
                                         Class<?> targetType,
                                         Exchange exchange) {
@@ -1265,23 +1272,36 @@ public final class InjectionUtils {
             // to invoked.getReturnType(); same applies to the case when a 
method returns Response
             type = targetObject.getClass(); 
         } else {
-            type = processGenericTypeIfNeeded(invoked.getDeclaringClass(), 
invoked.getGenericReturnType());
-            
+            type = processGenericTypeIfNeeded(serviceCls, targetType,  
invoked.getGenericReturnType());
         }
         
         return type;
     }
+    public static Class<?> updateParamClassToTypeIfNeeded(Class<?> paramCls, 
Type type) {
+        if (type instanceof Class && 
paramCls.isAssignableFrom((Class<?>)type)) {
+            paramCls = (Class<?>)type; 
+        }
+        return paramCls;
+    }
     
-    public static Type processGenericTypeIfNeeded(Class<?> cls, Type type) {
+    public static Type processGenericTypeIfNeeded(Class<?> serviceCls, 
Class<?> paramCls, Type type) {
+       
         if (type instanceof TypeVariable) {
-            return InjectionUtils.getSuperType(cls, (TypeVariable<?>)type);
+            type = InjectionUtils.getSuperType(serviceCls, 
(TypeVariable<?>)type);
         } else if (type instanceof ParameterizedType
             && ((ParameterizedType)type).getActualTypeArguments()[0] 
instanceof TypeVariable
             && isSupportedCollectionOrArray(getRawType(type))) {
-            return new 
ParameterizedCollectionType(InjectionUtils.getActualType(type, 0));
-        } else {
-            return type;
+            TypeVariable<?> typeVar = 
(TypeVariable<?>)((ParameterizedType)type).getActualTypeArguments()[0];
+            Type theType = InjectionUtils.getSuperType(serviceCls, typeVar);
+            Class<?> cls = theType instanceof Class 
+                ? (Class<?>)theType : InjectionUtils.getActualType(theType, 0);
+            type = new ParameterizedCollectionType(cls);
+        } 
+        if (type == null || type == Object.class) {
+            type = paramCls;
         }
+        return type;
+        
     }
     
     public static Object getEntity(Object o) {

Modified: 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
 (original)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
 Wed Aug 14 13:16:58 2013
@@ -787,13 +787,8 @@ public final class JAXRSUtils {
         for (int i = 0; i < parameterTypes.length; i++) {
             Class<?> param = parameterTypes[i]; 
             Type genericParam = InjectionUtils.processGenericTypeIfNeeded(
-                ori.getClassResourceInfo().getServiceClass(), 
genericParameterTypes[i]);
-            if (param == Object.class) {
-                param = (Class<?>)genericParam; 
-            } else if (genericParam == Object.class) {
-                genericParam = param;
-            }
-            
+                ori.getClassResourceInfo().getServiceClass(), param, 
genericParameterTypes[i]);
+            param = InjectionUtils.updateParamClassToTypeIfNeeded(param, 
genericParam);
             
             Object paramValue = processParameter(param, 
                                                  genericParam,
@@ -1732,7 +1727,8 @@ public final class JAXRSUtils {
                                                false,
                                                true);
             ContainerResponseContext responseContext = 
-                new ContainerResponseContextImpl(r, m, invoked);
+                new ContainerResponseContextImpl(r, m, 
+                    ori == null ? null : 
ori.getClassResourceInfo().getServiceClass(), invoked);
             for (ProviderInfo<ContainerResponseFilter> filter : 
containerFilters) {
                 InjectionUtils.injectContexts(filter.getProvider(), filter, m);
                 filter.getProvider().filter(requestContext, responseContext);

Modified: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
 (original)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
 Wed Aug 14 13:16:58 2013
@@ -38,6 +38,8 @@ import javax.ws.rs.core.Response;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.jaxrs.fortest.BookEntity;
 import org.apache.cxf.jaxrs.fortest.BookEntity2;
+import org.apache.cxf.jaxrs.fortest.ConcreteRestController;
+import org.apache.cxf.jaxrs.fortest.ConcreteRestResource;
 import org.apache.cxf.jaxrs.fortest.GenericEntityImpl;
 import org.apache.cxf.jaxrs.fortest.GenericEntityImpl2;
 import org.apache.cxf.jaxrs.fortest.GenericEntityImpl3;
@@ -55,6 +57,7 @@ import org.apache.cxf.message.ExchangeIm
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
 import org.easymock.EasyMock;
+
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -137,6 +140,33 @@ public class SelectMethodCandidatesTest 
         assertEquals(2L, book.getId());
         assertEquals("The Book", book.getName());
     }
+    @Test
+    public void testFindFromAbstractGenericImpl5() throws Exception {
+        JAXRSServiceFactoryBean sf = new JAXRSServiceFactoryBean();
+        sf.setResourceClasses(ConcreteRestController.class);
+        sf.create();
+        List<ClassResourceInfo> resources = 
((JAXRSServiceImpl)sf.getService()).getClassResourceInfos();
+        Message m = createMessage();
+        m.put(Message.CONTENT_TYPE, "text/xml");
+        
+        MetadataMap<String, String> values = new MetadataMap<String, String>();
+        OperationResourceInfo ori = findTargetResourceClass(resources, m, 
+                                                            "/",
+                                                            "POST",
+                                                            values, 
"text/xml", 
+                                                            
sortMediaTypes("*/*"));
+        assertNotNull(ori);
+        assertEquals("resourceMethod needs to be selected", "add",
+                     ori.getMethodToInvoke().getName());
+        
+        String value = "<concreteRestResource><name>The 
Book</name></concreteRestResource>";
+        m.setContent(InputStream.class, new 
ByteArrayInputStream(value.getBytes()));
+        List<Object> params = JAXRSUtils.processParameters(ori, values, m);
+        assertEquals(1, params.size());
+        ConcreteRestResource book = (ConcreteRestResource)params.get(0);
+        assertNotNull(book);
+        assertEquals("The Book", book.getName());
+    }
     
     @Test
     public void testFindFromAbstractGenericClass3() throws Exception {

Added: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java?rev=1513867&view=auto
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java
 (added)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java
 Wed Aug 14 13:16:58 2013
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.fortest;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.core.Response;
+
+public class AbstractRestController<T extends RestResource> {
+    @POST
+    @Consumes("text/xml")
+    public Response add(final T resource) {
+        // build some response
+        return null;
+    }
+} 

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/AbstractRestController.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestController.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestController.java?rev=1513867&view=auto
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestController.java
 (added)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestController.java
 Wed Aug 14 13:16:58 2013
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.fortest;
+
+
+public class ConcreteRestController extends 
AbstractRestController<ConcreteRestResource> {
+    
+} 

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestController.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestController.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestResource.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestResource.java?rev=1513867&view=auto
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestResource.java
 (added)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestResource.java
 Wed Aug 14 13:16:58 2013
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.fortest;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class ConcreteRestResource implements RestResource {
+    private String name;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestResource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/ConcreteRestResource.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/RestResource.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/RestResource.java?rev=1513867&view=auto
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/RestResource.java
 (added)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/RestResource.java
 Wed Aug 14 13:16:58 2013
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.fortest;
+
+public interface RestResource {
+
+}

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/RestResource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/fortest/RestResource.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
 (original)
+++ 
cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/ResourceUtilsTest.java
 Wed Aug 14 13:16:58 2013
@@ -30,6 +30,7 @@ import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.core.UriInfo;
+import javax.xml.bind.annotation.XmlRootElement;
 
 import org.apache.cxf.jaxrs.Customer;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
@@ -133,6 +134,19 @@ public class ResourceUtilsTest extends A
     }
     
     @Test
+    public void testGetAllJaxbClassesComplexGenericType() {
+        ClassResourceInfo cri1 = 
+            ResourceUtils.createClassResourceInfo(OrderResource.class, 
+                                                  OrderResource.class, true, 
true);
+        Map<Class<?>, Type> types = 
+            
ResourceUtils.getAllRequestResponseTypes(Collections.singletonList(cri1), true)
+                .getAllTypes();
+        assertEquals(2, types.size());
+        assertTrue(types.containsKey(OrderItemsDTO.class));
+        assertTrue(types.containsKey(OrderItemDTO.class));
+    }
+    
+    @Test
     public void testClassResourceInfoWithOverride() throws Exception {
         ClassResourceInfo cri = 
             ResourceUtils.createClassResourceInfo(ExampleImpl.class, 
ExampleImpl.class, true, true);
@@ -182,4 +196,24 @@ public class ResourceUtilsTest extends A
             return null;
         }
     }
+    
+    @XmlRootElement
+    public static class OrderItem {
+        
+    }
+    @XmlRootElement
+    public static class OrderItemDTO<T> {
+        
+    }
+    @XmlRootElement
+    public static class OrderItemsDTO<E> {
+        
+    }
+    
+    public static class OrderResource {
+        @GET
+        public OrderItemsDTO<? extends OrderItemDTO<? extends OrderItem>> 
getOrders() {
+            return null;
+        }
+    }
 }

Modified: 
cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
 (original)
+++ 
cxf/trunk/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
 Wed Aug 14 13:16:58 2013
@@ -548,7 +548,7 @@ public class ClientProxyImpl extends Abs
         
         Object response = null;
         try {
-            response = handleResponse(outMessage);
+            response = handleResponse(outMessage, 
ori.getClassResourceInfo().getServiceClass());
             return response;
         } catch (Exception ex) {
             response = ex;
@@ -574,7 +574,7 @@ public class ClientProxyImpl extends Abs
                                    body, bodyIndex, exchange, invContext);
     }
     
-    protected Object handleResponse(Message outMessage) 
+    protected Object handleResponse(Message outMessage, Class<?> serviceCls) 
         throws Throwable {
         try {
             Response r = setResponseBuilder(outMessage, 
outMessage.getExchange()).build();
@@ -591,12 +591,15 @@ public class ClientProxyImpl extends Abs
                     && ((InputStream)r.getEntity()).available() == 0)) {
                 return r;
             }
+            Class<?> returnType = method.getReturnType();
             Type genericType = 
-                
InjectionUtils.processGenericTypeIfNeeded(method.getDeclaringClass(), 
+                InjectionUtils.processGenericTypeIfNeeded(serviceCls, 
+                                                          returnType,
                                                           
method.getGenericReturnType());
+            returnType = 
InjectionUtils.updateParamClassToTypeIfNeeded(returnType, genericType);
             return readBody(r, 
                             outMessage, 
-                            method.getReturnType(), 
+                            returnType, 
                             genericType, 
                             method.getDeclaredAnnotations());
         } finally {
@@ -647,15 +650,14 @@ public class ClientProxyImpl extends Abs
                     Class<?> paramClass = 
method.getParameterTypes()[bodyIndex];
                     Class<?> bodyClass = 
                         paramClass.isAssignableFrom(body.getClass()) ? 
paramClass : body.getClass();
-                    Type paramType = 
method.getGenericParameterTypes()[bodyIndex];
+                    Type genericType = 
method.getGenericParameterTypes()[bodyIndex];
                     if (bodyType != null) {
-                        paramType = bodyType;
+                        genericType = bodyType;
                     }
-                    paramType = 
InjectionUtils.processGenericTypeIfNeeded(method.getDeclaringClass(),
-                                                                          
paramType);
-                    
-                    writeBody(body, outMessage, bodyClass, paramType,
-                              anns, os);
+                    genericType = InjectionUtils.processGenericTypeIfNeeded(
+                        ori.getClassResourceInfo().getServiceClass(), 
bodyClass, genericType);
+                    bodyClass = 
InjectionUtils.updateParamClassToTypeIfNeeded(bodyClass, genericType);
+                    writeBody(body, outMessage, bodyClass, genericType, anns, 
os);
                 } else {
                     Type paramType = body.getClass();
                     if (bodyType != null) {

Added: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java?rev=1513867&view=auto
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
 (added)
+++ 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
 Wed Aug 14 13:16:58 2013
@@ -0,0 +1,56 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs;
+
+
+import java.util.List;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.WebApplicationException;
+
+@Path("/")
+@Consumes({"application/json", "application/xml" })
+@Produces({"application/json", "application/xml" })
+public abstract class AbstractGenericBookStoreSpring<T extends 
SuperBookInterface> {
+
+    @POST
+    @Path("/books/superbook")
+    public T echoSuperBookJson(T book) {
+        if (((SuperBook)book).isSuperBook()) {
+            return book;
+        }
+        throw new WebApplicationException(400);
+    }
+    
+    @POST
+    @Path("/books/superbooks")
+    public List<T> echoSuperBookCollectionJson(List<T> book) {
+        if (((SuperBook)book.get(0)).isSuperBook()) {
+            return book;
+        }
+        throw new WebApplicationException(400);
+    }
+        
+}
+
+

Propchange: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/AbstractGenericBookStoreSpring.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java
 (original)
+++ 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreSpring.java
 Wed Aug 14 13:16:58 2013
@@ -99,7 +99,7 @@ public class BookStoreSpring {
     @Path("/books/xsitype")
     @Produces("application/xml")
     public Book getBookXsiType() {
-        return new SuperBook("SuperBook", 999L);
+        return new SuperBook("SuperBook", 999L, true);
     }
     
     @SuppressWarnings("unchecked")
@@ -107,7 +107,7 @@ public class BookStoreSpring {
     @Path("/books/superbook")
     @Produces("application/json")
     public <T extends Book> T getSuperBookJson() {
-        SuperBook book = new SuperBook("SuperBook", 999L);
+        SuperBook book = new SuperBook("SuperBook", 999L, true);
         
         return (T)book;
     }
@@ -117,18 +117,20 @@ public class BookStoreSpring {
     @Path("/books/superbooks")
     @Produces("application/json")
     public <T extends Book> List<T> getSuperBookCollectionJson() {
-        SuperBook book = new SuperBook("SuperBook", 999L);
+        SuperBook book = new SuperBook("SuperBook", 999L, true);
         
         return Collections.singletonList((T)book);
     }
     
-    @SuppressWarnings("unchecked")
     @POST
     @Path("/books/superbook")
     @Consumes("application/json")
     @Produces("application/json")
     public <T extends Book> T echoSuperBookJson(T book) {
-        return (T)(SuperBook)book;
+        if (((SuperBook)book).isSuperBook()) {
+            return book;
+        }
+        throw new WebApplicationException(400);
     }
     
     @POST
@@ -136,7 +138,7 @@ public class BookStoreSpring {
     @Consumes("application/json")
     @Produces("application/json")
     public <T extends Book> List<T> echoSuperBookCollectionJson(List<T> book) {
-        if (book.get(0) instanceof SuperBook) {
+        if (((SuperBook)book.get(0)).isSuperBook()) {
             return book;
         }
         throw new WebApplicationException(400);

Added: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpring.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpring.java?rev=1513867&view=auto
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpring.java
 (added)
+++ 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpring.java
 Wed Aug 14 13:16:58 2013
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.systest.jaxrs;
+
+public class GenericBookStoreSpring extends 
AbstractGenericBookStoreSpring<SuperBook> {
+}
+
+

Propchange: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpring.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/GenericBookStoreSpring.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
 (original)
+++ 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceJacksonSpringProviderTest.java
 Wed Aug 14 13:16:58 2013
@@ -26,6 +26,8 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import javax.ws.rs.core.MediaType;
+
 import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider;
 
 import org.apache.cxf.helpers.IOUtils;
@@ -94,8 +96,9 @@ public class JAXRSClientServerResourceJa
         BookStoreSpring proxy = JAXRSClientFactory.create(endpointAddress, 
BookStoreSpring.class, 
             Collections.singletonList(new JacksonJsonProvider()));
         List<SuperBook> books = 
-            proxy.echoSuperBookCollectionJson(Collections.singletonList(new 
SuperBook("Super", 124L)));
+            proxy.echoSuperBookCollectionJson(Collections.singletonList(new 
SuperBook("Super", 124L, true)));
         assertEquals(124L, books.get(0).getId());
+        assertTrue(books.get(0).isSuperBook());
     }
     
     @Test
@@ -105,8 +108,93 @@ public class JAXRSClientServerResourceJa
             "http://localhost:"; + PORT + "/webapp/store2";
         BookStoreSpring proxy = JAXRSClientFactory.create(endpointAddress, 
BookStoreSpring.class, 
             Collections.singletonList(new JacksonJsonProvider()));
-        SuperBook book = proxy.echoSuperBookJson(new SuperBook("Super", 124L));
+        SuperBook book = proxy.echoSuperBookJson(new SuperBook("Super", 124L, 
true));
+        assertEquals(124L, book.getId());
+        assertTrue(book.isSuperBook());
+    }
+    
+    @Test
+    public void testEchoGenericSuperBookCollectionProxy() throws Exception {
+        
+        String endpointAddress =
+            "http://localhost:"; + PORT + "/webapp/genericstore";
+        GenericBookStoreSpring proxy = 
JAXRSClientFactory.create(endpointAddress, 
+            GenericBookStoreSpring.class, Collections.singletonList(new 
JacksonJsonProvider()));
+        List<SuperBook> books = 
+            proxy.echoSuperBookCollectionJson(Collections.singletonList(new 
SuperBook("Super", 124L, true)));
+        assertEquals(124L, books.get(0).getId());
+        assertTrue(books.get(0).isSuperBook());
+    }
+    
+    @Test
+    public void testEchoGenericSuperBookProxy() throws Exception {
+        
+        String endpointAddress =
+            "http://localhost:"; + PORT + "/webapp/genericstore";
+        GenericBookStoreSpring proxy = 
JAXRSClientFactory.create(endpointAddress, 
+            GenericBookStoreSpring.class, Collections.singletonList(new 
JacksonJsonProvider()));
+        SuperBook book = proxy.echoSuperBookJson(new SuperBook("Super", 124L, 
true));
+        assertEquals(124L, book.getId());
+        assertTrue(book.isSuperBook());
+    }
+    
+    @Test
+    public void testEchoGenericSuperBookWebClient() throws Exception {
+        
+        String endpointAddress = 
+            "http://localhost:"; + PORT + 
"/webapp/genericstore/books/superbook";
+        WebClient wc = WebClient.create(endpointAddress, 
+                                        Collections.singletonList(new 
JacksonJsonProvider()));
+        wc.accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON);
+        SuperBook book = wc.post(new SuperBook("Super", 124L, true), 
SuperBook.class);
+        assertEquals(124L, book.getId());
+        assertTrue(book.isSuperBook());
+    }
+    
+    @Test
+    public void testEchoGenericSuperBookWebClientXml() throws Exception {
+        
+        String endpointAddress = 
+            "http://localhost:"; + PORT + 
"/webapp/genericstore/books/superbook";
+        WebClient wc = WebClient.create(endpointAddress);
+        wc.accept(MediaType.APPLICATION_XML).type(MediaType.APPLICATION_XML);
+        SuperBook book = wc.post(new SuperBook("Super", 124L, true), 
SuperBook.class);
+        assertEquals(124L, book.getId());
+        assertTrue(book.isSuperBook());
+    }
+    
+    @Test
+    public void testEchoGenericSuperBookCollectionWebClient() throws Exception 
{
+        
+        String endpointAddress = 
+            "http://localhost:"; + PORT + 
"/webapp/genericstore/books/superbooks";
+        WebClient wc = WebClient.create(endpointAddress, 
+                                        Collections.singletonList(new 
JacksonJsonProvider()));
+        
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(100000000L);
+        wc.accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON);
+        Collection<? extends SuperBook> books = 
+            wc.postAndGetCollection(Collections.singletonList(new 
SuperBook("Super", 124L, true)),
+                                    SuperBook.class,
+                                    SuperBook.class);
+        SuperBook book = books.iterator().next();
+        assertEquals(124L, book.getId());
+        assertTrue(book.isSuperBook());
+    }
+    
+    @Test
+    public void testEchoGenericSuperBookCollectionWebClientXml() throws 
Exception {
+        
+        String endpointAddress = 
+            "http://localhost:"; + PORT + 
"/webapp/genericstore/books/superbooks";
+        WebClient wc = WebClient.create(endpointAddress);
+        wc.accept(MediaType.APPLICATION_XML).type(MediaType.APPLICATION_XML);
+        Collection<? extends SuperBook> books = 
+            wc.postAndGetCollection(Collections.singletonList(new 
SuperBook("Super", 124L, true)),
+                                    SuperBook.class,
+                                    SuperBook.class);
+        SuperBook book = books.iterator().next();
         assertEquals(124L, book.getId());
+        assertTrue(book.isSuperBook());
     }
     
     @Test

Modified: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
 (original)
+++ 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
 Wed Aug 14 13:16:58 2013
@@ -398,7 +398,7 @@ public class JAXRSClientServerSpringBook
         WebClient wc = WebClient.create(address, 
Collections.singletonList(provider));
         wc.accept("application/xml");
         wc.type("application/xml");
-        SuperBook book = new SuperBook("SuperBook2", 999L);
+        SuperBook book = new SuperBook("SuperBook2", 999L, true);
         Book book2 = wc.invoke("POST", book, Book.class, Book.class);
         assertEquals("SuperBook2", book2.getName());
         
@@ -412,7 +412,7 @@ public class JAXRSClientServerSpringBook
         
provider.setJaxbElementClassNames(Collections.singletonList(Book.class.getName()));
         BookStoreSpring bookStore = JAXRSClientFactory.create(address, 
BookStoreSpring.class, 
                                                               
Collections.singletonList(provider));
-        SuperBook book = new SuperBook("SuperBook2", 999L);
+        SuperBook book = new SuperBook("SuperBook2", 999L, true);
         Book book2 = bookStore.postGetBookXsiType(book);
         assertEquals("SuperBook2", book2.getName());
         

Modified: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBook.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBook.java?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBook.java
 (original)
+++ 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBook.java
 Wed Aug 14 13:16:58 2013
@@ -23,13 +23,23 @@ import javax.xml.bind.annotation.XmlRoot
 
 
 @XmlRootElement(name = "SuperBook")
-public class SuperBook extends Book {
+public class SuperBook extends Book implements SuperBookInterface {
+    private boolean superBook;
     
     public SuperBook() {
         
     }
     
-    public SuperBook(String name, long id) {
+    public SuperBook(String name, long id, boolean superStatus) {
         super(name, id);
+        this.superBook = superStatus;
+    }
+
+    public boolean isSuperBook() {
+        return superBook;
+    }
+
+    public void setSuperBook(boolean superBook) {
+        this.superBook = superBook;
     }
 }

Added: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBookInterface.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBookInterface.java?rev=1513867&view=auto
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBookInterface.java
 (added)
+++ 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBookInterface.java
 Wed Aug 14 13:16:58 2013
@@ -0,0 +1,23 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.systest.jaxrs;
+
+public interface SuperBookInterface {
+
+}

Propchange: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBookInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/SuperBookInterface.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: 
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_jackson_provider/WEB-INF/beans.xml
URL: 
http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_jackson_provider/WEB-INF/beans.xml?rev=1513867&r1=1513866&r2=1513867&view=diff
==============================================================================
--- 
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_jackson_provider/WEB-INF/beans.xml
 (original)
+++ 
cxf/trunk/systests/jaxrs/src/test/resources/jaxrs_jackson_provider/WEB-INF/beans.xml
 Wed Aug 14 13:16:58 2013
@@ -47,7 +47,18 @@ http://cxf.apache.org/schemas/jaxrs.xsd";
         </jaxrs:providers>
     </jaxrs:server>
     
+    <jaxrs:server id="genericBookStore"
+                  address="/genericstore">
+        <jaxrs:serviceBeans>
+            <ref bean="gBookStore"/>
+        </jaxrs:serviceBeans>
+        <jaxrs:providers>
+            <ref bean="jackson"/>
+        </jaxrs:providers>
+    </jaxrs:server>
+    
     <bean id="jackson" 
class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider"/>
     <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.BookStore"/>
     <bean id="bookstore2" 
class="org.apache.cxf.systest.jaxrs.BookStoreSpring"/>
+    <bean id="gBookStore" 
class="org.apache.cxf.systest.jaxrs.GenericBookStoreSpring"/>
 </beans>


Reply via email to