cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r831605 - in /cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis: jaxws/AegisJaxwsGetTest.java services/Echo.java
Date Sat, 31 Oct 2009 22:17:10 GMT
Author: bimargulies
Date: Sat Oct 31 22:17:10 2009
New Revision: 831605

URL: http://svn.apache.org/viewvc?rev=831605&view=rev
Log:
Add test for use of Simple front end and no annotations.

Modified:
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/Echo.java

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java?rev=831605&r1=831604&r2=831605&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/jaxws/AegisJaxwsGetTest.java
Sat Oct 31 22:17:10 2009
@@ -26,6 +26,7 @@
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.aegis.services.Echo;
 import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.interceptor.AbstractInDatabindingInterceptor;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
 import org.apache.cxf.test.AbstractCXFTest;
@@ -48,6 +49,15 @@
         // turn off nanny in URIMappingInterceptor
         server.getEndpoint()
             .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
+        
+        ServerFactoryBean sf2 = new ServerFactoryBean();
+        sf2.setAddress("http://localhost:9167/SimpleEcho");
+        sf2.setDataBinding(new AegisDatabinding());
+        sf2.setServiceBean(new Echo());
+        server = sf2.create();
+        // turn off nanny in URIMappingInterceptor
+        server.getEndpoint()
+            .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
     }
     
     
@@ -69,4 +79,16 @@
         assertTrue(result.contains("hello"));
         method.releaseConnection();
     }
+    @Test
+    public void testGetEchoSimple() throws Exception {
+        HttpClient httpClient = createClient();
+        String url = "http://localhost:9167/SimpleEcho/simpleEcho/string/hello";
+        HttpMethod method = null;
+        method = new GetMethod(url);
+        int status = httpClient.executeMethod(method);
+        assertEquals(HttpStatus.SC_OK, status);
+        String result = method.getResponseBodyAsString();
+        assertTrue(result.contains("hello"));
+        method.releaseConnection();
+    }
 }

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/Echo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/Echo.java?rev=831605&r1=831604&r2=831605&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/Echo.java (original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/services/Echo.java Sat
Oct 31 22:17:10 2009
@@ -29,4 +29,8 @@
     public String echo(@WebParam(name = "echo") String echo) {
         return echo;
     }
+    
+    public String simpleEcho(String string) {
+        return string;
+    }
 }



Mime
View raw message