cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r786865 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ rt/frontend/jaxrs/src/...
Date Sat, 20 Jun 2009 17:40:17 GMT
Author: sergeyb
Date: Sat Jun 20 17:40:16 2009
New Revision: 786865

URL: http://svn.apache.org/viewvc?rev=786865&view=rev
Log:
Merged revisions 786512 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r786512 | sergeyb | 2009-06-19 15:04:04 +0100 (Fri, 19 Jun 2009) | 1 line
  
  JAXRS : support for user model specifying interfaces only
........

Added:
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsImpl.java
      - copied unchanged from r786512, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsImpl.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsInterface.java
      - copied unchanged from r786512, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreNoAnnotationsInterface.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/resources2.xml
      - copied unchanged from r786512, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/resources2.xml
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/MethodDispatcher.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
    cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jun 20 17:40:16 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786514,786582-786583,786638
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Jun 20 17:40:16 2009
@@ -1 +1 @@
-/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784184,784893-785866,785932,786142,786271-786272,786395,786514,786582-786583,786638
+/cxf/trunk:1-782619,782728-782730,783097,783294,783396,784059,784181-784184,784893-785866,785932,786142,786271-786272,786395,786512,786514,786582-786583,786638

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/AbstractJAXRSFactoryBean.java
Sat Jun 20 17:40:16 2009
@@ -20,6 +20,7 @@
 
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.ResourceBundle;
 import java.util.logging.Logger;
@@ -37,8 +38,10 @@
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.endpoint.EndpointException;
 import org.apache.cxf.endpoint.EndpointImpl;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.jaxrs.model.UserResource;
 import org.apache.cxf.jaxrs.provider.ProviderFactory;
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.model.BindingInfo;
@@ -204,8 +207,18 @@
         setProviders(Collections.singletonList(provider));
     }
 
