cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1496771 - in /cxf/branches/2.6.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/ tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/
Date Wed, 26 Jun 2013 06:20:42 GMT
Author: ema
Date: Wed Jun 26 06:20:41 2013
New Revision: 1496771

URL: http://svn.apache.org/r1496771
Log:
Merged revisions 1496753 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1496753 | ema | 2013-06-26 14:02:52 +0800 (Wed, 26 Jun 2013) | 9 lines
  
  Merged revisions 1496744 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1496744 | ema | 2013-06-26 13:52:00 +0800 (Wed, 26 Jun 2013) | 1 line
    
    [CXF-5089]:java2ws generate both ref and nillabe attributes in a schema element
  ........
................

Added:
    cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3.java
      - copied unchanged from r1496753, cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3.java
    cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3Impl.java
      - copied unchanged from r1496753, cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/Echo3Impl.java
    cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderException2.java
      - copied unchanged from r1496753, cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderException2.java
    cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderItem.java
      - copied unchanged from r1496753, cxf/branches/2.7.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/exception/OrderItem.java
Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
    cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1496753
  Merged /cxf/trunk:r1496744

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

Modified: cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java?rev=1496771&r1=1496770&r2=1496771&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBSchemaInitializer.java
Wed Jun 26 06:20:41 2013
@@ -626,6 +626,7 @@ class JAXBSchemaInitializer extends Serv
             QName ename = new QName(beanInfo.getElementNamespaceURI(null),
                                    beanInfo.getElementLocalName(null));
             XmlSchemaElement el2 = schemas.getElementByQName(ename);
+            el.setNillable(false);
             el.getRef().setTargetQName(el2.getQName());
         } else {
             el.setName(name.getLocalPart());

Modified: cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java?rev=1496771&r1=1496770&r2=1496771&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
(original)
+++ cxf/branches/2.6.x-fixes/tools/javato/ws/src/test/java/org/apache/cxf/tools/java2wsdl/processor/JavaToProcessorTest.java
Wed Jun 26 06:20:41 2013
@@ -778,6 +778,27 @@ public class JavaToProcessorTest extends
     }
     
     @Test
+    public void testExceptionRefNillable() throws Exception {
+        env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/exception-ref-nillable.wsdl");
+        env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.exception.Echo3Impl");
+        env.put(ToolConstants.CFG_VERBOSE, ToolConstants.CFG_VERBOSE);
+        try {
+            processor.setEnvironment(env);
+            processor.process();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        
+        File wsdlFile = new File(output, "exception-ref-nillable.wsdl");
+        assertTrue(wsdlFile.exists());
+        String wsdlContent = getStringFromFile(wsdlFile).replaceAll("  ", " ");
+        int refElement = wsdlContent.indexOf("<xs:element ref=\"tns:item\"/>");
+        assertTrue(refElement > -1);
+
+    }
+    
+    
+    @Test
     public void testCXF4877() throws Exception {
         env.put(ToolConstants.CFG_OUTPUTFILE, output.getPath() + "/testwsdl.wsdl");
         env.put(ToolConstants.CFG_CLASSNAME, "org.apache.cxf.tools.fortest.cxf4877.HelloImpl");
@@ -791,6 +812,4 @@ public class JavaToProcessorTest extends
         //if the test works, this won't throw an exception.  CXF-4877 generated bad XML at
this point
         StaxUtils.read(new FileInputStream(wsdlFile));
     }
-    
-    
 }



Mime
View raw message