Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 18000 invoked from network); 18 Nov 2008 20:46:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Nov 2008 20:46:53 -0000 Received: (qmail 29999 invoked by uid 500); 18 Nov 2008 20:47:01 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 29989 invoked by uid 500); 18 Nov 2008 20:47:01 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 29980 invoked by uid 99); 18 Nov 2008 20:47:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Nov 2008 12:47:01 -0800 X-ASF-Spam-Status: No, hits=-1998.9 required=10.0 tests=ALL_TRUSTED,FB_GET_MEDS 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; Tue, 18 Nov 2008 20:45:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 968C8238887A; Tue, 18 Nov 2008 12:46:23 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r718710 [1/2] - in /geronimo/server/trunk: ./ assemblies/geronimo-jetty6-javaee5/ assemblies/geronimo-tomcat6-javaee5/ plugingroups/webservices-axis2/ plugingroups/webservices-axis2/src/main/history/ plugingroups/webservices-cxf/ plugingrou... Date: Tue, 18 Nov 2008 20:46:22 -0000 To: scm@geronimo.apache.org From: gawor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081118204623.968C8238887A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gawor Date: Tue Nov 18 12:46:21 2008 New Revision: 718710 URL: http://svn.apache.org/viewvc?rev=718710&view=rev Log: mostly working plugin that uses CXF tooling to generate WSDL and other artifacts for JAX-WS services (GERONIMO-4351) Added: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml (with props) geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml (with props) geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml (with props) geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/resources/ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/resources/META-INF/ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/resources/META-INF/startup-jar geronimo/server/trunk/plugins/cxf/cxf-tools/ geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml (with props) geronimo/server/trunk/plugins/cxf/cxf-tools/src/ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml (with props) geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml (with props) geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml (with props) geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat (with props) geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh (with props) geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml (with props) geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java (with props) geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java (with props) geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/Java2WSDLCommand.java (with props) geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/WSDL2JavaCommand.java (with props) geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/resources/ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/resources/gsh-cxf-tools.properties (with props) Modified: geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml geronimo/server/trunk/plugingroups/webservices-axis2/pom.xml geronimo/server/trunk/plugingroups/webservices-axis2/src/main/history/dependencies.xml geronimo/server/trunk/plugingroups/webservices-cxf/pom.xml geronimo/server/trunk/plugingroups/webservices-cxf/src/main/history/dependencies.xml geronimo/server/trunk/plugins/cxf/pom.xml geronimo/server/trunk/pom.xml Modified: geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml?rev=718710&r1=718709&r2=718710&view=diff ============================================================================== --- geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml (original) +++ geronimo/server/trunk/assemblies/geronimo-jetty6-javaee5/pom.xml Tue Nov 18 12:46:21 2008 @@ -64,6 +64,12 @@ + + + + + Modified: geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml?rev=718710&r1=718709&r2=718710&view=diff ============================================================================== --- geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml (original) +++ geronimo/server/trunk/assemblies/geronimo-tomcat6-javaee5/pom.xml Tue Nov 18 12:46:21 2008 @@ -64,6 +64,12 @@ + + + + + Modified: geronimo/server/trunk/plugingroups/webservices-axis2/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/webservices-axis2/pom.xml?rev=718710&r1=718709&r2=718710&view=diff ============================================================================== --- geronimo/server/trunk/plugingroups/webservices-axis2/pom.xml (original) +++ geronimo/server/trunk/plugingroups/webservices-axis2/pom.xml Tue Nov 18 12:46:21 2008 @@ -65,6 +65,13 @@ ${version} car + + + org.apache.geronimo.configs + cxf-tools + ${version} + car + Modified: geronimo/server/trunk/plugingroups/webservices-axis2/src/main/history/dependencies.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/webservices-axis2/src/main/history/dependencies.xml?rev=718710&r1=718709&r2=718710&view=diff ============================================================================== --- geronimo/server/trunk/plugingroups/webservices-axis2/src/main/history/dependencies.xml (original) +++ geronimo/server/trunk/plugingroups/webservices-axis2/src/main/history/dependencies.xml Tue Nov 18 12:46:21 2008 @@ -26,4 +26,9 @@ axis-deployer car + + org.apache.geronimo.configs + cxf-tools + car + Modified: geronimo/server/trunk/plugingroups/webservices-cxf/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/webservices-cxf/pom.xml?rev=718710&r1=718709&r2=718710&view=diff ============================================================================== --- geronimo/server/trunk/plugingroups/webservices-cxf/pom.xml (original) +++ geronimo/server/trunk/plugingroups/webservices-cxf/pom.xml Tue Nov 18 12:46:21 2008 @@ -65,6 +65,13 @@ ${version} car + + + org.apache.geronimo.configs + cxf-tools + ${version} + car + Modified: geronimo/server/trunk/plugingroups/webservices-cxf/src/main/history/dependencies.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugingroups/webservices-cxf/src/main/history/dependencies.xml?rev=718710&r1=718709&r2=718710&view=diff ============================================================================== --- geronimo/server/trunk/plugingroups/webservices-cxf/src/main/history/dependencies.xml (original) +++ geronimo/server/trunk/plugingroups/webservices-cxf/src/main/history/dependencies.xml Tue Nov 18 12:46:21 2008 @@ -26,4 +26,9 @@ axis-deployer car + + org.apache.geronimo.configs + cxf-tools + car + Added: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml (added) +++ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,138 @@ + + + + + + + + 4.0.0 + + + org.apache.geronimo.plugins + cxf + 2.2-SNAPSHOT + + + org.apache.geronimo.configs + cxf-jaxws-tools + Geronimo Plugins, CXF :: Tools + car + + CXF JAX-WS tools + + + + + + org.apache.geronimo.configs + jaxws-deployer + ${version} + car + + + + org.apache.geronimo.configs + spring + ${version} + car + + + + org.apache.geronimo.modules + geronimo-cxf-tools + ${version} + + + + + + + org.apache.geronimo.buildsupport + car-maven-plugin + + + + lib/endorsed + lib/ext + + + org.apache.geronimo.cxf.tools.JAXWSToolsCLI + + + + + + org.apache.geronimo.framework + geronimo-kernel + ${version} + + + org.apache.geronimo.framework + geronimo-system + ${version} + + + org.apache.geronimo.modules + geronimo-cxf-tools + ${version} + + + cglib + cglib-nodep + + + org.apache.xbean + xbean-reflect + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + org.slf4j + jcl-over-slf4j + + + log4j + log4j + + + ../lib + + + true + true + + Web Services + + + + + + + + + + + Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml (added) +++ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,134 @@ + + + + org.apache.geronimo.configs + cxf-tools + 2.2-SNAPSHOT + car + + + org.apache.geronimo.configs + jaxws-deployer + car + + + org.apache.geronimo.configs + spring + car + + + org.apache.geronimo.modules + geronimo-cxf-tools + jar + + + org.apache.cxf + cxf-rt-core + jar + + + org.apache.cxf + cxf-rt-bindings-soap + jar + + + org.apache.cxf + cxf-rt-frontend-simple + jar + + + org.apache.cxf + cxf-tools-java2ws + jar + + + org.apache.cxf + cxf-rt-databinding-jaxb + jar + + + org.apache.cxf + cxf-api + jar + + + org.apache.cxf + cxf-tools-common + jar + + + org.apache.cxf + cxf-common-utilities + jar + + + org.apache.neethi + neethi + jar + + + com.sun.xml.bind + jaxb-xjc + jar + + + org.apache.ws.commons.schema + XmlSchema + jar + + + org.apache.cxf + cxf-rt-bindings-xml + jar + + + org.apache.cxf + cxf-rt-frontend-jaxws + jar + + + org.apache.cxf + cxf-rt-ws-addr + jar + + + org.apache.velocity + velocity + jar + + + commons-collections + commons-collections + jar + + + commons-lang + commons-lang + jar + + + org.apache.cxf + cxf-common-schemas + jar + + + org.apache.cxf + cxf-tools-validator + jar + + + org.apache.cxf + cxf-tools-wsdlto-core + jar + + + org.apache.cxf + cxf-tools-wsdlto-frontend-jaxws + jar + + + org.apache.cxf + cxf-tools-wsdlto-databinding-jaxb + jar + + Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/history/dependencies.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml (added) +++ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,26 @@ + + + + + + + + + + + Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/resources/META-INF/startup-jar URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/resources/META-INF/startup-jar?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/resources/META-INF/startup-jar (added) +++ geronimo/server/trunk/plugins/cxf/cxf-jaxws-tools/src/main/resources/META-INF/startup-jar Tue Nov 18 12:46:21 2008 @@ -0,0 +1,18 @@ + +This file tells the Geronimo bootstrap where to look for its installation +directory, which is ../ from wherever the jar containing this file lives. \ No newline at end of file Added: geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml (added) +++ geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,114 @@ + + + + + + + + 4.0.0 + + + org.apache.geronimo.plugins + cxf + 2.2-SNAPSHOT + + + org.apache.geronimo.configs + cxf-tools + Geronimo Plugins, CXF :: Tools CLI + car + + CXF JAX-WS command line tools + + + + org.apache.geronimo.configs + cxf-jaxws-tools + ${version} + car + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + install-underlay + process-classes + + run + + + + + + + + + + + + + + + + + org.apache.geronimo.buildsupport + car-maven-plugin + + + true + true + + Web Services + + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + bin + compile + + directory-inline + + + ${project.build.directory} + false + + ${project.basedir}/src/main/assembly/bin.xml + + + + + + + + + Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml (added) +++ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,76 @@ + + + + + + + bin + + + + + lib + true + + org.apache.geronimo.modules:geronimo-cxf-tools + + + + + bin + cxf-tools.jar + true + + org.apache.geronimo.configs:cxf-jaxws-tools + + + + + + + + + src/main/resources/bin + bin + + * + + + *.bat + *.cmd + *.txt + *.jar + + unix + 0755 + + + + src/main/resources/bin + bin + + *.bat + *.cmd + *.txt + + dos + + + + + Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/assembly/bin.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml (added) +++ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,14 @@ + + + + org.apache.geronimo.configs + cxf-tools + 2.2-SNAPSHOT + car + + + org.apache.geronimo.configs + cxf-jaxws-tools + car + + Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/history/dependencies.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml (added) +++ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,22 @@ + + + + + + + Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/plan/plan.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat (added) +++ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat Tue Nov 18 12:46:21 2008 @@ -0,0 +1,177 @@ +@REM +@REM Licensed to the Apache Software Foundation (ASF) under one or more +@REM contributor license agreements. See the NOTICE file distributed with +@REM this work for additional information regarding copyright ownership. +@REM The ASF licenses this file to You under the Apache License, Version 2.0 +@REM (the "License"); you may not use this file except in compliance with +@REM the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. + +@REM -------------------------------------------------------------------- +@REM $Rev: 534454 $ $Date: 2007-05-02 09:39:49 -0400 (Wed, 02 May 2007) $ +@REM -------------------------------------------------------------------- + +@REM --------------------------------------------------------------------------- +@REM Deploy batch file for Geronimo +@REM +@REM You should not have to edit this file. If you wish to have +@REM environment variables set each time you run this batch file +@REM refer to the information on the setenv.bat file below. +@REM +@REM Invocation Syntax: +@REM +@REM deploy [general options] command [command options] +@REM +@REM For detailed usage information, just run deploy without +@REM arguments. +@REM +@REM Environment Variable Prequisites +@REM +@REM GERONIMO_HOME May point at your Geronimo top-level directory. +@REM If not specified, this batch file will attempt to +@REM discover it relative to the location of this file. +@REM +@REM GERONIMO_BASE (Optional) Base directory for resolving dynamic portions +@REM of a Geronimo installation. If not present, resolves to +@REM the same directory that GERONIMO_HOME points to. +@REM +@REM GERONIMO_OPTS (Optional) Java runtime options (in addition to +@REM those set in JAVA_OPTS). +@REM +@REM GERONIMO_TMPDIR (Optional) Directory path location of temporary directory +@REM the JVM should use (java.io.tmpdir). Defaults to +@REM %GERONIMO_BASE%\var\temp. +@REM +@REM JAVA_HOME Points to your Java Development Kit installation. +@REM JAVA_HOME doesn't need to be set if JRE_HOME is set. +@REM It is mandatory either JAVA_HOME or JRE_HOME are set. +@REM +@REM JRE_HOME (Optional) Points to your Java Runtime Environment +@REM Set this if you wish to run Geronimo using the JRE +@REM instead of the JDK. +@REM Defaults to JAVA_HOME if empty. +@REM It is mandatory either JAVA_HOME or JRE_HOME are set. +@REM +@REM JAVA_OPTS (Optional) Java runtime options used. +@REM Also see the GERONIMO_OPTS environment variable. +@REM +@REM Troubleshooting execution of this batch file: +@REM +@REM GERONIMO_BATCH_ECHO (Optional) Environment variable that when set to +@REM "on" results in batch commands being echoed. +@REM +@REM GERONIMO_BATCH_PAUSE (Optional) Environment variable that when set to +@REM "on" results in each batch file to pause at the +@REM end of execution +@REM +@REM GERONIMO_ENV_INFO (Optional) Environment variable that when set to +@REM "on" (the default) outputs the values of +@REM GERONIMO_HOME, GERONIMO_BASE, GERONIMO_TMPDIR, +@REM JAVA_HOME and JRE_HOME before the command is +@REM issued. Set to "off" if you do not want this +@REM information displayed. +@REM +@REM Batch files called by this batch file: +@REM +@REM %GERONIMO_HOME%\bin\setenv.bat +@REM (Optional) This batch file is called if it is present. +@REM Its contents may set one or more of the above environment +@REM variables. It is preferable (to simplify migration to +@REM future Geronimo releases) to set environment variables +@REM in this file rather than modifying Geronimo's batch files. +@REM +@REM %GERONIMO_HOME%\bin\setjavaenv.bat +@REM This batch file is called to set environment variables +@REM relating to the java or jdb exe file to call. +@REM This file should not need to be modified. +@REM +@REM Exit Codes: +@REM +@REM 0 - Success +@REM 1 - Error +@REM --------------------------------------------------------------------------- +@if "%GERONIMO_BATCH_ECHO%" == "on" echo on +@if not "%GERONIMO_BATCH_ECHO%" == "on" echo off + +if "%OS%" == "Windows_NT" goto okOsCheck +echo Cannot process Geronimo command - you are running an unsupported operating system. +set ERRORLEVEL=1 +goto end + +:okOsCheck +@setlocal enableextensions +@set ERRORLEVEL=0 + +if not "%GERONIMO_HOME%" == "" goto resolveHome +@REM %~dp0 is expanded pathname of the current script +set GERONIMO_HOME=%~dp0.. + +@REM resolve .. and remove any trailing slashes +:resolveHome +set CURRENT_DIR=%cd% +cd /d %GERONIMO_HOME% +set GERONIMO_HOME=%cd% +cd /d %CURRENT_DIR% + +:gotHome +if exist "%GERONIMO_HOME%\bin\deploy.bat" goto okHome +echo The GERONIMO_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +set ERRORLEVEL=1 +goto end +:okHome + +@REM Get standard environment variables +@REM Users can optionally create this file to set environment variables. +if exist "%GERONIMO_HOME%\bin\setenv.bat" call "%GERONIMO_HOME%\bin\setenv.bat" +if not %errorlevel% == 0 goto end + +@REM Get standard Java environment variables (based upon Tomcat's setclasspath.bat +@REM but renamed since Deployer's classpath is set in the JAR manifest) +if exist "%GERONIMO_HOME%\bin\setjavaenv.bat" goto okSetJavaEnv +echo Cannot find %GERONIMO_HOME%\bin\setjavaenv.bat +echo This file is needed to run this program +set ERRORLEVEL=1 +goto end +:okSetJavaEnv +set BASEDIR=%GERONIMO_HOME% +call "%GERONIMO_HOME%\bin\setJavaEnv.bat" +if not %errorlevel% == 0 goto end + +if not "%GERONIMO_BASE%" == "" goto gotBase +set GERONIMO_BASE=%GERONIMO_HOME% +:gotBase + +if not "%GERONIMO_TMPDIR%" == "" goto gotTmpdir +set GERONIMO_TMPDIR=var\temp +:gotTmpdir + +@REM ----- Execute The Requested Command --------------------------------------- +@if "%GERONIMO_ENV_INFO%" == "off" goto skipEnvInfo +echo Using GERONIMO_BASE: %GERONIMO_BASE% +echo Using GERONIMO_HOME: %GERONIMO_HOME% +echo Using GERONIMO_TMPDIR: %GERONIMO_TMPDIR% +if "%_REQUIRE_JDK%" == "1" echo Using JAVA_HOME: %JAVA_HOME% +if "%_REQUIRE_JDK%" == "0" echo Using JRE_HOME: %JRE_HOME% + +:skipEnvInfo + +@REM Capture any passed in arguments +set CMD_LINE_ARGS=%* +set _JARFILE="%GERONIMO_HOME%"\bin\cxf-tools.jar + +%_RUNJAVA% %JAVA_OPTS% %GERONIMO_OPTS% -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %CMD_LINE_ARGS% +goto end + +:end +echo. +@REM pause the batch file if GERONIMO_BATCH_PAUSE is set to 'on' +if "%GERONIMO_BATCH_PAUSE%" == "on" pause +@endlocal Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat ------------------------------------------------------------------------------ svn:eol-style = CRLF Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat ------------------------------------------------------------------------------ svn:executable = * Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.bat ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh (added) +++ geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh Tue Nov 18 12:46:21 2008 @@ -0,0 +1,198 @@ +#!/bin/sh +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# -------------------------------------------------------------------- +# $Rev$ $Date$ +# -------------------------------------------------------------------- + +# ----------------------------------------------------------------------------- +# Deploy Script for the Geronimo Server +# +# You should not have to edit this file. If you wish to have environment +# variables set each time you run this script refer to the information +# on the setenv.sh script that is called by this script below. +# +# Invocation Syntax: +# +# deploy.sh [general options] command [command options] +# +# For detailed command usage information, just run deploy.sh without any +# arguments. +# +# Environment Variable Prequisites: +# +# GERONIMO_HOME (Optional) May point at your Geronimo top-level directory. +# If not specified, it will default to the parent directory +# of the location of this script. +# +# GERONIMO_BASE (Optional) Base directory for resolving dynamic portions +# of a Geronimo installation. If not present, resolves to +# the same directory that GERONIMO_HOME points to. +# +# GERONIMO_OPTS (Optional) Java runtime options. +# +# GERONIMO_TMPDIR (Optional) Directory path location of temporary directory +# the JVM should use (java.io.tmpdir). +# Defaults to $GERONIMO_BASE/var/temp. +# +# JAVA_HOME Points to your Java Development Kit installation. +# JAVA_HOME doesn't need to be set if JRE_HOME is set. +# It is mandatory either JAVA_HOME or JRE_HOME are set. +# +# JRE_HOME Points to your Java Runtime Environment installation. +# Set this if you wish to run Geronimo using the JRE +# instead of the JDK. Defaults to JAVA_HOME if empty. +# It is mandatory either JAVA_HOME or JRE_HOME are set. +# +# JAVA_OPTS (Optional) Java runtime options. +# +# Troubleshooting execution of this script file: +# +# GERONIMO_ENV_INFO (Optional) Environment variable that when set to +# "on" (the default) outputs the +# values of GERONIMO_HOME, GERONIMO_BASE, +# GERONIMO_TMPDIR, JAVA_HOME, JRE_HOME before +# the command is issued. Set to "off" if you +# do want to see this information. +# +# Scripts called by this script: +# +# $GERONIMO_HOME/bin/setenv.sh +# (Optional) This script file is called if it is present. +# Its contents may set one or more of the above environment +# variables. It is preferable (to simplify migration to +# future Geronimo releases) to set environment variables +# in this file rather than modifying Geronimo's script files. +# +# $GERONIMO_HOME/bin/setjavaenv.sh +# This batch file is called to set environment variables +# relating to the java or jdb executable to invoke. +# This file should not need to be modified. +# +# Exit Codes: +# +# 0 - Success +# 1 - Error +# ----------------------------------------------------------------------------- + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +os400=false +case "`uname`" in +CYGWIN*) cygwin=true;; +OS400*) os400=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +# Get standard environment variables +PRGDIR=`dirname "$PRG"` + +# Only set GERONIMO_HOME if not already set +[ -z "$GERONIMO_HOME" ] && GERONIMO_HOME=`cd "$PRGDIR/.." ; pwd` + +if [ -r "$GERONIMO_HOME"/bin/setenv.sh ]; then + . "$GERONIMO_HOME"/bin/setenv.sh +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"` + [ -n "$GERONIMO_HOME" ] && GERONIMO_HOME=`cygpath --unix "$GERONIMO_HOME"` + [ -n "$GERONIMO_BASE" ] && GERONIMO_BASE=`cygpath --unix "$GERONIMO_BASE"` +fi + +# For OS400 +if $os400; then + # Set job priority to standard for interactive (interactive - 6) by using + # the interactive priority - 6, the helper threads that respond to requests + # will be running at the same priority as interactive jobs. + COMMAND='chgjob job('$JOBNAME') runpty(6)' + system $COMMAND + + # Enable multi threading + export QIBM_MULTI_THREADED=Y +fi + +# Get standard Java environment variables +# (based upon Tomcat's setclasspath.sh but renamed since Geronimo's classpath +# is set in the JAR manifest) +if $os400; then + # -r will Only work on the os400 if the files are: + # 1. owned by the user + # 2. owned by the PRIMARY group of the user + # this will not work if the user belongs in secondary groups + BASEDIR="$GERONIMO_HOME" + . "$GERONIMO_HOME"/bin/setjavaenv.sh +else + if [ -r "$GERONIMO_HOME"/bin/setjavaenv.sh ]; then + BASEDIR="$GERONIMO_HOME" + . "$GERONIMO_HOME"/bin/setjavaenv.sh + else + echo "Cannot find $GERONIMO_HOME/bin/setjavaenv.sh" + echo "This file is needed to run this program" + exit 1 + fi +fi + +if [ -z "$GERONIMO_BASE" ] ; then + GERONIMO_BASE="$GERONIMO_HOME" +fi + +if [ -z "$GERONIMO_TMPDIR" ] ; then + # Define the java.io.tmpdir to use for Geronimo + GERONIMO_TMPDIR=var/temp +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` + JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"` + GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"` + GERONIMO_BASE=`cygpath --absolute --windows "$GERONIMO_BASE"` + GERONIMO_TMPDIR=`cygpath --absolute --windows "$GERONIMO_TMPDIR"` +fi + +# ----- Execute The Requested Command ----------------------------------------- +if [ "$GERONIMO_ENV_INFO" != "off" ] ; then + echo "Using GERONIMO_BASE: $GERONIMO_BASE" + echo "Using GERONIMO_HOME: $GERONIMO_HOME" + echo "Using GERONIMO_TMPDIR: $GERONIMO_TMPDIR" + if [ "$1" = "debug" ] ; then + echo "Using JAVA_HOME: $JAVA_HOME" + echo "Using JDB_SRCPATH: $JDB_SRCPATH" + else + echo "Using JRE_HOME: $JRE_HOME" + fi +fi + +exec "$_RUNJAVA" $JAVA_OPTS $GERONIMO_OPTS \ + -Dorg.apache.geronimo.base.dir="$GERONIMO_BASE" \ + -Djava.io.tmpdir="$GERONIMO_TMPDIR" \ + -jar "$GERONIMO_HOME"/bin/cxf-tools.jar "$@" Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh ------------------------------------------------------------------------------ svn:executable = * Propchange: geronimo/server/trunk/plugins/cxf/cxf-tools/src/main/resources/bin/cxf-tools.sh ------------------------------------------------------------------------------ svn:keywords = Date Revision Added: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml (added) +++ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml Tue Nov 18 12:46:21 2008 @@ -0,0 +1,83 @@ + + + + + + + + 4.0.0 + + + org.apache.geronimo.plugins + cxf + 2.2-SNAPSHOT + + + org.apache.geronimo.modules + geronimo-cxf-tools + Geronimo Plugins, CXF :: Tools Core + + + + org.apache.geronimo.modules + geronimo-jaxws-builder + ${version} + + + + org.apache.geronimo.gshell + gshell-command-api + provided + + + + org.apache.cxf + cxf-tools-java2ws + + + + org.apache.cxf + cxf-rt-frontend-jaxws + + + + + + + ${project.basedir}/src/main/resources + true + + + + + + + org.apache.geronimo.gshell + gshell-maven-plugin + + + + descriptor + + + + + + + + Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java (added) +++ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java Tue Nov 18 12:46:21 2008 @@ -0,0 +1,229 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.geronimo.cxf.tools; + +import java.io.File; +import java.io.IOException; +import java.net.URL; +import java.util.ArrayList; +import java.util.LinkedHashSet; +import java.util.List; + +import javax.xml.namespace.QName; + +import org.apache.geronimo.common.DeploymentException; +import org.apache.geronimo.deployment.DeploymentContext; +import org.apache.geronimo.gbean.AbstractName; +import org.apache.geronimo.gbean.GBeanInfo; +import org.apache.geronimo.gbean.GBeanInfoBuilder; +import org.apache.geronimo.j2ee.deployment.Module; +import org.apache.geronimo.jaxws.wsdl.WsdlGenerator; +import org.apache.geronimo.jaxws.wsdl.WsdlGeneratorOptions; +import org.apache.geronimo.jaxws.wsdl.WsdlGeneratorUtils; + +/** + * Generate WSDL and other JAX-WS artifacts using CXF tools. + */ +public class CXFWsdlGenerator implements WsdlGenerator { + + private ClassLoader classLoader; + + public CXFWsdlGenerator(AbstractName abstractName, ClassLoader classLoader) { + this.classLoader = classLoader; + } + + public String generateWsdl(Module module, + String serviceClass, + DeploymentContext context, + WsdlGeneratorOptions options) throws DeploymentException { + File moduleBase = module.getEarContext().getInPlaceConfigurationDir(); + if (moduleBase == null) { + moduleBase = module.getEarContext().getBaseDir(); + } + File moduleBaseDir = (moduleBase.isFile()) ? moduleBase.getParentFile() : moduleBase; + File baseDir; + + try { + baseDir = WsdlGeneratorUtils.createTempDirectory(moduleBaseDir); + } catch (IOException e) { + throw new DeploymentException(e); + } + + LinkedHashSet jars = new LinkedHashSet(); + WsdlGeneratorUtils.getClassLoaderClasspath(this.classLoader, jars); + try { + WsdlGeneratorUtils.getModuleClasspath(module, context, jars); + } catch (Exception e) { + throw new DeploymentException("WSDL generation failed: unable to determine module classpath", e); + } + String classpath = WsdlGeneratorUtils.buildClasspath(jars); + + List cmd = buildArguments(serviceClass, classpath, baseDir, options); + boolean result; + try { + result = WsdlGeneratorUtils.execJava(cmd, options.getForkTimeout()); + } catch (Exception e) { + throw new DeploymentException("WSDL generation failed", e); + } + + if (result) { + //check to see if the file is created. + String serviceName = getLocalPart(options.getWsdlService()); + File wsdlFile = WsdlGeneratorUtils.findWsdlFile(baseDir, serviceName); + if (wsdlFile == null) { + throw new DeploymentException("Unable to find the service wsdl file"); + } + if (options.getAddToClassPath()) { + try { + context.getConfiguration().addToClassPath(baseDir.getName()); + } catch (IOException e) { + throw new DeploymentException("Failed to update module classpath"); + } + } + return WsdlGeneratorUtils.getRelativeNameOrURL(moduleBase, wsdlFile); + } else { + throw new DeploymentException("WSDL generation failed"); + } + } + + private List buildArguments(String sei, String classpath, File moduleBaseDir, WsdlGeneratorOptions options) { + List arguments = new ArrayList(); + + // java args + arguments.add("-classpath"); + arguments.add(classpath); + arguments.add("-Dorg.apache.cxf.nofastinfoset=true"); + arguments.add("org.apache.cxf.tools.java2ws.JavaToWS"); + + // cmd args + arguments.add("-d"); + arguments.add(moduleBaseDir.getAbsolutePath()); + arguments.add("-classdir"); + arguments.add(moduleBaseDir.getAbsolutePath()); + arguments.add("-server"); + arguments.add("-wsdl"); + arguments.add("-wrapperbean"); + arguments.add("-frontend"); + arguments.add("jaxws"); + + String serviceName = getLocalPart(options.getWsdlService()); + if (serviceName != null) { + arguments.add("-servicename"); + arguments.add(serviceName); + } + + String portName = getLocalPart(options.getWsdlPort()); + if (portName != null) { + arguments.add("-port"); + arguments.add(portName); + } + + String tns = getNamespace(options.getWsdlService(), options.getWsdlPort()); + if (tns != null) { + arguments.add("-t"); + arguments.add(tns); + } + + arguments.add(sei); + + return arguments; + } + + private static String getLocalPart(QName name) { + return (name == null) ? null : name.getLocalPart(); + } + + private static String getNamespace(QName service, QName port) { + String ns = null; + if (service != null) { + ns = service.getNamespaceURI(); + if (ns.length() > 0) { + return ns; + } + } + if (port != null) { + ns = port.getNamespaceURI(); + if (ns.length() > 0) { + return ns; + } + } + return ns; + } + + /* + private void invokeWsgen() { + ToolContext env = new ToolContext(); + + env.put(ToolConstants.CFG_CLASSNAME, serviceClass); + env.put(ToolConstants.CFG_OUTPUTDIR, baseDir.getAbsolutePath()); + + StringBuilder classPath = new StringBuilder(); + WsdlGeneratorUtils.getModuleClasspath(module, context, classPath); + + env.put(ToolConstants.CFG_CLASSPATH, cp + classPath.toString()); + + String serviceName = getLocalPart(options.getWsdlService()); + if (serviceName != null) { + env.put(ToolConstants.CFG_SERVICENAME, serviceName); + } + + String portName = getLocalPart(options.getWsdlPort()); + if (portName != null) { + env.put(ToolConstants.CFG_PORT, portName); + } + + String tns = getNamespace(options.getWsdlService(), options.getWsdlPort()); + if (tns != null) { + env.put(ToolConstants.CFG_TNS, tns); + } + + env.put(ToolConstants.CFG_WRAPPERBEAN, Boolean.TRUE); + env.put(ToolConstants.CFG_WSDL, Boolean.TRUE); + + ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); + + Processor processor = new JavaToWSDLProcessor(); + processor.setEnvironment(env); + Thread.currentThread().setContextClassLoader(this.classLoader); + try { + processor.process(); + } catch (ToolException e) { + throw new DeploymentException("WSDL generation failed", e); + } finally { + Thread.currentThread().setContextClassLoader(oldClassLoader); + } + } + */ + + public static final GBeanInfo GBEAN_INFO; + + static { + GBeanInfoBuilder infoBuilder = GBeanInfoBuilder.createStatic(CXFWsdlGenerator.class, GBeanInfoBuilder.DEFAULT_J2EE_TYPE); + infoBuilder.addInterface(WsdlGenerator.class); + infoBuilder.addAttribute("classLoader", ClassLoader.class, false); + infoBuilder.addAttribute("abstractName", AbstractName.class, false); + infoBuilder.setConstructor(new String [] {"abstractName", "classLoader"}); + + GBEAN_INFO = infoBuilder.getBeanInfo(); + } + + public static GBeanInfo getGBeanInfo() { + return GBEAN_INFO; + } + +} Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/CXFWsdlGenerator.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java (added) +++ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java Tue Nov 18 12:46:21 2008 @@ -0,0 +1,232 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.geronimo.cxf.tools; + +import java.io.File; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.JarURLConnection; +import java.net.URI; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.Collection; +import java.util.Collections; +import java.util.LinkedHashSet; +import java.util.Set; + +import org.apache.geronimo.kernel.config.Configuration; +import org.apache.geronimo.kernel.config.MultiParentClassLoader; +import org.apache.geronimo.kernel.config.SimpleConfigurationManager; +import org.apache.geronimo.kernel.repository.Artifact; +import org.apache.geronimo.kernel.repository.ArtifactResolver; +import org.apache.geronimo.kernel.repository.DefaultArtifactManager; +import org.apache.geronimo.kernel.repository.DefaultArtifactResolver; +import org.apache.geronimo.kernel.repository.Maven2Repository; +import org.apache.geronimo.system.configuration.RepositoryConfigurationStore; + +public class JAXWSToolsCLI { + + private static final String CONFIG_ID = "org.apache.geronimo.configs/cxf-tools//car"; + + enum Command { JAVA2WSDL, WSDL2JAVA }; + + private static final String USAGE_MSG = + "Usage: jaxws-tools \n\n" + + "where is:\n" + + " java2wsdl - generate portable artifacts from class\n" + + " wsdl2java - generate portable artifacts from WSDL\n"; + + public static void main(String[] args) throws Throwable { + if (args.length == 0) { + System.err.println(USAGE_MSG); + System.exit(1); + } + + Command cmd = null; + if (args[0].equalsIgnoreCase("java2wsdl")) { + cmd = Command.JAVA2WSDL; + } else if (args[0].equalsIgnoreCase("wsdl2java")) { + cmd = Command.WSDL2JAVA; + } else { + System.err.println("Error: Unsupported toolName [" + args[0] + "]."); + System.err.println(); + System.err.println(USAGE_MSG); + System.exit(1); + } + + String geroninoHome = getGeronimoHome(); + String[] arguments = getCmdArguments(args); + boolean rs = run(cmd, geroninoHome, arguments); + System.exit( (rs) ? 0 : 1 ); + } + + static boolean run(Command cmd, String geronimoHome, String[] args) throws Exception { + String repository = System.getProperty("Xorg.apache.geronimo.repository.boot.path", "repository"); + Maven2Repository bootRepository = new Maven2Repository(new File(geronimoHome, repository)); + Collection repositories = Collections.singleton(bootRepository); + ArtifactResolver artifactResolver = new DefaultArtifactResolver(new DefaultArtifactManager(), bootRepository); + RepositoryConfigurationStore repositoryStore = new RepositoryConfigurationStore(bootRepository); + Collection repositoryStores = Collections.singleton(repositoryStore); + SimpleConfigurationManager manager = new SimpleConfigurationManager(repositoryStores, artifactResolver, repositories); + + Artifact id = Artifact.create(CONFIG_ID); + id = artifactResolver.queryArtifact(id); + manager.loadConfiguration(id); + + Configuration config = manager.getConfiguration(id); + + // set context classloader + ClassLoader classLoader = config.getConfigurationClassLoader(); + ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); + Thread.currentThread().setContextClassLoader(classLoader); + + // set "java.class.path" system property + String classPath = getClasspath(classLoader); + String oldClassPath = System.getProperty("java.class.path"); + System.setProperty("java.class.path", classPath); + + try { + if (cmd.equals(Command.JAVA2WSDL)) { + invokeJava2WSDL(classLoader, args); + } else if (cmd.equals(Command.WSDL2JAVA)) { + invokeWSDL2Java(classLoader, args); + } else { + throw new IllegalArgumentException("Invalid command: " + cmd); + } + } catch (InvocationTargetException e) { + Throwable exception = e.getTargetException(); + if (exception instanceof Exception) { + throw (Exception)exception; + } else { + throw e; + } + } finally { + // restore "java.class.path" system property + System.setProperty("java.class.path", oldClassPath); + // restore context classloader + Thread.currentThread().setContextClassLoader(oldClassLoader); + } + + return true; + } + + private static void invokeJava2WSDL(ClassLoader classLoader, String [] args) throws Exception { + Class clazz = classLoader.loadClass("org.apache.cxf.tools.java2ws.JavaToWS"); + Method method = clazz.getMethod("main", new Class[] {String[].class}); + method.invoke(null, new Object [] {args}); + } + + private static void invokeWSDL2Java(ClassLoader classLoader, String [] args) throws Exception { + Class clazz = classLoader.loadClass("org.apache.cxf.tools.wsdlto.WSDLToJava"); + Method method = clazz.getMethod("main", new Class[] {String[].class}); + method.invoke(null, new Object [] {args}); + } + + private static String[] getCmdArguments(String[] args) { + String [] cmdArgs = new String[args.length - 1]; + System.arraycopy(args, 1, cmdArgs, 0, args.length - 1); + return cmdArgs; + } + + private static String getGeronimoHome() { + String geronimoHome = System.getProperty("org.apache.geronimo.home.dir"); + if (geronimoHome != null) { + return geronimoHome; + } + + // guess from the location of the jar + URL url = JAXWSToolsCLI.class.getClassLoader().getResource("META-INF/startup-jar"); + if (url != null) { + try { + JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); + url = jarConnection.getJarFileURL(); + + URI baseURI = new URI(url.toString()).resolve(".."); + File dir = new File(baseURI); + return dir.getAbsolutePath(); + } catch (Exception ignored) { + // ignore + } + } + + // cannot determine the directory, return parent directory + return ".."; + } + + public static Set getClassLoaderClasspath(ClassLoader loader) { + LinkedHashSet jars = new LinkedHashSet(); + getClassLoaderClasspath(loader, jars); + return jars; + } + + public static void getClassLoaderClasspath(ClassLoader loader, LinkedHashSet classpath) { + if (loader == null || loader == ClassLoader.getSystemClassLoader()) { + return; + } else if (loader instanceof MultiParentClassLoader) { + MultiParentClassLoader cl = (MultiParentClassLoader)loader; + for (ClassLoader parent : cl.getParents()) { + getClassLoaderClasspath(parent, classpath); + } + for (URL u : cl.getURLs()) { + classpath.add(u); + } + } else if (loader instanceof URLClassLoader) { + URLClassLoader cl = (URLClassLoader)loader; + getClassLoaderClasspath(cl.getParent(), classpath); + for (URL u : cl.getURLs()) { + classpath.add(u); + } + } else { + getClassLoaderClasspath(loader.getParent(), classpath); + } + } + + public static String buildClasspath(Set files) { + StringBuilder classpath = new StringBuilder(); + buildClasspath(files, classpath); + return classpath.toString(); + } + + public static void buildClasspath(Set files, StringBuilder classpath) { + for (URL url: files) { + if ("file".equals(url.getProtocol())) { + String path = toFileName(url); + classpath.append(path); + classpath.append(File.pathSeparator); + } + } + } + + public static String getClasspath(ClassLoader loader) { + Set jars = getClassLoaderClasspath(loader); + return buildClasspath(jars); + } + + public static String toFileName(URL url) { + String filename = url.getFile().replace('/', File.separatorChar); + int pos =0; + while ((pos = filename.indexOf('%', pos)) >= 0) { + if (pos + 2 < filename.length()) { + String hexStr = filename.substring(pos + 1, pos + 3); + char ch = (char) Integer.parseInt(hexStr, 16); + filename = filename.substring(0, pos) + ch + filename.substring(pos + 3); + } + } + return filename; + } +} Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/JAXWSToolsCLI.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/Java2WSDLCommand.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/Java2WSDLCommand.java?rev=718710&view=auto ============================================================================== --- geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/Java2WSDLCommand.java (added) +++ geronimo/server/trunk/plugins/cxf/geronimo-cxf-tools/src/main/java/org/apache/geronimo/cxf/tools/Java2WSDLCommand.java Tue Nov 18 12:46:21 2008 @@ -0,0 +1,60 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.geronimo.cxf.tools; + +import org.apache.geronimo.gshell.command.CommandContext; +import org.apache.geronimo.gshell.command.CommandSupport; +import org.apache.geronimo.gshell.command.annotation.CommandComponent; +import org.apache.geronimo.gshell.command.annotation.Requirement; +import org.apache.geronimo.gshell.shell.ShellInfo; + +/** + * GShell command for java2wsdl tool. + */ +@CommandComponent(id="geronimo-cxf-tools:java2wsdl", description="Generate JAX-WS artifacts from class") +public class Java2WSDLCommand extends CommandSupport { + + @Requirement + ShellInfo shellInfo; + + @Override + public Object execute(final CommandContext context, final Object... args) throws Exception { + init(context); + + String[] arguments = toString(args); + return JAXWSToolsCLI.run(JAXWSToolsCLI.Command.JAVA2WSDL, + shellInfo.getHomeDir().getAbsolutePath(), + arguments); + } + + @Override + protected Object doExecute() throws Exception { + return null; + } + + private static String[] toString(Object [] args) { + String [] a = new String[args.length]; + for (int i=0; i