camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1412473 - in /camel/trunk/tests/camel-itest/src/test: java/org/apache/camel/itest/greeter/CamelGreeterFileDomTest.java resources/org/apache/camel/itest/greeter/CamelGreeterFileDomTest-context.xml
Date Thu, 22 Nov 2012 09:37:07 GMT
Author: davsclaus
Date: Thu Nov 22 09:37:06 2012
New Revision: 1412473

URL: http://svn.apache.org/viewvc?rev=1412473&view=rev
Log:
Fixed test

Modified:
    camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterFileDomTest.java
    camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterFileDomTest-context.xml

Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterFileDomTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterFileDomTest.java?rev=1412473&r1=1412472&r2=1412473&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterFileDomTest.java
(original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/greeter/CamelGreeterFileDomTest.java
Thu Nov 22 09:37:06 2012
@@ -20,7 +20,6 @@ import java.io.File;
 import javax.xml.ws.Endpoint;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.ExchangePattern;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.test.AvailablePortFinder;
 import org.apache.camel.test.junit4.TestSupport;
@@ -73,20 +72,18 @@ public class CamelGreeterFileDomTest ext
     }
 
     @Test
-    public void testMocksAreValid() throws Exception {
+    public void testCamelGreeter() throws Exception {
         TestSupport.deleteDirectory("target/greeter/response");
         assertNotNull(camelContext);
         
         ProducerTemplate template = camelContext.createProducerTemplate();
-        
-        Object result = template.sendBody("direct:start", ExchangePattern.InOut , 
-                                                   REQUEST);
-        
+        Object result = template.requestBody("direct:start", REQUEST);
+        template.stop();
+
         assertEquals("The result is wrong.", "Hello Willem", result);
         
         File file = new File("target/greeter/response/response.txt");
         assertTrue("File " + file + " should be there.", file.exists());
     }
 
-
 }

Modified: camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterFileDomTest-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterFileDomTest-context.xml?rev=1412473&r1=1412472&r2=1412473&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterFileDomTest-context.xml
(original)
+++ camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/greeter/CamelGreeterFileDomTest-context.xml
Thu Nov 22 09:37:06 2012
@@ -18,35 +18,33 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:cxf="http://camel.apache.org/schema/cxf"
-       xmlns:type="http://apache.org/hello_world_soap_http/types"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
 
- <import resource="classpath:META-INF/cxf/cxf.xml"/>
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
- 
- <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CamelGreeterFileDomTest.port}/SoapContext/SoapPort"
-            wsdlURL="wsdl/hello_world.wsdl"
-    		serviceClass="org.apache.hello_world_soap_http.Greeter"
-    		endpointName="s:SoapOverHttp"
-    		serviceName="s:SOAPService"
-    	    xmlns:s="http://apache.org/hello_world_soap_http"
-    	    loggingFeatureEnabled="true">
- </cxf:cxfEndpoint>
-  
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+  <cxf:cxfEndpoint id="serviceEndpoint" address="http://localhost:${CamelGreeterFileDomTest.port}/SoapContext/SoapPort"
+                   wsdlURL="wsdl/hello_world.wsdl"
+                   serviceClass="org.apache.hello_world_soap_http.Greeter"
+                   endpointName="s:SoapOverHttp"
+                   serviceName="s:SOAPService"
+                   xmlns:s="http://apache.org/hello_world_soap_http">
+  </cxf:cxfEndpoint>
+
   <!-- START SNIPPET: example -->
-  <camelContext xmlns="http://camel.apache.org/schema/spring">
+  <camelContext xmlns="http://camel.apache.org/schema/spring" xmlns:types="http://apache.org/hello_world_soap_http/types">
     <route streamCache="true">
-        <from uri="direct:start" />        
-        <to uri="cxf://bean:serviceEndpoint?dataFormat=MESSAGE"/>
-        <to uri="file:target/greeter/response/response.txt"/>
-        <convertBodyTo type="org.w3c.dom.Document" />
-        <setBody>
-        	<xpath resultType="java.lang.String">//type:responseType</xpath>
-        </setBody>
+      <from uri="direct:start"/>
+      <to uri="cxf://bean:serviceEndpoint?dataFormat=MESSAGE"/>
+      <to uri="file:target/greeter/response/?fileName=response.txt"/>
+      <convertBodyTo type="org.w3c.dom.Document"/>
+      <to uri="log:xml"/>
+      <setBody>
+        <xpath resultType="java.lang.String">//types:responseType</xpath>
+      </setBody>
     </route>
   </camelContext>
   <!-- END SNIPPET: example -->



Mime
View raw message