You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/03/02 16:49:19 UTC

svn commit: r1296259 - in /cxf/branches/2.3.x-fixes: ./ api/src/main/java/org/apache/cxf/tools/common/ tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/ tools/wsdlto/test/src/test/java/org/apache/cxf/to...

Author: dkulp
Date: Fri Mar  2 15:49:18 2012
New Revision: 1296259

URL: http://svn.apache.org/viewvc?rev=1296259&view=rev
Log:
Merged revisions 1294951 via  svn merge from
https://svn.us.apache.org/repos/asf/cxf/branches/2.4.x-fixes

........
  r1294951 | dkulp | 2012-02-28 21:47:46 -0500 (Tue, 28 Feb 2012) | 17 lines
  
  Merged revisions 1293072 via  svn merge from
  https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
  
  ........
    r1293072 | ema | 2012-02-23 23:06:49 -0500 (Thu, 23 Feb 2012) | 9 lines
    
    Merged revisions 1293064 via svnmerge from 
    https://svn.apache.org/repos/asf/cxf/trunk
    
    ........
      r1293064 | ema | 2012-02-24 11:05:55 +0800 (Fri, 24 Feb 2012) | 1 line
      
      [CXF-4135]:Allow xsd shema file as a jaxb binding file to pass into JAXB schmeCompiler
    ........
    
  ........
  
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
    cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
    cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

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

Modified: cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=1296259&r1=1296258&r2=1296259&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java (original)
+++ cxf/branches/2.3.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java Fri Mar  2 15:49:18 2012
@@ -163,6 +163,7 @@ public final class ToolConstants {
     public static final String NS_JAXB_BINDINGS = "http://java.sun.com/xml/ns/jaxb";
     public static final QName  JAXWS_BINDINGS = new QName(NS_JAXWS_BINDINGS, "bindings");
     public static final QName  JAXB_BINDINGS = new QName(NS_JAXB_BINDINGS, "bindings");
+    public static final QName SCHEMA = new QName(SCHEMA_URI, "schema");
     public static final String JAXWS_BINDINGS_WSDL_LOCATION = "wsdlLocation";
     public static final String JAXWS_BINDING_NODE = "node";
     public static final String JAXWS_BINDING_VERSION = "version";

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java?rev=1296259&r1=1296258&r2=1296259&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java (original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java Fri Mar  2 15:49:18 2012
@@ -577,8 +577,8 @@ public final class CustomizationParser {
     }
 
     private boolean isValidJaxbBindingFile(XMLStreamReader reader) {
-        if (ToolConstants.JAXB_BINDINGS.equals(reader.getName())) {
-
+        if (ToolConstants.JAXB_BINDINGS.equals(reader.getName())
+            || ToolConstants.SCHEMA.equals(reader.getName())) {
             return true;
         }
         return false;

Modified: cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?rev=1296259&r1=1296258&r2=1296259&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java (original)
+++ cxf/branches/2.3.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java Fri Mar  2 15:49:18 2012
@@ -1424,4 +1424,18 @@ public class CodeGenTest extends Abstrac
 
     }
 
+    
+    @Test
+    // CXF-4135
+    public void testPassShemaFileAsJAXBBinding() throws Exception {
+        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/hello_world.wsdl"));
+        env.put(ToolConstants.CFG_BINDING, getLocation("/wsdl2java_wsdl/Invoice.xsd"));
+        processor.setContext(env);
+        processor.execute();
+        File generateFromBindingFile = new File(output, "org/apache/invoice/Invoice.java");
+        assertTrue(generateFromBindingFile.exists());
+        File seiFile = new File(output, "org/apache/cxf/w2j/hello_world_soap_http/Greeter.java");
+        assertTrue(seiFile.exists());
+    }
+    
 }