-    protected void checkResources() {
-        if (!serviceFactory.resourcesAvailable()) {
+    protected void checkResources(boolean server) {
+        List<ClassResourceInfo> list = serviceFactory.getRealClassResourceInfo();
+        if (server) {
+            for (Iterator<ClassResourceInfo> it = list.iterator(); it.hasNext();) {
+                ClassResourceInfo cri = it.next();
+                if (cri.isCreatedFromModel() && cri.getServiceClass() == cri.getResourceClass()

+                    && !InjectionUtils.isConcreteClass(cri.getServiceClass())) {
+                    it.remove();
+                }
+            }
+        }
+        if (list.size() == 0) {
             org.apache.cxf.common.i18n.Message msg = 
                 new org.apache.cxf.common.i18n.Message("NO_RESOURCES_AVAILABLE", 
                                                        BUNDLE);

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
Sat Jun 20 17:40:16 2009
@@ -74,7 +74,7 @@
     
     public Server create() {
         try {
-            checkResources();
+            checkResources(true);
             if (serviceFactory.getService() == null) {
                 serviceFactory.create();
                 updateClassResourceProviders();

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
Sat Jun 20 17:40:16 2009
@@ -34,6 +34,7 @@
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.jaxrs.model.UserResource;
 import org.apache.cxf.jaxrs.utils.AnnotationUtils;
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.factory.AbstractServiceFactoryBean;
@@ -61,10 +62,6 @@
         this.enableStatic = staticResolution;
     }
     
-    public boolean resourcesAvailable() {
-        return !classResourceInfos.isEmpty();
-    }
-    
     @Override
     public Service create() {
         initializeServiceModel();
@@ -115,6 +112,10 @@
         return Collections.unmodifiableList(classResourceInfos);
     }
     
+    List<ClassResourceInfo> getRealClassResourceInfo() {
+        return classResourceInfos;
+    }
+    
     public void setResourceClass(Class cls) {
         if (getCreatedFromModel(cls) == null) {
             classResourceInfos.clear();
@@ -164,7 +165,12 @@
             
             ClassResourceInfo cri = getCreatedFromModel(realClass);
             if (cri != null) {
+                if (!InjectionUtils.isConcreteClass(cri.getServiceClass())) {
+                    cri = new ClassResourceInfo(cri);
+                    classResourceInfos.add(cri);
+                }
                 cri.setResourceClass(bean.getClass());
+                cri.setResourceProvider(new SingletonResourceProvider(bean));
                 continue;
             }
             
@@ -179,7 +185,8 @@
     
     private ClassResourceInfo getCreatedFromModel(Class<?> realClass) {
         for (ClassResourceInfo cri : classResourceInfos) {
-            if (cri.isCreatedFromModel() && cri.getServiceClass() == realClass) {
+            if (cri.isCreatedFromModel() 
+                && cri.isRoot() && cri.getServiceClass().isAssignableFrom(realClass))
{
                 return cri;
             }
         }

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Sat Jun 20 17:40:16 2009
@@ -122,7 +122,7 @@
     }
     
     public Client createWithValues(Object... varValues) {
-        checkResources();
+        checkResources(false);
         
         try {
             Endpoint ep = createEndpoint();

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
Sat Jun 20 17:40:16 2009
@@ -44,10 +44,13 @@
     private static Map<Class<?>, Map<Field, ThreadLocalProxy>> resourceProxyMap;
     private static Map<Class<?>, Map<Method, ThreadLocalProxy>> setterProxyMap;
     
-    private boolean root;
-    private Class<?> resourceClass;
-    private Class<?> serviceClass;
+    protected boolean root;
+    protected Class<?> resourceClass;
+    protected Class<?> serviceClass;
     
+    protected AbstractResourceInfo() {
+        
+    }
     
     protected AbstractResourceInfo(Class<?> resourceClass, Class<?> serviceClass,
boolean isRoot) {
         this.serviceClass = serviceClass;

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
Sat Jun 20 17:40:16 2009
@@ -36,6 +36,7 @@
 
 import org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
 import org.apache.cxf.jaxrs.utils.AnnotationUtils;
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 
 public class ClassResourceInfo extends AbstractResourceInfo {
@@ -55,6 +56,23 @@
         this(theResourceClass, false);
     }
     
+    public ClassResourceInfo(ClassResourceInfo cri) {
+        
+        if (cri.isCreatedFromModel() && !InjectionUtils.isConcreteClass(cri.getServiceClass()))
{
+            this.root = cri.root;
+            this.serviceClass = cri.serviceClass;
+            this.uriTemplate = cri.uriTemplate;    
+            this.methodDispatcher = new MethodDispatcher(cri.methodDispatcher, this);
+            this.subResources = cri.subResources;
+            this.paramFields = cri.paramFields;
+            this.paramMethods = cri.paramMethods;
+            this.enableStatic = true;
+        } else {
+            throw new IllegalArgumentException();
+        }
+        
+    }
+    
     public ClassResourceInfo(Class<?> theResourceClass, boolean theRoot) {
         this(theResourceClass, theResourceClass, theRoot);
     }

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/MethodDispatcher.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/MethodDispatcher.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/MethodDispatcher.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/MethodDispatcher.java
Sat Jun 20 17:40:16 2009
@@ -30,6 +30,18 @@
     private Map<Method, OperationResourceInfo> methodToOri = 
         new LinkedHashMap<Method, OperationResourceInfo>();
 
+    public MethodDispatcher() {
+        
+    }
+    
+    MethodDispatcher(MethodDispatcher md, ClassResourceInfo cri) {
+        for (OperationResourceInfo ori : md.getOperationResourceInfos()) {    
+            OperationResourceInfo clone = new OperationResourceInfo(ori, cri);
+            oriToMethod.put(clone, clone.getMethodToInvoke());
+            methodToOri.put(clone.getMethodToInvoke(), clone);
+        }
+    }
+    
     public void bind(OperationResourceInfo o, Method... methods) {
         Method primary = methods[0];
 

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java
Sat Jun 20 17:40:16 2009
@@ -48,6 +48,19 @@
         this(mInvoke, mInvoke, cri);
     }
     
+    OperationResourceInfo(OperationResourceInfo ori, ClassResourceInfo cri) {
+        this.uriTemplate = ori.uriTemplate;
+        this.methodToInvoke = ori.methodToInvoke;
+        this.annotatedMethod = ori.annotatedMethod;
+        this.httpMethod = ori.httpMethod;
+        this.produceMimes = ori.produceMimes;
+        this.consumeMimes = ori.consumeMimes;
+        this.encoded = ori.encoded;
+        this.defaultParamValue = ori.defaultParamValue;
+        this.parameters = ori.parameters;
+        this.classResourceInfo = cri;
+    }
+    
     public OperationResourceInfo(Method mInvoke, Method mAnnotated, ClassResourceInfo cri)
{
         methodToInvoke = mInvoke;
         annotatedMethod = mAnnotated;

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
Sat Jun 20 17:40:16 2009
@@ -95,6 +95,10 @@
         
     }
 
+    public static boolean isConcreteClass(Class<?> cls) {
+        return !cls.isInterface() && !Modifier.isAbstract(cls.getModifiers());
+    }
+    
     public static Type getSuperType(Class<?> serviceClass, TypeVariable var) {
         
         int pos = 0;

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Sat Jun 20 17:40:16 2009
@@ -80,10 +80,12 @@
         }
         Class<?> sClass = loadClass(model.getName());
         ClassResourceInfo cri  = new ClassResourceInfo(sClass, sClass, isRoot, true, true);
-        try {
-            cri.setResourceProvider(new SingletonResourceProvider(sClass.newInstance()));
-        } catch (Exception ex) {
-            throw new RuntimeException("Resource class " + model.getName() + " can not be
created");
+        if (InjectionUtils.isConcreteClass(cri.getServiceClass())) {
+            try {
+                cri.setResourceProvider(new SingletonResourceProvider(sClass.newInstance()));
+            } catch (Exception ex) {
+                throw new RuntimeException("Resource class " + model.getName() + " can not
be created");
+            }
         }
         URITemplate t = URITemplate.createTemplate(model.getPath());
         cri.setURITemplate(t);

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerProxySpringBookTest.java
Sat Jun 20 17:40:16 2009
@@ -44,12 +44,18 @@
     
     @Test
     public void testGetThatBook123UserResource() throws Exception {
-        getBook("http://localhost:9080/test/bookstore/books/123");
+        getBook("http://localhost:9080/test/2/bookstore/books/123");
+    }
+    
+    @Test
+    public void testGetThatBook123UserResourceInterface() throws Exception {
+        getBook("http://localhost:9080/test/3/bookstore2/books/123");
     }
     
     private void getBook(String endpointAddress) throws Exception {
         URL url = new URL(endpointAddress);
         URLConnection connect = url.openConnection();
+        connect.addRequestProperty("Content-Type", "*/*");
         connect.addRequestProperty("Accept", "application/xml");
         InputStream in = connect.getInputStream();           
 

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerSpringBookTest.java
Sat Jun 20 17:40:16 2009
@@ -49,7 +49,7 @@
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", 
-                   launchServer(BookServerSpring.class, true));
+                   launchServer(BookServerSpring.class));
     }
     
     @Test
@@ -124,6 +124,7 @@
     private void getBook(String endpointAddress, String resource, String type) throws Exception
{
         URL url = new URL(endpointAddress);
         URLConnection connect = url.openConnection();
+        connect.addRequestProperty("Content-Type", "*/*");
         connect.addRequestProperty("Accept", type);
         InputStream in = connect.getInputStream();           
 

Modified: cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml?rev=786865&r1=786864&r2=786865&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml (original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_proxy/WEB-INF/beans.xml Sat
Jun 20 17:40:16 2009
@@ -58,6 +58,15 @@
   </jaxrs:server>
   <bean id="bookstore2" class="org.apache.cxf.systest.jaxrs.BookStoreNoAnnotations"/>
   
+  
+  <jaxrs:server id="bookservice3" address="/3"
+    modelRef="classpath:/org/apache/cxf/systest/jaxrs/resources/resources2.xml">
+    <jaxrs:serviceBeans>
+      <ref bean="bookstore3"/>
+    </jaxrs:serviceBeans>		   
+  </jaxrs:server>
+  <bean id="bookstore3" class="org.apache.cxf.systest.jaxrs.BookStoreNoAnnotationsImpl"/>
+  
   <aop:config>
 		<aop:aspect id="loggingAspect" ref="simpleLogger">
 			<aop:before



Mime
View raw message