Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F3E09806 for ; Fri, 24 Feb 2012 04:07:18 +0000 (UTC) Received: (qmail 3750 invoked by uid 500); 24 Feb 2012 04:07:17 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 3638 invoked by uid 500); 24 Feb 2012 04:07:15 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 3600 invoked by uid 99); 24 Feb 2012 04:07:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 04:07:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 04:07:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8F48823888E4; Fri, 24 Feb 2012 04:06:50 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@cxf.apache.org From: ema@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120224040650.8F48823888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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()); + } + }