cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1293072 - in /cxf/branches/2.5.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...
Date Fri, 24 Feb 2012 04:06:50 GMT
Author: ema
Date: Fri Feb 24 04:06:49 2012
New Revision: 1293072

URL: http://svn.apache.org/viewvc?rev=1293072&view=rev
Log:
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.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
    cxf/branches/2.5.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
    cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Feb 24 04:06:49 2012
@@ -1 +1 @@
-/cxf/trunk:1291943,1292763,1292792,1292839
+/cxf/trunk:1291943,1292763,1292792,1292839,1293064

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

Modified: cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java?rev=1293072&r1=1293071&r2=1293072&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
(original)
+++ cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/tools/common/ToolConstants.java
Fri Feb 24 04:06:49 2012
@@ -167,6 +167,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.5.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.5.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java?rev=1293072&r1=1293071&r2=1293072&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
(original)
+++ cxf/branches/2.5.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
Fri Feb 24 04:06:49 2012
@@ -572,8 +572,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.5.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.5.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java?rev=1293072&r1=1293071&r2=1293072&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
(original)
+++ cxf/branches/2.5.x-fixes/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
Fri Feb 24 04:06:49 2012
@@ -1625,4 +1625,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());
+    }
+    
 }



Mime
View raw message