camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1032535 - in /camel/trunk/components/camel-cxf/src: main/java/org/apache/camel/component/cxf/spring/ test/java/org/apache/camel/component/cxf/spring/ test/resources/org/apache/camel/component/cxf/spring/
Date Mon, 08 Nov 2010 10:30:38 GMT
Author: ningjiang
Date: Mon Nov  8 10:30:37 2010
New Revision: 1032535

URL: http://svn.apache.org/viewvc?rev=1032535&view=rev
Log:
CAMEL-3319 Added more tests about schemaLocation on CxfRs*

Modified:
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanDefinitionParser.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanDefinitionParser.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java
    camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
    camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeans.xml

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanDefinitionParser.java?rev=1032535&r1=1032534&r2=1032535&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanDefinitionParser.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanDefinitionParser.java
Mon Nov  8 10:30:37 2010
@@ -95,5 +95,10 @@ public class CxfRsClientFactoryBeanDefin
         public void setBeanId(String id) {            
             beanId = id;            
         }
+        
+        // add this mothod for testing
+        List<String> getSchemaLocations() {
+            return schemaLocations;
+        }
     }    
 }

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanDefinitionParser.java?rev=1032535&r1=1032534&r2=1032535&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanDefinitionParser.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanDefinitionParser.java
Mon Nov  8 10:30:37 2010
@@ -113,6 +113,11 @@ public class CxfRsServerFactoryBeanDefin
         public void setServiceClass(Class clazz) {
             setResourceClasses(clazz);
         }
+        
+        // add this mothod for testing
+        List<String> getSchemaLocations() {
+            return schemaLocations;
+        }
     }
 
    

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java?rev=1032535&r1=1032534&r2=1032535&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeanTest.java
Mon Nov  8 10:30:37 2010
@@ -36,6 +36,8 @@ public class CxfRsClientFactoryBeanTest 
         assertEquals("Get a wrong user name", cfb.getUsername(), "username");
         CustomerService customerService = cfb.create(CustomerService.class);
         assertNotNull("The customer service should not be null", customerService);
+        assertEquals("Got the wrong schemalocations size", 1, cfb.getSchemaLocations().size());
+        assertEquals("Got the wrong schemalocation", "classpath:wsdl/Message.xsd", cfb.getSchemaLocations().get(0));
     }
 
 }

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java?rev=1032535&r1=1032534&r2=1032535&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeanTest.java
Mon Nov  8 10:30:37 2010
@@ -42,7 +42,9 @@ public class CxfRsServerFactoryBeanTest 
         sfb2.getResourceClasses();
         List<Class<?>> resource2Classes = sfb2.getResourceClasses();
         assertEquals("Get a wrong size of resouceClasses", resource2Classes.size(), 1);
-        assertEquals("Get a wrong resource class", resource2Classes.get(0), CustomerService.class);
       
+        assertEquals("Get a wrong resource class", resource2Classes.get(0), CustomerService.class);
+        assertEquals("Got the wrong schemalocations size", 1, sfb2.getSchemaLocations().size());
+        assertEquals("Got the wrong schemalocation", "classpath:wsdl/Message.xsd", sfb2.getSchemaLocations().get(0));
     }
 
 }

Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml?rev=1032535&r1=1032534&r2=1032535&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
(original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsClientFactoryBeans.xml
Mon Nov  8 10:30:37 2010
@@ -26,7 +26,11 @@
 
   <cxf:rsClient id="rsClient1" address="http://localhost:9000/router"
     serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"
-    username="username" password="passwd" />
+    username="username" password="passwd" >
+    <cxf:schemaLocations>
+    	 <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
+    </cxf:schemaLocations>
+  </cxf:rsClient>
     
   <!-- test the properties of set header and other things
    cxf:rsClient id="rsClient1" address="http://localhost:9000/router"

Modified: camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeans.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeans.xml?rev=1032535&r1=1032534&r2=1032535&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeans.xml
(original)
+++ camel/trunk/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/spring/CxfRsServerFactoryBeans.xml
Mon Nov  8 10:30:37 2010
@@ -31,7 +31,11 @@
   </cxf:rsServer>
     
   <cxf:rsServer id="rsServer2" address="http://localhost:9000/server2"
-    serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"/>
+    serviceClass="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService">
+    <cxf:schemaLocations>
+    	 <cxf:schemaLocation>classpath:wsdl/Message.xsd</cxf:schemaLocation>
+    </cxf:schemaLocations>
+  </cxf:rsServer>
     
   <bean id="customerService" class="org.apache.camel.component.cxf.jaxrs.testbean.CustomerService"/>
   



Mime
View raw message