cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1478342 - in /cxf/trunk: rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/lifecycle/ rt/frontend/jaxrs/src/main/java/...
Date Thu, 02 May 2013 12:12:43 GMT
Author: sergeyb
Date: Thu May  2 12:12:43 2013
New Revision: 1478342

URL: http://svn.apache.org/r1478342
Log:
[CXF-4988] Making sure providers can get Application injected via field or setters and Application
itself can get the contexrs injected, same as for the root resource

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/SpringResourceFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
    cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java Thu May
 2 12:12:43 2013
@@ -169,8 +169,7 @@ public class JAXRSInvoker extends Abstra
                 }
             }
             if (cri.isRoot()) {
-                ProviderInfo<?> appProvider = 
-                    (ProviderInfo<?>)exchange.getEndpoint().get(Application.class.getName());
+                ProviderInfo<Application> appProvider = providerFactory.getApplicationProvider();
                 if (appProvider != null) {
                     InjectionUtils.injectContexts(appProvider.getProvider(),
                                                   appProvider,

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/blueprint/BlueprintResourceFactory.java
Thu May  2 12:12:43 2013
@@ -21,9 +21,15 @@ package org.apache.cxf.jaxrs.blueprint;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
+import java.util.Collections;
+import java.util.Map;
+
+import javax.ws.rs.core.Application;
 
 import org.apache.cxf.common.util.ClassHelper;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
+import org.apache.cxf.jaxrs.model.ProviderInfo;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.message.Message;
@@ -70,11 +76,15 @@ public class BlueprintResourceFactory im
 
     public Object getInstance(Message m) {
         //TODO -- This is not the BP way.
-        Object[] values = ResourceUtils.createConstructorArguments(c, m, !isSingleton());
+        ProviderInfo<?> application = m == null ? null
+            : (ProviderInfo<?>)m.getExchange().getEndpoint().get(Application.class.getName());
+        Map<Class<?>, Object> mapValues = CastUtils.cast(application == null
? null 
+            : Collections.singletonMap(Application.class, application.getProvider()));
+        Object[] values = ResourceUtils.createConstructorArguments(c, m, !isSingleton(),
mapValues);
         //TODO Very springish...
         Object instance = values.length > 0 ? blueprintContainer.getComponentInstance(beanId)

             : blueprintContainer.getComponentInstance(beanId);
-        if (!isSingleton || m == null) {
+        if (!isSingleton() || m == null) {
             InjectionUtils.invokeLifeCycleMethod(instance, postConstructMethod);
         }
         return instance;
@@ -85,7 +95,7 @@ public class BlueprintResourceFactory im
     }
 
     public void releaseInstance(Message m, Object o) {
-        if (!isSingleton) {
+        if (!isSingleton()) {
             InjectionUtils.invokeLifeCycleMethod(o, preDestroyMethod);
         }
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProvider.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProvider.java
Thu May  2 12:12:43 2013
@@ -22,10 +22,15 @@ package org.apache.cxf.jaxrs.lifecycle;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.Map;
 
 import javax.ws.rs.InternalServerErrorException;
+import javax.ws.rs.core.Application;
 import javax.ws.rs.core.Response;
 
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.jaxrs.model.ProviderInfo;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
@@ -65,8 +70,11 @@ public class PerRequestResourceProvider 
     }
     
     protected Object createInstance(Message m) {
-        
-        Object[] values = ResourceUtils.createConstructorArguments(c, m, true);
+        ProviderInfo<?> application = 
+            (ProviderInfo<?>)m.getExchange().getEndpoint().get(Application.class.getName());
+        Map<Class<?>, Object> mapValues = CastUtils.cast(application == null
? null 
+            : Collections.singletonMap(Application.class, application.getProvider()));
+        Object[] values = ResourceUtils.createConstructorArguments(c, m, true, mapValues);
         try {
             Object instance = values.length > 0 ? c.newInstance(values) : c.newInstance(new
Object[]{});
             InjectionUtils.invokeLifeCycleMethod(instance, postConstructMethod);

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
Thu May  2 12:12:43 2013
@@ -38,6 +38,7 @@ import java.util.Set;
 import java.util.logging.Logger;
 
 import javax.ws.rs.Produces;
+import javax.ws.rs.core.Application;
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.ext.ContextResolver;
@@ -255,7 +256,7 @@ public abstract class ProviderFactory {
         
     }
     
-    protected static <T> void handleMapper(List<T> candidates, 
+    protected <T> void handleMapper(List<T> candidates, 
                                      ProviderInfo<T> em, 
                                      Class<?> expectedType, 
                                      Message m, 
@@ -526,7 +527,7 @@ public abstract class ProviderFactory {
     }
     //CHECKSTYLE:ON
     
-    static void injectContextValues(ProviderInfo<?> pi, Message m) {
+    protected void injectContextValues(ProviderInfo<?> pi, Message m) {
         if (m != null) {
             InjectionUtils.injectContexts(pi.getProvider(), pi, m);
         }
@@ -541,9 +542,13 @@ public abstract class ProviderFactory {
         }
     }
     
-    void injectContextProxiesIntoProvider(ProviderInfo<?> pi) {
+    protected void injectContextProxiesIntoProvider(ProviderInfo<?> pi) {
+        injectContextProxiesIntoProvider(pi, null);
+    }
+    
+    void injectContextProxiesIntoProvider(ProviderInfo<?> pi, Application app) {
         if (pi.contextsAvailable()) {
-            InjectionUtils.injectContextProxies(pi, pi.getProvider());
+            InjectionUtils.injectContextProxiesAndApplication(pi, pi.getProvider(), app);
             injectedProviders.add(pi);
         }
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ServerProviderFactory.java
Thu May  2 12:12:43 2013
@@ -61,6 +61,7 @@ import org.apache.cxf.jaxrs.model.Operat
 import org.apache.cxf.jaxrs.model.ProviderInfo;
 import org.apache.cxf.jaxrs.model.wadl.WadlGenerator;
 import org.apache.cxf.jaxrs.utils.AnnotationUtils;
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.message.Message;
 
 public final class ServerProviderFactory extends ProviderFactory {
@@ -237,8 +238,8 @@ public final class ServerProviderFactory
             Class<?> providerCls = null;
             Object realObject = null;
             if (o instanceof Constructor) {
-                Map<Class<?>, Object> values = CastUtils.cast((application ==
null ? null 
-                    : Collections.singletonMap(Application.class, application.getProvider())));
+                Map<Class<?>, Object> values = CastUtils.cast(application ==
null ? null 
+                    : Collections.singletonMap(Application.class, application.getProvider()));
                 provider = createProviderFromConstructor((Constructor<?>)o, values);
                 providerCls = provider.getProvider().getClass();
                 realObject = provider;
@@ -283,6 +284,21 @@ public final class ServerProviderFactory
     }
 //CHECKSTYLE:ON
     
+    @Override
+    protected void injectContextProxiesIntoProvider(ProviderInfo<?> pi) {
+        injectContextProxiesIntoProvider(pi, application == null ? null : application.getProvider());
+    }
+    
+    @Override
+    protected void injectContextValues(ProviderInfo<?> pi, Message m) {
+        if (m != null) {
+            InjectionUtils.injectContexts(pi.getProvider(), pi, m);
+            if (application != null && application.contextsAvailable()) {
+                InjectionUtils.injectContexts(application.getProvider(), application, m);
+            }
+        }
+    }
+    
     private void addContainerRequestFilter(
         List<ProviderInfo<ContainerRequestFilter>> postMatchFilters,
         ProviderInfo<ContainerRequestFilter> p) {
@@ -307,6 +323,10 @@ public final class ServerProviderFactory
         application = app;
     }
     
+    public ProviderInfo<Application> getApplicationProvider() {
+        return application;
+    }
+    
     public void setRequestPreprocessor(RequestPreprocessor rp) {
         this.requestPreprocessor = rp;
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/SpringResourceFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/SpringResourceFactory.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/SpringResourceFactory.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/SpringResourceFactory.java
Thu May  2 12:12:43 2013
@@ -21,9 +21,15 @@ package org.apache.cxf.jaxrs.spring;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
+import java.util.Collections;
+import java.util.Map;
+
+import javax.ws.rs.core.Application;
 
 import org.apache.cxf.common.util.ClassHelper;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
+import org.apache.cxf.jaxrs.model.ProviderInfo;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.message.Message;
@@ -71,9 +77,13 @@ public class SpringResourceFactory imple
      * {@inheritDoc}
      */
     public Object getInstance(Message m) {
-        Object[] values = ResourceUtils.createConstructorArguments(c, m, !isSingleton());
+        ProviderInfo<?> application = m == null ? null
+            : (ProviderInfo<?>)m.getExchange().getEndpoint().get(Application.class.getName());
+        Map<Class<?>, Object> mapValues = CastUtils.cast(application == null
? null 
+            : Collections.singletonMap(Application.class, application.getProvider()));
+        Object[] values = ResourceUtils.createConstructorArguments(c, m, !isSingleton(),
mapValues);
         Object instance = values.length > 0 ? ac.getBean(beanId, values) : ac.getBean(beanId);
-        if (!isSingleton || m == null) {
+        if (!isSingleton() || m == null) {
             InjectionUtils.invokeLifeCycleMethod(instance, postConstructMethod);
         }
         return instance;
@@ -90,7 +100,7 @@ public class SpringResourceFactory imple
      * {@inheritDoc}
      */
     public void releaseInstance(Message m, Object o) {
-        if (!isSingleton) {
+        if (!isSingleton()) {
             InjectionUtils.invokeLifeCycleMethod(o, preDestroyMethod);
         }
     }

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProviderTest.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/lifecycle/PerRequestResourceProviderTest.java
Thu May  2 12:12:43 2013
@@ -18,9 +18,17 @@
  */
 package org.apache.cxf.jaxrs.lifecycle;
 
+import javax.ws.rs.core.Application;
+
+import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.jaxrs.Customer;
+import org.apache.cxf.jaxrs.provider.ProviderFactory;
+import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+import org.easymock.EasyMock;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -30,7 +38,7 @@ public class PerRequestResourceProviderT
     @Test
     public void testGetInstance() {
         PerRequestResourceProvider rp = new PerRequestResourceProvider(Customer.class);
-        Message message = new MessageImpl();
+        Message message = createMessage();
         message.put(Message.QUERY_STRING, "a=aValue");
         Customer c = (Customer)rp.getInstance(message);
         assertNotNull(c.getUriInfo());
@@ -39,6 +47,29 @@ public class PerRequestResourceProviderT
         rp.releaseInstance(message, c);
         assertTrue(c.isPreDestroyCalled());
     }
+    
+    private Message createMessage() {
+        ProviderFactory factory = ServerProviderFactory.getInstance();
+        Message m = new MessageImpl();
+        m.put("org.apache.cxf.http.case_insensitive_queries", false);
+        Exchange e = new ExchangeImpl();
+        m.setExchange(e);
+        e.setInMessage(m);
+        Endpoint endpoint = EasyMock.createMock(Endpoint.class);
+        endpoint.getEndpointInfo();
+        EasyMock.expectLastCall().andReturn(null).anyTimes();
+        endpoint.get(Application.class.getName());
+        EasyMock.expectLastCall().andReturn(null);
+        endpoint.size();
+        EasyMock.expectLastCall().andReturn(0).anyTimes();
+        endpoint.isEmpty();
+        EasyMock.expectLastCall().andReturn(true).anyTimes();
+        endpoint.get(ServerProviderFactory.class.getName());
+        EasyMock.expectLastCall().andReturn(factory).anyTimes();
+        EasyMock.replay(endpoint);
+        e.put(Endpoint.class, endpoint);
+        return m;
+    }
 }
 
 

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
Thu May  2 12:12:43 2013
@@ -240,7 +240,7 @@ public class JAXRSUtilsTest extends Asse
         ClassResourceInfo cri = sf.getServiceFactory().getClassResourceInfo().get(0);
         
         Customer customer = (Customer)cri.getResourceProvider().getInstance(
-             new MessageImpl());
+             createMessage());
         
         assertNull(customer.getApplication1());
         assertNull(customer.getApplication2());

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BookApplication.java
Thu May  2 12:12:43 2013
@@ -24,6 +24,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
+import javax.annotation.Priority;
 import javax.servlet.ServletContext;
 import javax.ws.rs.ApplicationPath;
 import javax.ws.rs.container.ContainerRequestContext;
@@ -55,6 +56,7 @@ public class BookApplication extends App
         classes.add(org.apache.cxf.systest.jaxrs.jaxws.BookStoreJaxrsJaxws.class);
         classes.add(org.apache.cxf.systest.jaxrs.RuntimeExceptionMapper.class);
         classes.add(BookRequestFilter.class);
+        classes.add(BookRequestFilter2.class);
         return classes;
     }
 
@@ -83,6 +85,7 @@ public class BookApplication extends App
         defaultId = Long.valueOf(sb.toString());
     }
     
+    @Priority(1)
     public static class BookRequestFilter implements ContainerRequestFilter {
         private UriInfo ui;
         private Application ap;
@@ -98,7 +101,31 @@ public class BookApplication extends App
                 throw new RuntimeException();
             }
             if (ui.getRequestUri().toString().endsWith("/application11/thebooks/bookstore2/bookheaders"))
{
-                context.getHeaders().put("BOOK", Arrays.asList("1", "2", "3"));    
+                context.getHeaders().put("BOOK", Arrays.asList("1", "2"));    
+            }
+            
+        }
+        
+    }
+    
+    @Priority(2)
+    public static class BookRequestFilter2 implements ContainerRequestFilter {
+        private UriInfo ui;
+        @Context
+        private Application ap;
+        
+        @Context
+        public void setUriInfo(UriInfo context) {
+            this.ui = context;
+        }
+        
+        @Override
+        public void filter(ContainerRequestContext context) throws IOException {
+            if (ap == null) {
+                throw new RuntimeException();
+            }
+            if (ui.getRequestUri().toString().endsWith("/application11/thebooks/bookstore2/bookheaders"))
{
+                context.getHeaders().add("BOOK", "3");    
             }
             
         }

Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java?rev=1478342&r1=1478341&r2=1478342&view=diff
==============================================================================
--- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java
(original)
+++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerNonSpringBookTest.java
Thu May  2 12:12:43 2013
@@ -156,6 +156,7 @@ public class JAXRSClientServerNonSpringB
     @Test
     public void testGetBook123Application11PerRequest() throws Exception {
         WebClient wc = WebClient.create("http://localhost:" + PORT + "/application11/thebooks/bookstore2/bookheaders");
+        WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(100000000L);
         wc.accept("application/xml");
         Book book = wc.get(Book.class);
         assertEquals("CXF in Action", book.getName());



Mime
View raw message