cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1200189 - in /cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws: ClientServerMiscTest.java DocLitWrappedCodeFirstService.java DocLitWrappedCodeFirstServiceImpl.java
Date Thu, 10 Nov 2011 06:55:43 GMT
Author: ffang
Date: Thu Nov 10 06:55:42 2011
New Revision: 1200189

URL: http://svn.apache.org/viewvc?rev=1200189&view=rev
Log:
[CXF-3836]test to verify null value for output Holder parameter works

Modified:
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
    cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1200189&r1=1200188&r2=1200189&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Thu Nov 10 06:55:42 2011
@@ -392,6 +392,21 @@ public class ClientServerMiscTest extend
                                                              DocLitWrappedCodeFirstService.class);
         runDocLitTest(port);
     }
+    
+    @Test
+    public void testWrappedHolderOutNull() throws Exception {
+        // this test to verify CXF-3836 works
+        QName portName = new QName("http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService",
+                                   "DocLitWrappedCodeFirstServicePort");
+        QName servName = new QName("http://cxf.apache.org/systest/jaxws/DocLitWrappedCodeFirstService",
+                                   "DocLitWrappedCodeFirstService");
+
+        Service service = Service.create(new URL(ServerMisc.DOCLIT_CODEFIRST_URL + "?wsdl"),
servName);
+        DocLitWrappedCodeFirstService port = service.getPort(portName, DocLitWrappedCodeFirstService.class);
+        Holder<Boolean> created = new Holder<Boolean>();
+        port.singleInOut(created);
+        assertEquals(created.value, Boolean.FALSE);
+    }
 
     private void setASM(boolean b) throws Exception {
         Field f = ASMHelper.class.getDeclaredField("oldASM");

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=1200189&r1=1200188&r2=1200189&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
(original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
Thu Nov 10 06:55:42 2011
@@ -126,6 +126,10 @@ public interface DocLitWrappedCodeFirstS
                       @WebParam(mode = WebParam.Mode.OUT)
                       Holder<String> g);
     
+    void singleInOut(@WebParam(mode = WebParam.Mode.OUT, 
+                               name = "created", targetNamespace = "")
+                               Holder<Boolean> created);
+    
     
     @WebMethod
     List<Foo> listObjectOutput();

Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=1200189&r1=1200188&r2=1200189&view=diff
==============================================================================
--- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
(original)
+++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
Thu Nov 10 06:55:42 2011
@@ -136,6 +136,15 @@ public class DocLitWrappedCodeFirstServi
         g.value = "g";
         return ret;
     }
+    
+    public void singleInOut(Holder<Boolean> created) {
+        if (created.value == null) {
+            created.value = false;
+        } else {
+            created.value = true;
+        }
+            
+    }
 
     public List<Foo> listObjectOutput() {
         Foo a = new Foo();



Mime
View raw message