cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r780576 - in /cxf/branches/2.1.x-fixes: ./ rt/frontend/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/ rt/frontend/jaxrs/src/main/resources/schemas/ rt/fronten...
Date Mon, 01 Jun 2009 07:24:11 GMT
Author: ningjiang
Date: Mon Jun  1 07:24:10 2009
New Revision: 780576

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

........
  r780421 | ningjiang | 2009-05-31 20:33:53 +0800 (Sun, 31 May 2009) | 1 line
  
  CXF-2248 Added the unit tests for the spring configuration of JAXRSServerFactoryBean and
JAXRSClientFactoryBean
........

Added:
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoAnnotations.java
      - copied unchanged from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoAnnotations.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/
      - copied from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSClientFactoryBeanTest.java
      - copied unchanged from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSClientFactoryBeanTest.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java
      - copied, changed from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/clients.xml
      - copied unchanged from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/clients.xml
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/resources.xml
      - copied unchanged from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/resources.xml
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
      - copied, changed from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/pom.xml
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSClientFactoryBeanDefinitionParser.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
    cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/resources/schemas/jaxrs.xsd

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun  1 07:24:10 2009
@@ -1 +1 @@
-/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,780033,780184,780213
+/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,780033,780184,780213,780421

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

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/pom.xml?rev=780576&r1=780575&r2=780576&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/pom.xml (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/pom.xml Mon Jun  1 07:24:10 2009
@@ -138,7 +138,13 @@
             <version>${project.version}</version>
             <scope>test</scope>
         </dependency>
-		<dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-local</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency> 
+	<dependency>
             <groupId>org.apache.xmlbeans</groupId>
             <artifactId>xmlbeans</artifactId>
         </dependency>

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java?rev=780576&r1=780575&r2=780576&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/client/JAXRSClientFactoryBean.java
Mon Jun  1 07:24:10 2009
@@ -59,7 +59,7 @@
         return username;
     }
 
-    public void setUsername(String username) {
+    public void setUsername(String username) {        
         this.username = username;
     }
     
@@ -95,6 +95,10 @@
         }
     }
     
+    public Map getHeaders() {
+        return headers;
+    }
+    
     public WebClient createWebClient() {
         
         Service service = new JAXRSServiceImpl(getAddress());

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSClientFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSClientFactoryBeanDefinitionParser.java?rev=780576&r1=780575&r2=780576&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSClientFactoryBeanDefinitionParser.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSClientFactoryBeanDefinitionParser.java
Mon Jun  1 07:24:10 2009
@@ -70,9 +70,7 @@
             Map map = ctx.getDelegate().parseMapElement(el, bean.getBeanDefinition());
             bean.addPropertyValue(name, map);
         } else if ("executor".equals(name)) {
-            setFirstChildAsProperty(el, ctx, bean, "serviceFactory.executor");
-        } else if ("invoker".equals(name)) {
-            setFirstChildAsProperty(el, ctx, bean, "serviceFactory.invoker");
+            setFirstChildAsProperty(el, ctx, bean, "serviceFactory.executor");         
         } else if ("binding".equals(name)) {
             setFirstChildAsProperty(el, ctx, bean, "bindingConfig");
         } else if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name)

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java?rev=780576&r1=780575&r2=780576&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
Mon Jun  1 07:24:10 2009
@@ -21,8 +21,6 @@
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.namespace.QName;
-
 import org.w3c.dom.Element;
 
 import org.apache.cxf.Bus;
@@ -42,7 +40,6 @@
 
 
 
-
 public class JAXRSServerFactoryBeanDefinitionParser extends AbstractBeanDefinitionParser
{
     
 
@@ -53,12 +50,7 @@
     
     @Override
     protected void mapAttribute(BeanDefinitionBuilder bean, Element e, String name, String
val) {
-        if ("endpointName".equals(name) || "serviceName".equals(name)) {
-            QName q = parseQName(e, val);
-            bean.addPropertyValue(name, q);
-        } else {
-            mapToProperty(bean, name, val);
-        }
+        mapToProperty(bean, name, val);        
     }
 
