cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r825300 - in /cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client: ClientServiceConfigTest.java Echo.java EchoImpl.java
Date Wed, 14 Oct 2009 21:45:20 GMT
Author: bimargulies
Date: Wed Oct 14 21:45:20 2009
New Revision: 825300

URL: http://svn.apache.org/viewvc?rev=825300&view=rev
Log:
add test case for Holder.

Modified:
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/ClientServiceConfigTest.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.java
    cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/EchoImpl.java

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/ClientServiceConfigTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/ClientServiceConfigTest.java?rev=825300&r1=825299&r2=825300&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/ClientServiceConfigTest.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/ClientServiceConfigTest.java
Wed Oct 14 21:45:20 2009
@@ -19,11 +19,16 @@
 
 package org.apache.cxf.aegis.client;
 
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.Holder;
+
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.databinding.AegisDatabinding;
 
 import org.apache.cxf.frontend.ClientProxyFactoryBean;
 import org.apache.cxf.frontend.ServerFactoryBean;
+import org.apache.cxf.jaxws.EndpointImpl;
+import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;
 import org.apache.cxf.service.invoker.BeanInvoker;
 import org.junit.Before;
@@ -45,6 +50,23 @@
         svrFac.setServiceClass(Echo.class);
         svrFac.setBus(getBus());
         svrFac.create();
+        
+        Endpoint endpoint = Endpoint.create(new EchoImpl());
+        EndpointImpl impl = (EndpointImpl) endpoint;
+        impl.setDataBinding(new AegisDatabinding());
+        endpoint.publish("local://JaxWsEcho");
+    }
+    
+    @Test
+    public void talkToJaxWsHolder() throws Exception {
+        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
+        factory.setServiceClass(Echo.class);
+        factory.setDataBinding(new AegisDatabinding());
+        factory.setAddress("local://JaxWsEcho");
+        Echo client = (Echo) factory.create();
+        Holder<String> sholder = new Holder<String>();
+        client.echo("Channa Doll", sholder);
+        assertEquals("Channa Doll", sholder.value);
     }
     
     @Test

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.java?rev=825300&r1=825299&r2=825300&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.java (original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/Echo.java Wed
Oct 14 21:45:20 2009
@@ -25,9 +25,9 @@
 
 @WebService
 public interface Echo {
-    String echo(String text,
-                @WebParam(mode = Mode.OUT)
+    String echo(@WebParam(name = "in", mode = Mode.IN)
+                String text,
+                @WebParam(name = "out", mode = Mode.OUT)
                 Holder<String> textAgain);
-    
     String simpleEcho(String text);
 }

Modified: cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/EchoImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/EchoImpl.java?rev=825300&r1=825299&r2=825300&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/EchoImpl.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/client/EchoImpl.java
Wed Oct 14 21:45:20 2009
@@ -22,7 +22,7 @@
 
 public class EchoImpl implements Echo {
     public String echo(String text, Holder<String> textAgain) {
-        textAgain.value = "header2";
+        textAgain.value = text;
         return text;
     }
 



Mime
View raw message