You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2011/11/10 08:12:29 UTC

svn commit: r1200196 - in /cxf/branches/2.4.x-fixes: ./ systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/

Author: ffang
Date: Thu Nov 10 07:12:28 2011
New Revision: 1200196

URL: http://svn.apache.org/viewvc?rev=1200196&view=rev
Log:
Merged revisions 1200189 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1200189 | ffang | 2011-11-10 14:55:42 +0800 (四, 10 11 2011) | 1 line
  
  [CXF-3836]test to verify null value for output Holder parameter works
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
    cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
    cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1200196&r1=1200195&r2=1200196&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java (original)
+++ cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java Thu Nov 10 07:12:28 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/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java?rev=1200196&r1=1200195&r2=1200196&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java (original)
+++ cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstService.java Thu Nov 10 07:12:28 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/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java?rev=1200196&r1=1200195&r2=1200196&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java (original)
+++ cxf/branches/2.4.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitWrappedCodeFirstServiceImpl.java Thu Nov 10 07:12:28 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();