     @Override

Modified: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/resources/schemas/jaxrs.xsd
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/resources/schemas/jaxrs.xsd?rev=780576&r1=780575&r2=780576&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/resources/schemas/jaxrs.xsd (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/main/resources/schemas/jaxrs.xsd Mon Jun
 1 07:24:10 2009
@@ -36,6 +36,7 @@
           <xsd:all>
             <xsd:element name="executor" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="features" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="binding" type="xsd:anyType" minOccurs="0" />  
             <xsd:element name="inInterceptors" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="invoker" type="xsd:anyType" minOccurs="0"/>
@@ -52,7 +53,9 @@
           <xsd:attribute name="address" type="xsd:string" />
           <xsd:attribute name="bus" type="xsd:string" />
           <xsd:attribute name="serviceClass" type="xsd:string"/>                  
 
-          <xsd:attribute name="staticSubresourceResolution" type="xsd:boolean" />
+          <xsd:attribute name="transportId" type="xsd:string"/>
+          <xsd:attribute name="bindingId" type="xsd:string" />          
+          <xsd:attribute name="staticSubresourceResolution" type="xsd:boolean" /> 
        
         </xsd:extension>
       </xsd:complexContent>
     </xsd:complexType>
@@ -65,6 +68,7 @@
           <xsd:all>
             <xsd:element name="executor" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="features" type="xsd:anyType" minOccurs="0"/>
+            <xsd:element name="binding" type="xsd:anyType" minOccurs="0" />
             <xsd:element name="inInterceptors" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="inFaultInterceptors" type="xsd:anyType" minOccurs="0"/>
             <xsd:element name="outInterceptors" type="xsd:anyType" minOccurs="0"/>
@@ -79,6 +83,8 @@
           <xsd:attribute name="serviceClass" type="xsd:string"/>
           <xsd:attribute name="inheritHeaders" type="xsd:boolean"/>
           <xsd:attribute name="bus" type="xsd:string" />
+          <xsd:attribute name="transportId" type="xsd:string"/>
+          <xsd:attribute name="bindingId" type="xsd:string" />
           <xsd:attribute name="username" type="xsd:string"/>
           <xsd:attribute name="password" type="xsd:string"/>
         </xsd:extension>

Copied: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java
(from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java)
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java?p2=cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java&p1=cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java&r1=780421&r2=780576&rev=780576&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanTest.java
Mon Jun  1 07:24:10 2009
@@ -57,10 +57,6 @@
         assertNotNull("The provider should not be null", sfb.getProviders());
         assertEquals("Get a wrong provider size", sfb.getProviders().size(), 2);
         
-        sfb = (JAXRSServerFactoryBean)ctx.getBean("moduleServer");
-        assertNotNull("The resource classes should not be null", sfb.getResourceClasses());
-        assertEquals("Get a wrong ResourceClasses size", 1, sfb.getResourceClasses().size());
-        
-        
+               
     }
 }

Copied: cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
(from r780421, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml)
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml?p2=cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml&p1=cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml&r1=780421&r2=780576&rev=780576&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml (original)
+++ cxf/branches/2.1.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/spring/servers.xml
Mon Jun  1 07:24:10 2009
@@ -24,14 +24,15 @@
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
 http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
 http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
-
+  <import resource="classpath:META-INF/cxf/cxf.xml"/>
+  <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml"/>
 
   <bean class="org.apache.cxf.transport.local.LocalTransportFactory" lazy-init="false">
       <property name="transportIds">
           <list>
               <value>http://cxf.apache.org/transports/local</value>
               <value>http://schemas.xmlsoap.org/soap/http</value>
-              <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
+              <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>      
                    
           </list>
       </property>
   </bean>
@@ -62,13 +63,5 @@
   <bean id="feed" class="org.apache.cxf.jaxrs.provider.AtomFeedProvider"/>
   <bean id="entry" class="org.apache.cxf.jaxrs.provider.AtomEntryProvider"/>
   
-  <jaxrs:server id="moduleServer"
-    modelRef="classpath:/org/apache/cxf/jaxrs/spring/resources.xml"
-    address="http://localhost:8080/simpleWithAddress"
-    bus="cxf" >
-    <jaxrs:serviceBeans>
-       <bean class="org.apache.cxf.jaxrs.resources.BookStoreNoAnnotations"/>
-    </jaxrs:serviceBeans>        
-  </jaxrs:server>
   
 </beans>



Mime
View raw message