[jbossws-commits] JBossWS SVN: r2332 - in branches/jbossws-1.2.0: build/ant-import and 13 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Sat Feb 10 01:04:24 EST 2007


Author: jason.greene at jboss.com
Date: 2007-02-10 01:04:23 -0500 (Sat, 10 Feb 2007)
New Revision: 2332

Added:
   branches/jbossws-1.2.0/build/etc/wsconsume
   branches/jbossws-1.2.0/build/etc/wsconsume.bat
   branches/jbossws-1.2.0/build/etc/wsprovide
   branches/jbossws-1.2.0/build/etc/wsprovide.bat
   branches/jbossws-1.2.0/build/etc/wstools-log4j.xml
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java
   branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/
   branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
Removed:
   branches/jbossws-1.2.0/build/etc/wsgen.sh
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java
Modified:
   branches/jbossws-1.2.0/build/ant-import/build-release.xml
   branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml
   branches/jbossws-1.2.0/build/ant.properties.example
   branches/jbossws-1.2.0/build/etc/default.mf
   branches/jbossws-1.2.0/build/etc/wspublish.sh
   branches/jbossws-1.2.0/build/etc/wstools.bat
   branches/jbossws-1.2.0/build/etc/wstools.sh
   branches/jbossws-1.2.0/build/version.properties
   branches/jbossws-1.2.0/jbossws-core/build.xml
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
   branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
Log:
Backport tools


Modified: branches/jbossws-1.2.0/build/ant-import/build-release.xml
===================================================================
--- branches/jbossws-1.2.0/build/ant-import/build-release.xml	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/ant-import/build-release.xml	2007-02-10 06:04:23 UTC (rev 2332)
@@ -151,7 +151,10 @@
       <fileset dir="${etc.dir}">
         <include name="wstools.bat"/>
         <include name="wstools.sh"/>
-        <include name="wsgen.sh"/>
+        <include name="wsprovide.bat"/>
+        <include name="wsprovide"/>
+        <include name="wsconsume.bat"/>
+        <include name="wsconsume"/>
       </fileset>
     </copy>
 

Modified: branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml
===================================================================
--- branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/ant-import/build-thirdparty.xml	2007-02-10 06:04:23 UTC (rev 2332)
@@ -72,6 +72,7 @@
     <get src="${jboss.repository}/xmlunit-xmlunit/${xmlunit}/lib/xmlunit1.0.jar" dest="${thirdparty.dir}/xmlunit1.0.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/wscommons-policy/${wscommons-policy}/lib/policy.jar" dest="${thirdparty.dir}/policy.jar" usetimestamp="true" verbose="true"/>
     <get src="${jboss.repository}/woodstox/${woodstox}/lib/wstx.jar" dest="${thirdparty.dir}/wstx.jar" usetimestamp="true" verbose="true"/>
+    <get src="${jboss.repository}/jboss/jbossws-wsconsume-impl/${jbossws-wsconsume-impl}/lib/jbossws-wsconsume-impl.jar" dest="${thirdparty.dir}/jbossws-wsconsume-impl.jar" usetimestamp="true" verbose="true"/>
 
     <mkdir dir="${thirdparty.dir}/jbpm-bpel"/>
     <unzip dest="${thirdparty.dir}/jbpm-bpel" src="${thirdparty.dir}/jbpm-bpel.sar"/>

Modified: branches/jbossws-1.2.0/build/ant.properties.example
===================================================================
--- branches/jbossws-1.2.0/build/ant.properties.example	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/ant.properties.example	2007-02-10 06:04:23 UTC (rev 2332)
@@ -19,6 +19,12 @@
 tomcat.manager.username=manager
 tomcat.manager.password=manager
 
+# Required JAX-WS Home
+# The testsuite requires the RI tools to generate the artifacts
+# Use the RI codebase from java.net: https://jax-ws.dev.java.net/jax-ws-20-fcs/ 
+# 
+ri.home=/usr/java/jaxws-ri
+
 # Hudson QA Environment
 hudson.root=/home/tdiesler/workspace
 hudson.port=8180
@@ -57,3 +63,4 @@
 javac.deprecation=yes
 javac.fail.onerror=yes
 javac.verbose=no
+


Property changes on: branches/jbossws-1.2.0/build/etc/default.mf
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: branches/jbossws-1.2.0/build/etc/wsconsume (from rev 2328, trunk/build/etc/wsconsume)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsconsume	                        (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsconsume	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# $Id: wsgen.sh 2158 2007-01-27 06:20:59Z jason.greene at jboss.com $
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+case "`uname`" in
+    CYGWIN*)
+        cygwin=true
+        ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+    [ -n "$JBOSS_HOME" ] &&
+        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
+    [ -n "$JAVA_HOME" ] &&
+        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Setup JBOSS_HOME
+if [ "x$JBOSS_HOME" = "x" ]; then
+    # get the full path (without any relative bits)
+    JBOSS_HOME=`cd $DIRNAME/..; pwd`
+fi
+export JBOSS_HOME
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
+	JAVA="$JAVA_HOME/bin/java"
+    else
+	JAVA="java"
+    fi
+fi
+
+#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
+
+# Setup JBoss sepecific properties
+JAVA_OPTS="$JAVA_OPTS"
+
+# Setup the java endorsed dirs
+JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
+
+# Setup the wstools classpath
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JAVA_HOME/lib/tools.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/wstx.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-wsconsume-impl.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/activation.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jaxb-xjc.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-jaxws.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-jaxrpc.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
+WSCONSUME_CLASSPATH="$WSCONSUME_CLASSPATH:$JBOSS_HOME/client/mail.jar"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+    WSCONSUME_CLASSPATH=`cygpath --path --windows "$WSCONSUME_CLASSPATH"`
+    JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
+fi
+
+# Execute the JVM
+"$JAVA" $JAVA_OPTS \
+   -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+   -Dlog4j.configuration=wstools-log4j.xml \
+   -classpath "$WSCONSUME_CLASSPATH" \
+   org.jboss.ws.tools.jaxws.command.wsconsume "$@"

Copied: branches/jbossws-1.2.0/build/etc/wsconsume.bat (from rev 2328, trunk/build/etc/wsconsume.bat)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsconsume.bat	                        (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsconsume.bat	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,47 @@
+ at echo off
+
+rem $Id: wsgen.bat 2158 2007-01-27 06:20:59Z jason.greene at jboss.com $
+
+ at if not "%ECHO%" == ""  echo %ECHO%
+ at if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.\
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+set PROGNAME=run.bat
+if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
+
+rem Read all command line arguments
+
+REM
+REM The %ARGS% env variable commented out in favor of using %* to include
+REM all args in java command line. See bug #840239. [jpl]
+REM
+REM set ARGS=
+REM :loop
+REM if [%1] == [] goto endloop
+REM         set ARGS=%ARGS% %1
+REM         shift
+REM         goto loop
+REM :endloop
+
+set JAVA=%JAVA_HOME%\bin\java
+set JBOSS_HOME=%DIRNAME%\..
+rem Setup the java endorsed dirs
+set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
+
+rem Setup the wstools classpath
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jaxb-xjc.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-wsimport-impl.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSCONSUME_CLASSPATH=%WSCONSUME_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
+
+rem Execute the JVM
+"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSCONSUME_CLASSPATH%" org.jboss.ws.tools.jaxws.command.wsconsume %*

Deleted: branches/jbossws-1.2.0/build/etc/wsgen.sh
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsgen.sh	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wsgen.sh	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,92 +0,0 @@
-#!/bin/sh
-
-# $Id: wstools.sh 1683 2006-12-21 12:40:22Z thomas.diesler at jboss.com $
-
-DIRNAME=`dirname $0`
-PROGNAME=`basename $0`
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false;
-case "`uname`" in
-    CYGWIN*)
-        cygwin=true
-        ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
-    [ -n "$JBOSS_HOME" ] &&
-        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
-    [ -n "$JAVA_HOME" ] &&
-        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
-
-# Setup JBOSS_HOME
-if [ "x$JBOSS_HOME" = "x" ]; then
-    # get the full path (without any relative bits)
-    JBOSS_HOME=`cd $DIRNAME/..; pwd`
-fi
-export JBOSS_HOME
-
-# Setup the JVM
-if [ "x$JAVA" = "x" ]; then
-    if [ "x$JAVA_HOME" != "x" ]; then
-	JAVA="$JAVA_HOME/bin/java"
-    else
-	JAVA="java"
-    fi
-fi
-
-#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
-#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
-
-# Setup JBoss sepecific properties
-JAVA_OPTS="$JAVA_OPTS"
-
-# Setup the java endorsed dirs
-JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
-
-# Setup the wstools classpath
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/activation.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossretro-rt.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jboss-backport-concurrent.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossws14-client.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
-WSGEN_CLASSPATH="$WSGEN_CLASSPATH:$JBOSS_HOME/client/mail.jar"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
-    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
-    WSGEN_CLASSPATH=`cygpath --path --windows "$WSGEN_CLASSPATH"`
-    JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
-fi
-
-# Display our environment
-# echo "========================================================================="
-# echo ""
-# echo "  WSTools Environment"
-# echo ""
-# echo "  JBOSS_HOME: $JBOSS_HOME"
-# echo ""
-# echo "  JAVA: $JAVA"
-# echo ""
-# echo "  JAVA_OPTS: $JAVA_OPTS"
-# echo ""
-# echo "  CLASSPATH: $WSGEN_CLASSPATH"
-# echo ""
-# echo "========================================================================="
-# echo ""
-
-# Execute the JVM
-"$JAVA" $JAVA_OPTS \
-   -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-   -classpath "$WSGEN_CLASSPATH" \
-   org.jboss.ws.tools.jaxws.WSGenerate "$@"

Copied: branches/jbossws-1.2.0/build/etc/wsprovide (from rev 2328, trunk/build/etc/wsprovide)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsprovide	                        (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsprovide	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+# $Id$
+
+DIRNAME=`dirname $0`
+PROGNAME=`basename $0`
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false;
+case "`uname`" in
+    CYGWIN*)
+        cygwin=true
+        ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+    [ -n "$JBOSS_HOME" ] &&
+        JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
+    [ -n "$JAVA_HOME" ] &&
+        JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Setup JBOSS_HOME
+if [ "x$JBOSS_HOME" = "x" ]; then
+    # get the full path (without any relative bits)
+    JBOSS_HOME=`cd $DIRNAME/..; pwd`
+fi
+export JBOSS_HOME
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
+	JAVA="$JAVA_HOME/bin/java"
+    else
+	JAVA="java"
+    fi
+fi
+
+#JPDA options. Uncomment and modify as appropriate to enable remote debugging .
+#JAVA_OPTS="-classic -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS"
+
+# Setup JBoss sepecific properties
+JAVA_OPTS="$JAVA_OPTS"
+
+# Setup the java endorsed dirs
+JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
+
+# Setup the wstools classpath
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-xml-binding.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/activation.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/getopt.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/javassist.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxb-api.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jaxb-impl.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossall-client.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-jaxws.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-jaxrpc.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/jboss-saaj.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
+WSPROVIDE_CLASSPATH="$WSPROVIDE_CLASSPATH:$JBOSS_HOME/client/mail.jar"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+    JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+    WSPROVIDE_CLASSPATH=`cygpath --path --windows "$WSPROVIDE_CLASSPATH"`
+    JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
+fi
+
+# Execute the JVM
+"$JAVA" $JAVA_OPTS \
+   -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+   -Dlog4j.configuration=wstools-log4j.xml \
+   -classpath "$WSPROVIDE_CLASSPATH" \
+   org.jboss.ws.tools.jaxws.command.wsprovide "$@"

Copied: branches/jbossws-1.2.0/build/etc/wsprovide.bat (from rev 2328, trunk/build/etc/wsprovide.bat)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wsprovide.bat	                        (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wsprovide.bat	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,45 @@
+ at echo off
+
+rem $Id$
+
+ at if not "%ECHO%" == ""  echo %ECHO%
+ at if "%OS%" == "Windows_NT"  setlocal
+
+set DIRNAME=.\
+if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
+set PROGNAME=run.bat
+if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
+
+rem Read all command line arguments
+
+REM
+REM The %ARGS% env variable commented out in favor of using %* to include
+REM all args in java command line. See bug #840239. [jpl]
+REM
+REM set ARGS=
+REM :loop
+REM if [%1] == [] goto endloop
+REM         set ARGS=%ARGS% %1
+REM         shift
+REM         goto loop
+REM :endloop
+
+set JAVA=%JAVA_HOME%\bin\java
+set JBOSS_HOME=%DIRNAME%\..
+rem Setup the java endorsed dirs
+set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
+
+rem Setup the wstools classpath
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jboss-xml-binding.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/activation.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/javassist.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/getopt.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jaxb-api.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jaxb-impl.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossall-client.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/log4j.jar
+set WSPROVIDE_CLASSPATH=%WSPROVIDE_CLASSPATH%;%JBOSS_HOME%/client/mail.jar
+
+rem Execute the JVM
+"%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSPROVIDE_CLASSPATH%" org.jboss.ws.tools.jaxws.command.wsprovide %*

Modified: branches/jbossws-1.2.0/build/etc/wspublish.sh
===================================================================
--- branches/jbossws-1.2.0/build/etc/wspublish.sh	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wspublish.sh	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $Id: WSPUBLISH.sh 214 2006-04-20 17:43:45Z thomas.diesler at jboss.com $
+# $Id$
 
 DIRNAME=`dirname $0`
 PROGNAME=`basename $0`


Property changes on: branches/jbossws-1.2.0/build/etc/wspublish.sh
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Copied: branches/jbossws-1.2.0/build/etc/wstools-log4j.xml (from rev 2328, trunk/build/etc/wstools-log4j.xml)
===================================================================
--- branches/jbossws-1.2.0/build/etc/wstools-log4j.xml	                        (rev 0)
+++ branches/jbossws-1.2.0/build/etc/wstools-log4j.xml	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  WS-Tools Log4j Configuration                                         -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+
+<!--
+| For more configuration infromation and examples see the Jakarta Log4j
+| owebsite: http://jakarta.apache.org/log4j
+-->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Threshold" value="INFO"/>
+    <param name="Target" value="System.out"/>
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+    </layout>
+  </appender>
+
+  <!-- ================ -->
+  <!-- Limit categories -->
+  <!-- ================ -->
+
+  <category name="org.jboss.ws">
+    <priority value="WARN"/>
+  </category>
+
+   <category name="org.jboss.remoting">
+    <priority value="INFO"/>
+  </category>
+
+  <!--
+  <category name="org.jboss.xb">
+    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+  </category>
+  -->
+
+  <!-- ======================= -->
+  <!-- Setup the Root category -->
+  <!-- ======================= -->
+
+  <root>
+    <appender-ref ref="CONSOLE"/>
+  </root>
+</log4j:configuration>

Modified: branches/jbossws-1.2.0/build/etc/wstools.bat
===================================================================
--- branches/jbossws-1.2.0/build/etc/wstools.bat	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wstools.bat	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,6 +1,6 @@
 @echo off
 
-rem $Id: wstools.bat 1683 2006-12-21 12:40:22Z thomas.diesler at jboss.com $
+rem $Id$
 
 @if not "%ECHO%" == ""  echo %ECHO%
 @if "%OS%" == "Windows_NT"  setlocal


Property changes on: branches/jbossws-1.2.0/build/etc/wstools.bat
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/jbossws-1.2.0/build/etc/wstools.sh
===================================================================
--- branches/jbossws-1.2.0/build/etc/wstools.sh	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/etc/wstools.sh	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $Id: wstools.sh 1683 2006-12-21 12:40:22Z thomas.diesler at jboss.com $
+# $Id$
 
 DIRNAME=`dirname $0`
 PROGNAME=`basename $0`


Property changes on: branches/jbossws-1.2.0/build/etc/wstools.sh
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/jbossws-1.2.0/build/version.properties
===================================================================
--- branches/jbossws-1.2.0/build/version.properties	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/build/version.properties	2007-02-10 06:04:23 UTC (rev 2332)
@@ -17,7 +17,7 @@
 apache-xmlsec=1.3.0
 ibm-wsdl4j=1.5.2jboss
 javassist=3.4.GA
-jboss-jbossxb=1.0.0.CR9
+jboss-jbossxb=snapshot
 jboss-microcontainer=1.0.2
 jboss-remoting=2.0.0.GA
 sun-jaxb=2.0.3
@@ -42,6 +42,7 @@
 jboss-security=4.0.5.GA
 jboss-vfs=2.0.0.Beta2
 jbossas-core-libs=4.0.5.GA
+jbossws-wsconsume-impl=2.0.0
 jbpm-bpel=1.1.Beta3
 junit=3.8.1
 oswego-concurrent=1.3.4
@@ -51,6 +52,6 @@
 sun-jaf=1.1
 sun-javamail=1.4
 sun-servlet=2.4
-woodstox=2.0.6
+woodstox=3.1.1
 wscommons-policy=1.0
 xmlunit=1.0

Modified: branches/jbossws-1.2.0/jbossws-core/build.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/build.xml	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/build.xml	2007-02-10 06:04:23 UTC (rev 2332)
@@ -156,10 +156,16 @@
         <include name="dtd/**"/>
       </fileset>
       <fileset dir="${etc.dir}">
-        <include name="wstools.sh"/>
+        <include name="wsprovide.bat"/>
+        <include name="wsconsume.bat"/>
         <include name="wstools.bat"/>
         <include name="wstools-log4j.xml"/>
       </fileset>
+      <zipfileset dir="${etc.dir}" filemode="755">
+        <include name="wsprovide"/>
+        <include name="wsconsume"/>
+        <include name="wstools.sh"/>
+      </zipfileset>
     </jar>
     
   </target>

Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/DynamicWrapperGenerator.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -147,7 +147,8 @@
 
          for (String property : propertyOrder)
             addProperty(clazz, properties.get(property).getName(), new QName(property), property, null);
-
+         
+         clazz.stopPruning(!prune);
          pool.toClass(clazz, loader);
          JavaUtils.clearBlacklists(loader);
       }

Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -50,6 +50,7 @@
 import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
 import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
 import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.ws.tools.ToolsUtils;
 import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
 import org.jboss.ws.tools.wsdl.WSDLGenerator;
 import org.jboss.ws.tools.wsdl.WSDLWriter;
@@ -263,7 +264,8 @@
       {
          try
          {
-            String serviceName = serviceMetaData.getServiceName().getLocalPart();
+            // The RI uses upper case, and the TCK expects it, so we just mimic this even though we don't really have to
+            String wsdlName =  ToolsUtils.firstLetterUpperCase(serviceMetaData.getServiceName().getLocalPart());
 
             WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
             WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
@@ -276,12 +278,12 @@
             if (wsdlDirectory != null)
             {
                dir = wsdlDirectory;
-               wsdlFile = new File(dir, serviceName + ".wsdl");
+               wsdlFile = new File(dir, wsdlName + ".wsdl");
             }
             else
             {
                dir =  IOUtils.createTempDirectory();
-               wsdlFile = File.createTempFile(serviceName, ".wsdl", dir);
+               wsdlFile = File.createTempFile(wsdlName, ".wsdl", dir);
                wsdlFile.deleteOnExit();
             }
 

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/WSGenerate.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,210 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.tools.jaxws;
-
-import gnu.getopt.Getopt;
-import gnu.getopt.LongOpt;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-
-/**
- * WSGenerate is a command line tool that generates portable JAX-WS artifacts
- * for a service endpoint implementation.
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- */
-public class WSGenerate
-{
-   private boolean generateSource = false;
-   private boolean generateWsdl = false;
-   private boolean quiet = false;
-   private boolean showTraces = false;
-   private ClassLoader loader = Thread.currentThread().getContextClassLoader();
-   private File outputDir = new File("output");
-   private File resourceDir = null;
-   private File sourceDir = null;
-   
-   public static String PROGRAM_NAME = System.getProperty("program.name", "wsgen");
-
-   public static void main(String[] args)
-   {
-      WSGenerate generate = new WSGenerate();
-      String endpoint = generate.parseArguments(args);
-      System.exit(generate.generate(endpoint));
-   }
-   
-   private String parseArguments(String[] args)
-   {
-      String shortOpts = "hwko:r:s:cqt";
-      LongOpt[] longOpts = 
-      {
-         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
-         new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
-         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
-         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
-         new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
-         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
-         new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
-         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
-         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
-      };
-      
-      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
-      int c;
-      while ((c = getopt.getopt()) != -1)
-      {
-         switch (c)
-         {
-            case 'k':
-               generateSource = true;
-               break;
-            case 's':
-               sourceDir = new File(getopt.getOptarg());
-               break;
-            case 'r':
-               resourceDir = new File(getopt.getOptarg());
-               break;
-            case 'w':
-               generateWsdl = true;
-               break;
-            case 't':
-               showTraces = true;
-               break;
-            case 'o':
-               outputDir = new File(getopt.getOptarg());
-               break;
-            case 'q':
-               quiet = true;
-               break;
-            case 'c':
-               processClassPath(getopt.getOptarg());
-               break;
-            case 'h':
-               printHelp();
-               System.exit(0);
-            case '?':
-               System.exit(1);
-         }
-      }
-      
-      int endpointPos = getopt.getOptind();
-      if (endpointPos >= args.length)
-      {
-         System.err.println("Error: endpoint implementation was not specified!");
-         printHelp();
-         System.exit(1);
-      }
-      
-      return args[endpointPos];
-   }
-   
-   
-   private int generate(String endpoint)
-   {
-      if (!JavaUtils.isLoaded(endpoint, loader))
-      {
-         System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
-         return 1;
-      }
-      
-      WebServiceGenerator gen = WebServiceGenerator.newInstance(loader);
-      gen.setGenerateWsdl(generateWsdl);
-      gen.setGenerateSource(generateSource);
-      gen.setOutputDirectory(outputDir);
-      if (resourceDir != null)
-         gen.setResourceDirectory(resourceDir);
-      if (sourceDir != null)
-         gen.setSourceDirectory(sourceDir);
-
-      if (! quiet)
-         gen.setMessageStream(System.out);
-      
-      try
-      {
-         gen.generate(endpoint);
-         return 0;
-      }
-      catch (Throwable t)
-      {
-         System.err.println("Error: Could not generate. (use --show-traces to see full traces)");
-         if (!showTraces)
-         {
-            String message = t.getMessage();
-            if (message == null)
-               message = t.getClass().getSimpleName();
-            System.err.println("Error: " + message);
-         }
-         else
-         {
-            t.printStackTrace(System.err);
-         }
-         
-      }
-      
-      return 1;
-   }
-
-   private void processClassPath(String classPath)
-   {
-      String[] entries =  classPath.split(File.pathSeparator);
-      List<URL> urls= new ArrayList<URL>(entries.length);
-      for (String entry : entries)
-      {
-         try 
-         {
-            urls.add(new File(entry).toURL());
-         }
-         catch (MalformedURLException e)
-         {
-            System.err.println("Error: a classpath entry was malformed: " + entry);
-         }
-      }
-      loader = new URLClassLoader(urls.toArray(new URL[0]), loader);
-   }
-
-   private static void printHelp()
-   {
-      PrintStream out = System.out;
-      out.println("WSGenerate generates portable JAX-WS artifacts for an endpoint implementation.\n");
-      out.println("usage: " + PROGRAM_NAME + " [options] <endpoint class name>\n");
-      out.println("options: ");
-      out.println("    -h, --help                  Show this help message");
-      out.println("    -k, --keep                  Keep/Generate Java source");
-      out.println("    -w, --wsdl                  Enable WSDL file generation");
-      out.println("    -c. --classpath             The classpath that contains the endpoint");
-      out.println("    -o, --output=<directory>    The directory to put generated artifacts");
-      out.println("    -r, --resource=<directory>  The directory to put resource artifacts");
-      out.println("    -s, --source=<directory>    The directory to put Java source");
-      out.println("    -q, --quiet                 Be somewhat more quiet");
-      out.println("    -t, --show-traces           Show full exception stack traces");
-      out.flush();
-   }
-}

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,217 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.tools.jaxws.ant;
-
-import java.io.File;
-import java.io.PrintStream;
-
-import org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.ExecuteJava;
-import org.apache.tools.ant.taskdefs.LogOutputStream;
-import org.apache.tools.ant.types.CommandlineJava;
-import org.apache.tools.ant.types.Path;
-import org.apache.tools.ant.types.Reference;
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-
-/**
- * Ant task which invokes WebServiceGenerate.
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- */
-public class WSGenerate extends Task
-{
-   private Path classpath = new Path(getProject());
-   private String sei = null;
-   private File destdir = null;
-   private File resourcedestdir = null;
-   private File sourcedestdir = null;
-   private boolean keep = false;
-   private boolean genwsdl = false;
-   private boolean verbose = false;
-   private boolean fork = false;
-   
-   public void setClasspath(Path classpath)
-   {
-      this.classpath = classpath;
-   }
-   
-   public void setClasspathRef(Reference ref)
-   {
-      createClasspath().setRefid(ref);
-   }
-   
-   public Path createClasspath()
-   {
-      return classpath;
-   }
-   
-   public void setDestdir(File destdir)
-   {
-      this.destdir = destdir;
-   }
-
-   public void setKeep(boolean keep)
-   {
-      this.keep = keep;
-   }
-   
-   public void setSei(String sei)
-   {
-      this.sei = sei;
-   }
-   
-   public void setEndpoint(String endpoint)
-   {
-      this.sei = endpoint;
-   }
-
-   public void setFork(boolean fork)
-   {
-      this.fork = fork;
-   }
-
-   public void setResourcedestdir(File resourcedestdir)
-   {
-      this.resourcedestdir = resourcedestdir;
-   }
-
-   public void setSourcedestdir(File sourcedestdir)
-   {
-      this.sourcedestdir = sourcedestdir;
-   }
-
-   public void setVerbose(boolean verbose)
-   {
-      this.verbose = verbose;
-   }
-
-   public void setGenwsdl(boolean genwsdl)
-   {
-      this.genwsdl = genwsdl;
-   }
-   
-   private ClassLoader getClasspathLoader(ClassLoader parent)
-   {
-      return new AntClassLoader(parent, getProject(), classpath, false);
-   }
-   
-   public void executeNonForked()
-   {
-      ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
-      ClassLoader antLoader = this.getClass().getClassLoader();
-      Thread.currentThread().setContextClassLoader(antLoader);
-      try
-      {
-         WebServiceGenerator gen = WebServiceGenerator.newInstance();
-         gen.setClassLoader(getClasspathLoader(antLoader));
-         if (verbose)
-            gen.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
-         gen.setGenerateSource(keep);
-         gen.setGenerateWsdl(genwsdl);
-         if (destdir != null)
-            gen.setOutputDirectory(destdir);
-         if (resourcedestdir != null)
-            gen.setResourceDirectory(resourcedestdir);
-         if (sourcedestdir != null)
-            gen.setSourceDirectory(sourcedestdir);
-         if (verbose)
-            log("Generating from endpoint: " + sei, Project.MSG_INFO);
-         
-         gen.generate(sei);
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(prevCL);
-      }
-   }
-   
-   public void execute() throws BuildException
-   {
-      if (fork)
-         executeForked();
-      else
-         executeNonForked();
-   }
-   
-   private Path getTaskClassPath()
-   {
-      // Why is everything in the Ant API a big hack???
-      ClassLoader cl = this.getClass().getClassLoader();
-      if (cl instanceof AntClassLoader)
-      {
-         return new Path(getProject(), ((AntClassLoader)cl).getClasspath());
-      }
-      
-      return new Path(getProject());
-   }
-
-   private void executeForked() throws BuildException
-   {
-      CommandlineJava command = new CommandlineJava();
-      command.setClassname(org.jboss.ws.tools.jaxws.WSGenerate.class.getName());
-      
-      Path path = command.createClasspath(getProject());
-      path.append(getTaskClassPath());
-      path.append(classpath);
-     
-      if (keep)
-         command.createArgument().setValue("-k");
-      
-      if (genwsdl)
-         command.createArgument().setValue("-w");
-      
-      if (destdir != null)
-      {
-         command.createArgument().setValue("-o");
-         command.createArgument().setFile(destdir);
-      }
-      if (resourcedestdir != null)
-      {
-         command.createArgument().setValue("-r");
-         command.createArgument().setFile(resourcedestdir);
-      }
-      if (sourcedestdir != null)
-      {
-         command.createArgument().setValue("-s");
-         command.createArgument().setFile(sourcedestdir);
-      }
-      
-      if (!verbose)
-         command.createArgument().setValue("-q");
-      
-      // Always dump traces
-      command.createArgument().setValue("-t");
-      command.createArgument().setValue(sei);
-      
-      if (verbose)
-         log("Command invoked: " + command.getJavaCommand().toString());
-      
-      ExecuteJava execute = new ExecuteJava();
-      execute.setClasspath(path);
-      execute.setJavaCommand(command.getJavaCommand());
-      if (execute.fork(this) != 0)
-         throw new BuildException("Could not invoke wsgen", getLocation());
-   }
-}
\ No newline at end of file

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsconsume.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,308 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.tools.jaxws.ant;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.ExecuteJava;
+import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.FileSet;
+import org.apache.tools.ant.types.Path;
+import org.jboss.ws.tools.jaxws.api.WSContractConsumer;
+
+/**
+ * Ant task which consumes a Web Service contract.
+ * 
+ * <table border="1">
+ *   <tr align="left" BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><th>Attribute</th><th>Description</th><th>Default</th></tr>
+ *   <tr><td>fork</td><td>Whether or not to run the generation task in a separate VM.</td><td>true</td></tr>
+ *   <tr><td>keep</td><td>Keep/Enable Java source code generation.</td><td>false</td></tr>
+ *   <tr><td>catalog</td><td> Oasis XML Catalog file for entity resolution</td><td>none</td></tr>
+ *   <tr><td>package</td><td> The target Java package for generated code.</td><td>generated</td></tr>
+ *   <tr><td>binding</td><td>A JAX-WS or JAXB binding file</td><td>none</td></tr>
+ *   <tr><td>wsdlLocation</td><td>Value to use for @@WebService.wsdlLocation</td><td>generated</td></tr>
+ *   <tr><td>destdir</td><td>The output directory for generated artifacts.</td><td>"output"</td></tr>
+ *   <tr><td>sourcedir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
+ *   <tr><td>verbose</td><td>Enables more informational output about command progress.</td><td>false</td><tr>
+ *   <tr><td>wsdl*</td><td>The WSDL file or URL</td><td>n/a</td><tr>
+ * </table>
+ * <b>* = required.</b>
+ * 
+ * <p>Example:
+ * 
+ * <pre>
+ * &lt;wsconsume 
+ *   fork=&quot;true&quot;
+ *   verbose=&quot;true&quot;
+ *   destdir=&quot;output&quot;
+ *   sourcedestdir=&quot;gen-src&quot;
+ *   keep=&quot;true&quot;
+ *   wsdllocation=&quot;handEdited.wsdl&quot; 
+ *   wsdl=&quot;foo.wsdl&quot;&gt;
+ *   &lt;binding dir=&quot;binding-files&quot; includes=&quot;*.xml&quot; excludes=&quot;bad.xml&quot;/&gt;
+ * &lt;/wsimport&gt;
+ * </pre>
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class wsconsume extends Task
+{
+   private CommandlineJava command = new CommandlineJava();
+   private String wsdl = null;
+   private File destdir = null;
+   private File sourcedestdir = null;
+   private List<File> bindingFiles = new ArrayList<File>();
+   private File catalog = null;
+   private String wsdlLocation = null;
+   private String targetPackage = null;
+   private boolean keep = false;
+   private boolean verbose = false;
+   private boolean fork = false;
+   private boolean debug = false;
+   
+   // Not actually used right now
+   public void setDebug(boolean debug)
+   {
+      this.debug = debug;
+   }
+   
+   public Commandline.Argument createJvmarg()
+   {
+      return command.createVmArgument();
+   }
+
+   public void setBinding(File bindingFile)
+   {
+      bindingFiles.add(bindingFile);
+   }
+
+   public void setCatalog(File catalog)
+   {
+      this.catalog = catalog;
+   }
+
+   public void setDestdir(File destdir)
+   {
+      this.destdir = destdir;
+   }
+
+   public void setFork(boolean fork)
+   {
+      this.fork = fork;
+   }
+
+   public void setKeep(boolean keep)
+   {
+      this.keep = keep;
+   }
+
+   public void setSourcedestdir(File sourcedestdir)
+   {
+      this.sourcedestdir = sourcedestdir;
+   }
+
+   public void setPackage(String targetPackage)
+   {
+      this.targetPackage = targetPackage;
+   }
+
+   public void setVerbose(boolean verbose)
+   {
+      this.verbose = verbose;
+   }
+
+   public void setWsdl(String wsdl)
+   {
+      this.wsdl = wsdl;
+   }
+
+   public void setWsdlLocation(String wsdlLocation)
+   {
+      this.wsdlLocation = wsdlLocation;
+   }
+   
+   public void addConfiguredBinding(FileSet fs)
+   {
+      DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+      File baseDir = ds.getBasedir();
+      for (String file : ds.getIncludedFiles())
+      {
+         bindingFiles.add(new File(baseDir, file));
+      }
+   }
+
+   public void executeNonForked()
+   {
+      ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
+      ClassLoader antLoader = this.getClass().getClassLoader();
+      Thread.currentThread().setContextClassLoader(antLoader);
+      try
+      {
+         WSContractConsumer importer = WSContractConsumer.newInstance();
+         importer.setGenerateSource(keep);
+         if (destdir != null)
+            importer.setOutputDirectory(destdir);
+         if (sourcedestdir != null)
+            importer.setSourceDirectory(sourcedestdir);
+         if (targetPackage != null)
+            importer.setTargetPackage(targetPackage);
+         if (wsdlLocation != null)
+            importer.setWsdlLocation(wsdlLocation);
+         if (catalog != null)
+            importer.setCatalog(catalog);
+         if (bindingFiles != null && bindingFiles.size() > 0)
+            importer.setBindingFiles(bindingFiles);
+         
+         if (verbose)
+         {
+            importer.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
+            log("Generating from wsdl: " + wsdl, Project.MSG_INFO);
+         }
+         
+         try
+         {
+            importer.setAdditionalCompilerClassPath(getTaskClassPathStrings());
+            importer.consume(wsdl);
+         }
+         catch (MalformedURLException e)
+         {
+            throw new BuildException(e, getLocation());
+         }
+      }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(prevCL);
+      }
+   }
+
+   public void execute() throws BuildException
+   {
+      if (wsdl == null)
+         throw new BuildException("The wsdl attribute must be specified!", getLocation());
+      
+      if (fork)
+         executeForked();
+      else
+         executeNonForked();
+   }
+   
+   private Path getTaskClassPath()
+   {
+      // Why is everything in the Ant API a big hack???
+      ClassLoader cl = this.getClass().getClassLoader();
+      if (cl instanceof AntClassLoader)
+      {
+         return new Path(getProject(), ((AntClassLoader)cl).getClasspath());
+      }
+      
+      return new Path(getProject());
+   }
+   
+   private List<String> getTaskClassPathStrings()
+   {
+      // Why is everything in the Ant API a big hack???
+      List<String> strings = new ArrayList<String>();
+      ClassLoader cl = this.getClass().getClassLoader();
+      if (cl instanceof AntClassLoader)
+      {
+         for (String string : ((AntClassLoader)cl).getClasspath().split(File.pathSeparator))
+            strings.add(string);
+      }
+      
+      return strings;
+   }
+
+   private void executeForked() throws BuildException
+   {
+      command.setClassname(org.jboss.ws.tools.jaxws.command.wsconsume.class.getName());
+      
+      Path path = command.createClasspath(getProject());
+      path.append(getTaskClassPath());
+     
+      if (keep)
+         command.createArgument().setValue("-k");
+     
+      for (File file : bindingFiles)
+      {
+         command.createArgument().setValue("-b");
+         command.createArgument().setFile(file);
+      }
+      
+      if (catalog != null)
+      {
+         command.createArgument().setValue("-c");
+         command.createArgument().setFile(catalog);
+      }
+      
+      if (targetPackage != null)
+      {
+         command.createArgument().setValue("-p");
+         command.createArgument().setValue(targetPackage);
+      }
+      
+      if (wsdlLocation != null)
+      {
+         command.createArgument().setValue("-w");
+         command.createArgument().setValue(wsdlLocation);
+      }
+         
+      if (destdir != null)
+      {
+         command.createArgument().setValue("-o");
+         command.createArgument().setFile(destdir);
+      }
+      
+      if (sourcedestdir != null)
+      {
+         command.createArgument().setValue("-s");
+         command.createArgument().setFile(sourcedestdir);
+      }
+      
+      if (!verbose)
+         command.createArgument().setValue("-q");
+      
+      // Always dump traces
+      command.createArgument().setValue("-t");
+      command.createArgument().setValue(wsdl);
+      
+      if (verbose)
+         log("Command invoked: " + command.getJavaCommand().toString());
+      
+      ExecuteJava execute = new ExecuteJava();
+      execute.setClasspath(path);
+      execute.setJavaCommand(command.getJavaCommand());
+      if (execute.fork(this) != 0)
+         throw new BuildException("Could not invoke wsconsume", getLocation());
+   }
+}
\ No newline at end of file

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/wsprovide.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,266 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.tools.jaxws.ant;
+
+import java.io.File;
+import java.io.PrintStream;
+
+import org.apache.tools.ant.AntClassLoader;
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.taskdefs.ExecuteJava;
+import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.Commandline;
+import org.apache.tools.ant.types.CommandlineJava;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+
+/**
+ * Ant task which invokes provides a Web Service contract and portable JAX-WS wrapper classes.
+ * 
+ * <table border="1">
+ *   <tr align="left" BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><th>Attribute</th><th>Description</th><th>Default</th></tr>
+ *   <tr><td>fork</td><td>Whether or not to run the generation task in a separate VM.</td><td>true</td></tr>
+ *   <tr><td>keep</td><td>Keep/Enable Java source code generation.</td><td>false</td></tr>
+ *   <tr><td>destdir</td><td>The output directory for generated artifacts.</td><td>"output"</td></tr>
+ *   <tr><td>resourcedestdir</td><td>The output directory for resource artifacts (WSDL/XSD).</td><td>value of destdir</td></tr>
+ *   <tr><td>sourcedir</td><td>The output directory for Java source.</td><td>value of destdir</td></tr>
+ *   <tr><td>genwsdl</td><td>Whether or not to generate WSDL.</td><td>false</td><tr>
+ *   <tr><td>verbose</td><td>Enables more informational output about command progress.</td><td>false</td><tr>
+ *   <tr><td>sei*</td><td>Service Endpoint Implementation.</td><td></td><tr>
+ *   <tr><td>classpath</td><td>The classpath that contains the service endpoint implementation.</td><td>""</tr>
+ * </table>
+ * <b>* = required.</b>
+ * 
+ * <p>Example:
+ * 
+ * <pre>
+ *  &lt;target name=&quot;test-wsproivde&quot; depends=&quot;init&quot;&gt;
+ *    &lt;taskdef name=&quot;wsprovide&quot; classname=&quot;org.jboss.ws.tools.jaxws.ant.wsprovide&quot;&gt;
+ *      &lt;classpath refid=&quot;core.classpath&quot;/&gt;
+ *    &lt;/taskdef&gt;
+ *    &lt;wsgen
+ *      fork=&quot;false&quot;
+ *      keep=&quot;true&quot;
+ *      destdir=&quot;out&quot;
+ *      resourcedestdir=&quot;out-resource&quot;
+ *      sourcedestdir=&quot;out-source&quot;
+ *      genwsdl=&quot;true&quot; 
+ *      verbose=&quot;true&quot;
+ *      sei=&quot;org.jboss.test.ws.jaxws.jsr181.soapbinding.DocWrappedServiceImpl&quot;&gt;
+ *      &lt;classpath&gt;
+ *        &lt;pathelement path=&quot;${tests.output.dir}/classes&quot;/&gt;
+ *      &lt;/classpath&gt;
+ *    &lt;/wsgen&gt;
+ *  &lt;/target&gt;
+ * </pre>
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class wsprovide extends Task
+{
+   private Path classpath = new Path(getProject());
+   private CommandlineJava command = new CommandlineJava();
+   private String sei = null;
+   private File destdir = null;
+   private File resourcedestdir = null;
+   private File sourcedestdir = null;
+   private boolean keep = false;
+   private boolean genwsdl = false;
+   private boolean verbose = false;
+   private boolean fork = false;
+   private boolean debug = false;
+   
+   // Not actually used right now
+   public void setDebug(boolean debug)
+   {
+      this.debug = debug;
+   }
+   
+   public Commandline.Argument createJvmarg() 
+   {
+      return command.createVmArgument();
+   }
+   
+   public void setClasspath(Path classpath)
+   {
+      this.classpath = classpath;
+   }
+   
+   public void setClasspathRef(Reference ref)
+   {
+      createClasspath().setRefid(ref);
+   }
+   
+   public Path createClasspath()
+   {
+      return classpath;
+   }
+   
+   public void setDestdir(File destdir)
+   {
+      this.destdir = destdir;
+   }
+
+   public void setKeep(boolean keep)
+   {
+      this.keep = keep;
+   }
+   
+   public void setSei(String sei)
+   {
+      this.sei = sei;
+   }
+   
+   public void setFork(boolean fork)
+   {
+      this.fork = fork;
+   }
+
+   public void setResourcedestdir(File resourcedestdir)
+   {
+      this.resourcedestdir = resourcedestdir;
+   }
+
+   public void setSourcedestdir(File sourcedestdir)
+   {
+      this.sourcedestdir = sourcedestdir;
+   }
+
+   public void setVerbose(boolean verbose)
+   {
+      this.verbose = verbose;
+   }
+
+   public void setGenwsdl(boolean genwsdl)
+   {
+      this.genwsdl = genwsdl;
+   }
+   
+   private ClassLoader getClasspathLoader(ClassLoader parent)
+   {
+      return new AntClassLoader(parent, getProject(), classpath, false);
+   }
+   
+   public void executeNonForked()
+   {
+      ClassLoader prevCL = Thread.currentThread().getContextClassLoader();
+      ClassLoader antLoader = this.getClass().getClassLoader();
+      Thread.currentThread().setContextClassLoader(antLoader);
+      try
+      {
+         WSContractProvider gen = WSContractProvider.newInstance();
+         gen.setClassLoader(getClasspathLoader(antLoader));
+         if (verbose)
+            gen.setMessageStream(new PrintStream(new LogOutputStream(this, Project.MSG_INFO)));
+         gen.setGenerateSource(keep);
+         gen.setGenerateWsdl(genwsdl);
+         if (destdir != null)
+            gen.setOutputDirectory(destdir);
+         if (resourcedestdir != null)
+            gen.setResourceDirectory(resourcedestdir);
+         if (sourcedestdir != null)
+            gen.setSourceDirectory(sourcedestdir);
+         if (verbose)
+            log("Generating from endpoint: " + sei, Project.MSG_INFO);
+         
+         gen.provide(sei);
+      }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(prevCL);
+      }
+   }
+   
+   public void execute() throws BuildException
+   {
+      if (sei == null)
+         throw new BuildException("The sei attribute must be specified!", getLocation());
+      
+      if (fork)
+         executeForked();
+      else
+         executeNonForked();
+   }
+   
+   private Path getTaskClassPath()
+   {
+      // Why is everything in the Ant API a big hack???
+      ClassLoader cl = this.getClass().getClassLoader();
+      if (cl instanceof AntClassLoader)
+      {
+         return new Path(getProject(), ((AntClassLoader)cl).getClasspath());
+      }
+      
+      return new Path(getProject());
+   }
+
+   private void executeForked() throws BuildException
+   {
+      command.setClassname(org.jboss.ws.tools.jaxws.command.wsprovide.class.getName());
+      
+      Path path = command.createClasspath(getProject());
+      path.append(getTaskClassPath());
+      path.append(classpath);
+     
+      if (keep)
+         command.createArgument().setValue("-k");
+      
+      if (genwsdl)
+         command.createArgument().setValue("-w");
+      
+      if (destdir != null)
+      {
+         command.createArgument().setValue("-o");
+         command.createArgument().setFile(destdir);
+      }
+      if (resourcedestdir != null)
+      {
+         command.createArgument().setValue("-r");
+         command.createArgument().setFile(resourcedestdir);
+      }
+      if (sourcedestdir != null)
+      {
+         command.createArgument().setValue("-s");
+         command.createArgument().setFile(sourcedestdir);
+      }
+      
+      if (!verbose)
+         command.createArgument().setValue("-q");
+      
+      // Always dump traces
+      command.createArgument().setValue("-t");
+      command.createArgument().setValue(sei);
+      
+      if (verbose)
+         log("Command invoked: " + command.getJavaCommand().toString());
+      
+      ExecuteJava execute = new ExecuteJava();
+      execute.setClasspath(path);
+      execute.setJavaCommand(command.getJavaCommand());
+      if (execute.fork(this) != 0)
+         throw new BuildException("Could not invoke wsprovide", getLocation());
+   }
+}
\ No newline at end of file

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/Locator.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.tools.jaxws.api;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Locates a provider.
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ *
+ */
+class Locator 
+{
+   static <T> T locate(Class<T> providerType, String providerProperty, String defaultProvider, ClassLoader loader)
+   {
+      String provider = null;
+      
+      try
+      {
+      
+         PrivilegedAction action = new PropertyAccessAction(providerProperty);
+         provider = (String)AccessController.doPrivileged(action);
+         if (provider == null)
+            provider = defaultProvider;
+      
+         Class<?> clazz = loader.loadClass(provider);
+         return (T) clazz.newInstance();
+      }
+      catch (Throwable t)
+      {
+         if (provider == null)
+            throw new IllegalStateException("Failure reading system property: " + providerProperty);
+         
+         throw new IllegalStateException("Could not load provider:" + provider);
+      }
+      
+   }
+   
+   private static class PropertyAccessAction implements PrivilegedAction
+   {
+      private String name;
+
+      PropertyAccessAction(String name)
+      {
+         this.name = name;
+      }
+
+      public Object run()
+      {
+         return System.getProperty(name);
+      }
+   }
+   
+}
\ No newline at end of file

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/ProviderLocator.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,75 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.tools.jaxws.api;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Locates a provider.
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- *
- */
-class ProviderLocator 
-{
-   static <T> T locate(Class<T> providerType, String providerProperty, String defaultProvider, ClassLoader loader)
-   {
-      String provider = null;
-      
-      try
-      {
-      
-         PrivilegedAction action = new PropertyAccessAction(providerProperty);
-         provider = (String)AccessController.doPrivileged(action);
-         if (provider == null)
-            provider = defaultProvider;
-      
-         Class<?> clazz = loader.loadClass(provider);
-         return (T) clazz.newInstance();
-      }
-      catch (Throwable t)
-      {
-         if (provider == null)
-            throw new IllegalStateException("Failure reading system property: " + providerProperty);
-         
-         throw new IllegalStateException("Could not load provider:" + provider);
-      }
-      
-   }
-   
-   private static class PropertyAccessAction implements PrivilegedAction
-   {
-      private String name;
-
-      PropertyAccessAction(String name)
-      {
-         this.name = name;
-      }
-
-      public Object run()
-      {
-         return System.getProperty(name);
-      }
-   }
-   
-}
\ No newline at end of file

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractConsumer.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,178 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.tools.jaxws.api;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+import org.jboss.ws.tools.jaxws.spi.WSContractConsumerFactory;
+
+/**
+ * WSContractConsumer is responsible for generating JAX-WS client and server
+ * artifacts from the specified WSDL file. To implement a client, one would use
+ * the generated ___Service.java file. For a server, one only needs to provide
+ * an implementation class that implements the generated service endpoint
+ * interface.
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public abstract class WSContractConsumer
+{
+   private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.WSContractConsumerFactoryImpl";
+   public static final String PROVIDER_PROPERTY = "org.jboss.ws.tools.jaxws.WSContractConsumerFactoryImpl";
+
+   /**
+    * Obtain a new instance of a WSContractProvider. This will use the current
+    * thread's context class loader to locate the WSContractProviderFactory
+    * implementation.
+    * 
+    * @return a new WSContractProvider
+    */
+   public static WSContractConsumer newInstance()
+   {
+      return newInstance(Thread.currentThread().getContextClassLoader());
+   }
+   
+   /**
+    * Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be used to
+    * locate the WebServiceImporterProvide implementation
+    * 
+    * @param loader the ClassLoader to use
+    * @return a new WSContractConsumer
+    */
+   public static WSContractConsumer newInstance(ClassLoader loader)
+   {
+      WSContractConsumerFactory provider = Locator.locate(WSContractConsumerFactory.class, PROVIDER_PROPERTY, DEFAULT_PROVIDER, loader);
+      return provider.createImporter();
+   }
+   
+   /**
+    * Specifies the JAX-WS and JAXB binding files to use on import operations.
+    * 
+    * @param bindingFiles list of JAX-WS or JAXB binding files
+    */
+   public abstract void setBindingFiles(List<File> bindingFiles);
+   
+   /**
+    * Sets the OASIS XML Catalog file to use for entity resolution.
+    * 
+    * @param catalog the OASIS XML Catalog file
+    */
+   public abstract void setCatalog(File catalog);
+   
+   /**
+    * Sets the main output directory. If the directory does not exist, it will be created.
+    * 
+    * @param directory the root directory for generated files
+    */
+   public abstract void setOutputDirectory(File directory);
+   
+   /**
+    * Sets the source directory. This directory will contain any generated Java source.
+    * If the directory does not exist, it will be created. If not specified, 
+    * the output directory will be used instead.
+    * 
+    * @param directory the root directory for generated source code
+    */
+   public abstract void setSourceDirectory(File directory);
+   
+   /**
+    * Enables/Disables Java source generation.
+    * 
+    * @param generateSource whether or not to generate Java source.
+    */
+   public abstract void setGenerateSource(boolean generateSource);
+   
+   
+   /**
+    * Sets the target package for generated source. If not specified the default
+    * is based off of the XML namespace.
+    * 
+    * @param targetPackage the target package for generated source
+    */
+   public abstract void setTargetPackage(String targetPackage);
+   
+   /**
+    * Sets the @@WebService.wsdlLocation and @@WebServiceClient.wsdlLocation attributes to a custom value.
+    * 
+    * @param wsdlLocation the custom WSDL location to use in generated source
+    */
+   public abstract void setWsdlLocation(String wsdlLocation);
+   
+   /**
+    * Sets the PrintStream to use for status feedback. The simplest example
+    * would be to use System.out.
+    * 
+    * @param messageStream  the stream to use for status messages:
+    */
+   public abstract void setMessageStream(PrintStream messageStream);
+   
+ 
+   /**
+    * Sets the additional classpath to use if/when invoking the Java compiler.
+    * Typically an implementation will use the system <code>java.class.path</code> 
+    * property. So for most normal applications this method is not needed. However,
+    * if this API is being used from an isolated classloader, then it needs to
+    * be called in order to reference all jars that are required by the 
+    * implementation.
+    * 
+    * @param classPath a list of strings where each entry references a 
+    *                  single jar or directory
+    */
+   public abstract void setAdditionalCompilerClassPath(List<String> classPath);
+   
+   /**
+    * Generate the required artifacts using the specified WSDL URL. This method
+    * may be called more than once, although this is probably not desireable
+    * 
+    * @param wsdl the URL of the WSDL
+    */
+   public abstract void consume(URL wsdl);
+ 
+   /**
+    * Generate the required artifacts using the specified WSDL. This method
+    * may be called more than once, although this is probably not desireable.
+    * The passed string is expect to either be a valid URL, or a local file path.
+    *
+    * @param wsdl a URL or local file path
+    * @throws MalformedURLException if wsdl is not a legal URL or local file
+    */
+   public void consume(String wsdl) throws MalformedURLException
+   {
+      URL url = null;
+      try
+      {
+         url = new URL(wsdl);
+      }
+      catch (MalformedURLException e)
+      {
+         File file = new File(wsdl);
+         url = file.toURL();
+      }
+         
+      consume(url);
+   }
+}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WSContractProvider.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,150 @@
+package org.jboss.ws.tools.jaxws.api;
+
+import java.io.File;
+import java.io.PrintStream;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.tools.jaxws.spi.WSContractProviderFactory;
+
+
+/**
+ * WSContractProvider is responsible for generating the required portable
+ * JAX-WS artifacts for a service endpoint implementation. This includes class
+ * files for wrapper types and fault beans. WSDL may be optionally generated as
+ * well using this API.
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * 
+ * <p>The following example generates class files, source files and WSDL for an
+ * endpoint:</p> 
+ * <pre>
+ * WSContractProvider provider = WSContractProvider.newInstance();
+ * provider.setGenerateSource(true);
+ * provider.setGenerateWsdl(true);
+ * provider.setOutputDirectory(new File("output"));
+ * provider.setMessageStream(System.out);
+ * provider.provide(TestMe.class);
+ * </pre>
+ * 
+ * <p>Thread-Safety:</p>
+ * This class expects to be thread-confined, so it can not be shared between threads.
+ */
+public abstract class WSContractProvider
+{
+   private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.WSContractProviderFactoryImpl";
+   public static final String PROVIDER_PROPERTY = "org.jboss.ws.tools.jaxws.WSContractProviderFactoryImpl";
+   
+   protected WSContractProvider() 
+   {
+      
+   }
+   
+   /**
+    * Obtain a new instance of a WSContractProvider. This will use the current
+    * thread's context class loader to locate the WSContractProviderFactory
+    * implementation.
+    * 
+    * @return a new WSContractProvider
+    */
+   public static WSContractProvider newInstance()
+   {
+      return newInstance(Thread.currentThread().getContextClassLoader());
+   }
+   
+   /**
+    * Obtain a new instance of a WSContractProvider. The specified ClassLoader will be used to
+    * locate the WSContractProviderFactory implementation
+    * 
+    * @param loader the ClassLoader to use
+    * @return a new WSContractProvider
+    */
+   public static WSContractProvider newInstance(ClassLoader loader)
+   {
+      WSContractProviderFactory provider = Locator.locate(WSContractProviderFactory.class, PROVIDER_PROPERTY, DEFAULT_PROVIDER, loader);
+      return provider.createGenerator(loader);
+   }
+   
+   /**
+    * Enables/Disables WSDL generation.
+    * 
+    * @param generateWsdl whether or not to generate WSDL
+    */
+   public abstract void setGenerateWsdl(boolean generateWsdl);
+   
+   /**
+    * Enables/Disables Java source generation.
+    * 
+    * @param generateSource whether or not to generate Java source.
+    */
+   public abstract void setGenerateSource(boolean generateSource);
+   
+   /**
+    * Sets the main output directory. If the directory does not exist, it will be created.
+    * 
+    * @param directory the root directory for generated files
+    */
+   public abstract void setOutputDirectory(File directory);
+   
+   /**
+    * Sets the resource directory. This directory will contain any generated
+    * WSDL and XSD files. If the directory does not exist, it will be created.
+    * If not specified, the output directory will be used instead.
+    * 
+    * @param directory the root directory for generated resource files
+    */
+   public abstract void setResourceDirectory(File directory);
+  
+   /**
+    * Sets the source directory. This directory will contain any generated Java source.
+    * If the directory does not exist, it will be created. If not specified, 
+    * the output directory will be used instead.
+    * 
+    * @param directory the root directory for generated source code
+    */
+   public abstract void setSourceDirectory(File directory);
+   
+   /**
+    * Sets the ClassLoader used to discover types. This defaults to the one used
+    * in instantiation.
+    * 
+    * @param loader the ClassLoader to use
+    */
+   public abstract void setClassLoader(ClassLoader loader);
+   
+   /**
+    * Generates artifacts using the current settings. This method may be invoked
+    * more than once (e.g. multiple endpoints).
+    * 
+    * @param endpointClass the name of the endpoint implementation bean
+    * @throws WSException if any error occurs during processing, or the class is not found
+    */
+   public abstract void provide(String endpointClass);
+
+   /**
+    * Generates artifacts using the current settings. This method may be invoked
+    * more than once (e.g. multiple endpoints).
+    * 
+    * @param endpointClass the endpoint implementation bean
+    * @throws WSException if any error occurs during processing
+    */
+   public abstract void provide(Class<?> endpointClass);
+   
+   /**
+    * Sets the PrintStream to use for status feedback. The simplest example
+    * would be to use System.out.
+    * 
+    * <p>Example output:</p> 
+    * <pre>
+    * Generating WSDL: 
+    * TestMeService.wsdl 
+    * Writing Source:
+    * org/jboss/ws/tools/jaxws/TestMe.java
+    * org/jboss/ws/tools/jaxws/TestMeResponse.java 
+    * Writing Classes:
+    * org/jboss/ws/tools/jaxws/TestMe.class
+    * org/jboss/ws/tools/jaxws/TestMeResponse.class
+    * </pre>
+    * @param messageStream  the stream to use for status messages:
+    */
+   public abstract void setMessageStream(PrintStream messageStream);
+}

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/api/WebServiceGenerator.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,150 +0,0 @@
-package org.jboss.ws.tools.jaxws.api;
-
-import java.io.File;
-import java.io.PrintStream;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.tools.jaxws.spi.WebServiceGeneratorProvider;
-
-
-/**
- * WebServiceGenerator is responsible for generating the required portable
- * JAX-WS artifacts for a service endpoint implementation. This includes class
- * files for wrapper types and fault beans. WSDL may be optionally generated as
- * well using this API.
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- * 
- * <p>The following example generates class files, source files and WSDL for an
- * endpoint:</p> 
- * <pre>
- * WebServiceGenerator generator = WebServiceGenerator.newInstance();
- * generator.setGenerateSource(true);
- * generator.setGenerateWsdl(true);
- * generator.setOutputDirectory(new File("output"));
- * generator.setMessageStream(System.out);
- * generator.generate(TestMe.class);
- * </pre>
- * 
- * <p>Thread-Safety:</p>
- * This class expects to be thread-confined, so it can not be shared between threads.
- */
-public abstract class WebServiceGenerator
-{
-   private static String DEFAULT_PROVIDER = "org.jboss.ws.tools.jaxws.impl.WebServiceGeneratorProviderImpl";
-   public static final String PROVIDER_PROPERTY = "org.jboss.ws.tools.jaxws.webServiceGeneratorProvider";
-   
-   protected WebServiceGenerator() 
-   {
-      
-   }
-   
-   /**
-    * Obtain a new instance of a WebServiceGenerator. This will use the current
-    * thread's context class loader to locate the WebServiceGeneratorProvider
-    * implementation.
-    * 
-    * @return a new WebServiceGenerator
-    */
-   public static WebServiceGenerator newInstance()
-   {
-      return newInstance(Thread.currentThread().getContextClassLoader());
-   }
-   
-   /**
-    * Obtain a new instance of a WebServiceGenerator. The specified ClassLoader will be used to
-    * locate the WebServiceGeneratorProvide implementation
-    * 
-    * @param loader the ClassLoader to use
-    * @return a new WebServiceGenerator
-    */
-   public static WebServiceGenerator newInstance(ClassLoader loader)
-   {
-      WebServiceGeneratorProvider provider = ProviderLocator.locate(WebServiceGeneratorProvider.class, PROVIDER_PROPERTY, DEFAULT_PROVIDER, loader);
-      return provider.createGenerator(loader);
-   }
-   
-   /**
-    * Enables/Disables WSDL generation.
-    * 
-    * @param generateWsdl whether or not to generate WSDL
-    */
-   public abstract void setGenerateWsdl(boolean generateWsdl);
-   
-   /**
-    * Enables/Disables Java source generation.
-    * 
-    * @param generateSource whether or not to generate Java source.
-    */
-   public abstract void setGenerateSource(boolean generateSource);
-   
-   /**
-    * Sets the main output directory. If the directory does not exist, it will be created.
-    * 
-    * @param directory the root directory for generated files
-    */
-   public abstract void setOutputDirectory(File directory);
-   
-   /**
-    * Sets the resource directory. This directory will contain any generated
-    * WSDL and XSD files. If the directory does not exist, it will be created.
-    * If not specified, the output directory will be used instead.
-    * 
-    * @param directory the root directory for generated resource files
-    */
-   public abstract void setResourceDirectory(File directory);
-  
-   /**
-    * Sets the source directory. This directory will contain any generated Java source.
-    * If the directory does not exist, it will be created. If not specified, 
-    * the output directory will be used instead.
-    * 
-    * @param directory the root directory for generated source code
-    */
-   public abstract void setSourceDirectory(File directory);
-   
-   /**
-    * Sets the ClassLoader used to discover types. This defaults to the one used
-    * in instantiation.
-    * 
-    * @param loader the ClassLoader to use
-    */
-   public abstract void setClassLoader(ClassLoader loader);
-   
-   /**
-    * Generates artifacts using the current settings. This method may be invoked
-    * more than once (e.g. multiple endpoints).
-    * 
-    * @param endpointClass the name of the endpoint implementation bean
-    * @throws WSException if any error occurs during processing, or the class is not found
-    */
-   public abstract void generate(String endpointClass);
-
-   /**
-    * Generates artifacts using the current settings. This method may be invoked
-    * more than once (e.g. multiple endpoints).
-    * 
-    * @param endpointClass the endpoint implementation bean
-    * @throws WSException if any error occurs during processing
-    */
-   public abstract void generate(Class<?> endpointClass);
-   
-   /**
-    * Sets the PrintStream to use for status feedback. The simplest example
-    * would be to use System.out.
-    * 
-    * <p>Example output:</p> 
-    * <pre>
-    * Generating WSDL: 
-    * TestMeService.wsdl 
-    * Writing Source:
-    * org/jboss/ws/tools/jaxws/TestMe.java
-    * org/jboss/ws/tools/jaxws/TestMeResponse.java 
-    * Writing Classes:
-    * org/jboss/ws/tools/jaxws/TestMe.class
-    * org/jboss/ws/tools/jaxws/TestMeResponse.class
-    * </pre>
-    * @param messageStream  the stream to use for status messages:
-    */
-   public abstract void setMessageStream(PrintStream messageStream);
-}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command)

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java	2007-02-09 23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,235 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.tools.jaxws.command;
-
-import gnu.getopt.Getopt;
-import gnu.getopt.LongOpt;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.tools.jaxws.api.WSContractConsumer;
-
-/**
- * wsconsume is a command line tool that generates portable JAX-WS artifacts
- * from a WSDL file.
- * 
- * <pre>
- *  usage: wsimport [options] &lt;wsdl-urlgt;
- *  options: 
- *  -h, --help                  Show this help message
- *  -b, --binding=&lt;file&gt;        One or more JAX-WS or JAXB binding files 
- *  -k, --keep                  Keep/Generate Java source
- *  -c  --catalog=&lt;file&gt;        Oasis XML Catalog file for entity resolution
- *  -p  --package=&lt;name&gt;        The target package for generated source
- *  -w  --wsdlLocation=&lt;loc&gt;    Value to use for @@WebService.wsdlLocation
- *  -o, --output=&lt;directory&gt;    The directory to put generated artifacts
- *  -s, --source=&lt;directory&gt;    The directory to put Java source
- *  -q, --quiet                 Be somewhat more quiet
- *  -t, --show-traces           Show full exception stack traces
- * </pre>
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- * @version $Revision: 2221 $
- */
-public class wsconsume
-{
-   private List<File> bindingFiles = new ArrayList<File>();
-   private boolean generateSource = false;
-   private File catalog = null;
-   private String targetPackage = null;
-   private String wsdlLocation = null;
-   private boolean quiet = false;
-   private boolean showTraces = false;
-   private File outputDir = new File("output");
-   private File sourceDir = null;
-   
-   public static String PROGRAM_NAME = System.getProperty("program.name", wsconsume.class.getName());
-
-   public static void main(String[] args)
-   {
-      wsconsume importer = new wsconsume();
-      URL wsdl = importer.parseArguments(args);
-      System.exit(importer.importServices(wsdl));
-   }
-   
-   private URL parseArguments(String[] args)
-   {
-      String shortOpts = "hb:kc:p:w:o:s:qt";
-      LongOpt[] longOpts = 
-      {
-         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
-         new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
-         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
-         new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
-         new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
-         new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null, 'w'),
-         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
-         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
-         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
-         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
-      };
-      
-      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
-      int c;
-      while ((c = getopt.getopt()) != -1)
-      {
-         switch (c)
-         {
-            case 'b':
-               bindingFiles.add(new File(getopt.getOptarg()));
-               break;
-            case 'k':
-               generateSource = true;
-               break;
-            case 'c':
-               catalog = new File(getopt.getOptarg());
-               break;
-            case 'p':
-               targetPackage = getopt.getOptarg();
-               break;
-            case 'w':
-               wsdlLocation = getopt.getOptarg();
-               break;
-            case 'o':
-               outputDir = new File(getopt.getOptarg());
-               break;
-            case 's':
-               sourceDir = new File(getopt.getOptarg());
-               break;
-            case 'q':
-               quiet = true;
-               break;
-            case 't':
-               showTraces = true;
-               break;
-            case 'h':
-               printHelp();
-               System.exit(0);
-            case '?':
-               System.exit(1);
-         }
-      }
-      
-      int wsdlPos = getopt.getOptind();
-      if (wsdlPos >= args.length)
-      {
-         System.err.println("Error: WSDL URL was not specified!");
-         printHelp();
-         System.exit(1);
-      }
-      
-      URL url = null;
-      try
-      {
-         try
-         {
-            url = new URL(args[wsdlPos]);
-         }
-         catch (MalformedURLException e)
-         {
-            File file = new File(args[wsdlPos]);
-            url = file.toURL();
-         }
-      }
-      catch (MalformedURLException e)
-      {
-         System.err.println("Error: Invalid URI: " + args[wsdlPos]);
-         System.exit(1);
-      }
-      
-      return url;
-   }
-   
-   
-   private int importServices(URL wsdl)
-   {
-      WSContractConsumer importer = WSContractConsumer.newInstance();
-      importer.setGenerateSource(generateSource);
-      importer.setOutputDirectory(outputDir);
-      if (sourceDir != null)
-         importer.setSourceDirectory(sourceDir);
-
-      if (! quiet)
-         importer.setMessageStream(System.out);
-      
-      if (catalog != null)
-         importer.setCatalog(catalog);
-      
-      if (targetPackage != null)
-         importer.setTargetPackage(targetPackage);
-      
-      if (wsdlLocation != null)
-         importer.setWsdlLocation(wsdlLocation);
-      
-      if (bindingFiles != null && bindingFiles.size() > 0)
-         importer.setBindingFiles(bindingFiles);
-      
-      try
-      {
-         importer.consume(wsdl);
-         return 0;
-      }
-      catch (Throwable t)
-      {
-         System.err.println("Error: Could not import. (use --show-traces to see full traces)");
-         if (!showTraces)
-         {
-            String message = t.getMessage();
-            if (message == null)
-               message = t.getClass().getSimpleName();
-            System.err.println("Error: " + message);
-         }
-         else
-         {
-            t.printStackTrace(System.err);
-         }
-         
-      }
-      
-      return 1;
-   }
-
-   private static void printHelp()
-   {
-      PrintStream out = System.out;
-      out.println("wsconsume is a command line tool that generates portable JAX-WS artifacts from a WSDL file.\n");
-      out.println("usage: " + PROGRAM_NAME + " [options] <wsdl-url>\n");
-      out.println("options: ");
-      out.println("    -h, --help                  Show this help message");
-      out.println("    -b, --binding=<file>        One or more JAX-WS or JAXB binding files ");
-      out.println("    -k, --keep                  Keep/Generate Java source");
-      out.println("    -c  --catalog=<file>        Oasis XML Catalog file for entity resolution");
-      out.println("    -p  --package=<name>        The target package for generated source");
-      out.println("    -w  --wsdlLocation=<loc>    Value to use for @WebService.wsdlLocation");
-      out.println("    -o, --output=<directory>    The directory to put generated artifacts");
-      out.println("    -s, --source=<directory>    The directory to put Java source");
-      out.println("    -q, --quiet                 Be somewhat more quiet");
-      out.println("    -t, --show-traces           Show full exception stack traces");
-      out.flush();
-   }
-}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsconsume.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,235 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.tools.jaxws.command;
+
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.tools.jaxws.api.WSContractConsumer;
+
+/**
+ * wsconsume is a command line tool that generates portable JAX-WS artifacts
+ * from a WSDL file.
+ * 
+ * <pre>
+ *  usage: wsimport [options] &lt;wsdl-urlgt;
+ *  options: 
+ *  -h, --help                  Show this help message
+ *  -b, --binding=&lt;file&gt;        One or more JAX-WS or JAXB binding files 
+ *  -k, --keep                  Keep/Generate Java source
+ *  -c  --catalog=&lt;file&gt;        Oasis XML Catalog file for entity resolution
+ *  -p  --package=&lt;name&gt;        The target package for generated source
+ *  -w  --wsdlLocation=&lt;loc&gt;    Value to use for @@WebService.wsdlLocation
+ *  -o, --output=&lt;directory&gt;    The directory to put generated artifacts
+ *  -s, --source=&lt;directory&gt;    The directory to put Java source
+ *  -q, --quiet                 Be somewhat more quiet
+ *  -t, --show-traces           Show full exception stack traces
+ * </pre>
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @version $Revision: 2221 $
+ */
+public class wsconsume
+{
+   private List<File> bindingFiles = new ArrayList<File>();
+   private boolean generateSource = false;
+   private File catalog = null;
+   private String targetPackage = null;
+   private String wsdlLocation = null;
+   private boolean quiet = false;
+   private boolean showTraces = false;
+   private File outputDir = new File("output");
+   private File sourceDir = null;
+   
+   public static String PROGRAM_NAME = System.getProperty("program.name", wsconsume.class.getName());
+
+   public static void main(String[] args)
+   {
+      wsconsume importer = new wsconsume();
+      URL wsdl = importer.parseArguments(args);
+      System.exit(importer.importServices(wsdl));
+   }
+   
+   private URL parseArguments(String[] args)
+   {
+      String shortOpts = "hb:kc:p:w:o:s:qt";
+      LongOpt[] longOpts = 
+      {
+         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+         new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
+         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
+         new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
+         new LongOpt("package", LongOpt.REQUIRED_ARGUMENT, null, 'p'),
+         new LongOpt("wsdlLocation", LongOpt.REQUIRED_ARGUMENT, null, 'w'),
+         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
+         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
+         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
+      };
+      
+      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
+      int c;
+      while ((c = getopt.getopt()) != -1)
+      {
+         switch (c)
+         {
+            case 'b':
+               bindingFiles.add(new File(getopt.getOptarg()));
+               break;
+            case 'k':
+               generateSource = true;
+               break;
+            case 'c':
+               catalog = new File(getopt.getOptarg());
+               break;
+            case 'p':
+               targetPackage = getopt.getOptarg();
+               break;
+            case 'w':
+               wsdlLocation = getopt.getOptarg();
+               break;
+            case 'o':
+               outputDir = new File(getopt.getOptarg());
+               break;
+            case 's':
+               sourceDir = new File(getopt.getOptarg());
+               break;
+            case 'q':
+               quiet = true;
+               break;
+            case 't':
+               showTraces = true;
+               break;
+            case 'h':
+               printHelp();
+               System.exit(0);
+            case '?':
+               System.exit(1);
+         }
+      }
+      
+      int wsdlPos = getopt.getOptind();
+      if (wsdlPos >= args.length)
+      {
+         System.err.println("Error: WSDL URL was not specified!");
+         printHelp();
+         System.exit(1);
+      }
+      
+      URL url = null;
+      try
+      {
+         try
+         {
+            url = new URL(args[wsdlPos]);
+         }
+         catch (MalformedURLException e)
+         {
+            File file = new File(args[wsdlPos]);
+            url = file.toURL();
+         }
+      }
+      catch (MalformedURLException e)
+      {
+         System.err.println("Error: Invalid URI: " + args[wsdlPos]);
+         System.exit(1);
+      }
+      
+      return url;
+   }
+   
+   
+   private int importServices(URL wsdl)
+   {
+      WSContractConsumer importer = WSContractConsumer.newInstance();
+      importer.setGenerateSource(generateSource);
+      importer.setOutputDirectory(outputDir);
+      if (sourceDir != null)
+         importer.setSourceDirectory(sourceDir);
+
+      if (! quiet)
+         importer.setMessageStream(System.out);
+      
+      if (catalog != null)
+         importer.setCatalog(catalog);
+      
+      if (targetPackage != null)
+         importer.setTargetPackage(targetPackage);
+      
+      if (wsdlLocation != null)
+         importer.setWsdlLocation(wsdlLocation);
+      
+      if (bindingFiles != null && bindingFiles.size() > 0)
+         importer.setBindingFiles(bindingFiles);
+      
+      try
+      {
+         importer.consume(wsdl);
+         return 0;
+      }
+      catch (Throwable t)
+      {
+         System.err.println("Error: Could not import. (use --show-traces to see full traces)");
+         if (!showTraces)
+         {
+            String message = t.getMessage();
+            if (message == null)
+               message = t.getClass().getSimpleName();
+            System.err.println("Error: " + message);
+         }
+         else
+         {
+            t.printStackTrace(System.err);
+         }
+         
+      }
+      
+      return 1;
+   }
+
+   private static void printHelp()
+   {
+      PrintStream out = System.out;
+      out.println("wsconsume is a command line tool that generates portable JAX-WS artifacts from a WSDL file.\n");
+      out.println("usage: " + PROGRAM_NAME + " [options] <wsdl-url>\n");
+      out.println("options: ");
+      out.println("    -h, --help                  Show this help message");
+      out.println("    -b, --binding=<file>        One or more JAX-WS or JAXB binding files ");
+      out.println("    -k, --keep                  Keep/Generate Java source");
+      out.println("    -c  --catalog=<file>        Oasis XML Catalog file for entity resolution");
+      out.println("    -p  --package=<name>        The target package for generated source");
+      out.println("    -w  --wsdlLocation=<loc>    Value to use for @WebService.wsdlLocation");
+      out.println("    -o, --output=<directory>    The directory to put generated artifacts");
+      out.println("    -s, --source=<directory>    The directory to put Java source");
+      out.println("    -q, --quiet                 Be somewhat more quiet");
+      out.println("    -t, --show-traces           Show full exception stack traces");
+      out.flush();
+   }
+}

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java	2007-02-09 23:24:09 UTC (rev 2328)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,225 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.tools.jaxws.command;
-
-import gnu.getopt.Getopt;
-import gnu.getopt.LongOpt;
-
-import java.io.File;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.tools.jaxws.api.WSContractProvider;
-
-/**
- * wsprovide is a command line tool that generates portable JAX-WS artifacts
- * for a service endpoint implementation.
- * 
- * <pre>
- *  usage: wsprovide [options] &lt;endpoint class name&gt;
- *  options: 
- *  -h, --help                  Show this help message
- *  -k, --keep                  Keep/Generate Java source
- *  -w, --wsdl                  Enable WSDL file generation
- *  -c. --classpath             The classpath that contains the endpoint
- *  -o, --output=&lt;directory&gt;    The directory to put generated artifacts
- *  -r, --resource=&lt;directory&gt;  The directory to put resource artifacts
- *  -s, --source=&lt;directory&gt;    The directory to put Java source
- *  -q, --quiet                 Be somewhat more quiet
- *  -t, --show-traces           Show full exception stack traces
- * </pre>
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- * @version $Revision: 2164 $
- */
-public class wsprovide
-{
-   private boolean generateSource = false;
-   private boolean generateWsdl = false;
-   private boolean quiet = false;
-   private boolean showTraces = false;
-   private ClassLoader loader = Thread.currentThread().getContextClassLoader();
-   private File outputDir = new File("output");
-   private File resourceDir = null;
-   private File sourceDir = null;
-   
-   public static String PROGRAM_NAME = System.getProperty("program.name", wsprovide.class.getSimpleName());
-
-   public static void main(String[] args)
-   {
-      wsprovide generate = new wsprovide();
-      String endpoint = generate.parseArguments(args);
-      System.exit(generate.generate(endpoint));
-   }
-   
-   private String parseArguments(String[] args)
-   {
-      String shortOpts = "hwko:r:s:cqt";
-      LongOpt[] longOpts = 
-      {
-         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
-         new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
-         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
-         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
-         new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
-         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
-         new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
-         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
-         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
-      };
-      
-      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
-      int c;
-      while ((c = getopt.getopt()) != -1)
-      {
-         switch (c)
-         {
-            case 'k':
-               generateSource = true;
-               break;
-            case 's':
-               sourceDir = new File(getopt.getOptarg());
-               break;
-            case 'r':
-               resourceDir = new File(getopt.getOptarg());
-               break;
-            case 'w':
-               generateWsdl = true;
-               break;
-            case 't':
-               showTraces = true;
-               break;
-            case 'o':
-               outputDir = new File(getopt.getOptarg());
-               break;
-            case 'q':
-               quiet = true;
-               break;
-            case 'c':
-               processClassPath(getopt.getOptarg());
-               break;
-            case 'h':
-               printHelp();
-               System.exit(0);
-            case '?':
-               System.exit(1);
-         }
-      }
-      
-      int endpointPos = getopt.getOptind();
-      if (endpointPos >= args.length)
-      {
-         System.err.println("Error: endpoint implementation was not specified!");
-         printHelp();
-         System.exit(1);
-      }
-      
-      return args[endpointPos];
-   }
-   
-   
-   private int generate(String endpoint)
-   {
-      if (!JavaUtils.isLoaded(endpoint, loader))
-      {
-         System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
-         return 1;
-      }
-      
-      WSContractProvider gen = WSContractProvider.newInstance(loader);
-      gen.setGenerateWsdl(generateWsdl);
-      gen.setGenerateSource(generateSource);
-      gen.setOutputDirectory(outputDir);
-      if (resourceDir != null)
-         gen.setResourceDirectory(resourceDir);
-      if (sourceDir != null)
-         gen.setSourceDirectory(sourceDir);
-
-      if (! quiet)
-         gen.setMessageStream(System.out);
-      
-      try
-      {
-         gen.provide(endpoint);
-         return 0;
-      }
-      catch (Throwable t)
-      {
-         System.err.println("Error: Could not generate. (use --show-traces to see full traces)");
-         if (!showTraces)
-         {
-            String message = t.getMessage();
-            if (message == null)
-               message = t.getClass().getSimpleName();
-            System.err.println("Error: " + message);
-         }
-         else
-         {
-            t.printStackTrace(System.err);
-         }
-         
-      }
-      
-      return 1;
-   }
-
-   private void processClassPath(String classPath)
-   {
-      String[] entries =  classPath.split(File.pathSeparator);
-      List<URL> urls= new ArrayList<URL>(entries.length);
-      for (String entry : entries)
-      {
-         try 
-         {
-            urls.add(new File(entry).toURL());
-         }
-         catch (MalformedURLException e)
-         {
-            System.err.println("Error: a classpath entry was malformed: " + entry);
-         }
-      }
-      loader = new URLClassLoader(urls.toArray(new URL[0]), loader);
-   }
-
-   private static void printHelp()
-   {
-      PrintStream out = System.out;
-      out.println("wsprovide generates portable JAX-WS artifacts for an endpoint implementation.\n");
-      out.println("usage: " + PROGRAM_NAME + " [options] <endpoint class name>\n");
-      out.println("options: ");
-      out.println("    -h, --help                  Show this help message");
-      out.println("    -k, --keep                  Keep/Generate Java source");
-      out.println("    -w, --wsdl                  Enable WSDL file generation");
-      out.println("    -c. --classpath             The classpath that contains the endpoint");
-      out.println("    -o, --output=<directory>    The directory to put generated artifacts");
-      out.println("    -r, --resource=<directory>  The directory to put resource artifacts");
-      out.println("    -s, --source=<directory>    The directory to put Java source");
-      out.println("    -q, --quiet                 Be somewhat more quiet");
-      out.println("    -t, --show-traces           Show full exception stack traces");
-      out.flush();
-   }
-}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/command/wsprovide.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,225 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.tools.jaxws.command;
+
+import gnu.getopt.Getopt;
+import gnu.getopt.LongOpt;
+
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+
+/**
+ * wsprovide is a command line tool that generates portable JAX-WS artifacts
+ * for a service endpoint implementation.
+ * 
+ * <pre>
+ *  usage: wsprovide [options] &lt;endpoint class name&gt;
+ *  options: 
+ *  -h, --help                  Show this help message
+ *  -k, --keep                  Keep/Generate Java source
+ *  -w, --wsdl                  Enable WSDL file generation
+ *  -c. --classpath             The classpath that contains the endpoint
+ *  -o, --output=&lt;directory&gt;    The directory to put generated artifacts
+ *  -r, --resource=&lt;directory&gt;  The directory to put resource artifacts
+ *  -s, --source=&lt;directory&gt;    The directory to put Java source
+ *  -q, --quiet                 Be somewhat more quiet
+ *  -t, --show-traces           Show full exception stack traces
+ * </pre>
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @version $Revision: 2164 $
+ */
+public class wsprovide
+{
+   private boolean generateSource = false;
+   private boolean generateWsdl = false;
+   private boolean quiet = false;
+   private boolean showTraces = false;
+   private ClassLoader loader = Thread.currentThread().getContextClassLoader();
+   private File outputDir = new File("output");
+   private File resourceDir = null;
+   private File sourceDir = null;
+   
+   public static String PROGRAM_NAME = System.getProperty("program.name", wsprovide.class.getSimpleName());
+
+   public static void main(String[] args)
+   {
+      wsprovide generate = new wsprovide();
+      String endpoint = generate.parseArguments(args);
+      System.exit(generate.generate(endpoint));
+   }
+   
+   private String parseArguments(String[] args)
+   {
+      String shortOpts = "hwko:r:s:cqt";
+      LongOpt[] longOpts = 
+      {
+         new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
+         new LongOpt("wsdl", LongOpt.NO_ARGUMENT, null, 'w'),
+         new LongOpt("keep", LongOpt.NO_ARGUMENT, null, 'k'),
+         new LongOpt("output", LongOpt.REQUIRED_ARGUMENT, null, 'o'),
+         new LongOpt("resource", LongOpt.REQUIRED_ARGUMENT, null, 'r'),
+         new LongOpt("source", LongOpt.REQUIRED_ARGUMENT, null, 's'),
+         new LongOpt("classpath", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
+         new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
+         new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
+      };
+      
+      Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
+      int c;
+      while ((c = getopt.getopt()) != -1)
+      {
+         switch (c)
+         {
+            case 'k':
+               generateSource = true;
+               break;
+            case 's':
+               sourceDir = new File(getopt.getOptarg());
+               break;
+            case 'r':
+               resourceDir = new File(getopt.getOptarg());
+               break;
+            case 'w':
+               generateWsdl = true;
+               break;
+            case 't':
+               showTraces = true;
+               break;
+            case 'o':
+               outputDir = new File(getopt.getOptarg());
+               break;
+            case 'q':
+               quiet = true;
+               break;
+            case 'c':
+               processClassPath(getopt.getOptarg());
+               break;
+            case 'h':
+               printHelp();
+               System.exit(0);
+            case '?':
+               System.exit(1);
+         }
+      }
+      
+      int endpointPos = getopt.getOptind();
+      if (endpointPos >= args.length)
+      {
+         System.err.println("Error: endpoint implementation was not specified!");
+         printHelp();
+         System.exit(1);
+      }
+      
+      return args[endpointPos];
+   }
+   
+   
+   private int generate(String endpoint)
+   {
+      if (!JavaUtils.isLoaded(endpoint, loader))
+      {
+         System.err.println("Error: Could not load class [" + endpoint + "]. Did you specify a valid --classpath?");
+         return 1;
+      }
+      
+      WSContractProvider gen = WSContractProvider.newInstance(loader);
+      gen.setGenerateWsdl(generateWsdl);
+      gen.setGenerateSource(generateSource);
+      gen.setOutputDirectory(outputDir);
+      if (resourceDir != null)
+         gen.setResourceDirectory(resourceDir);
+      if (sourceDir != null)
+         gen.setSourceDirectory(sourceDir);
+
+      if (! quiet)
+         gen.setMessageStream(System.out);
+      
+      try
+      {
+         gen.provide(endpoint);
+         return 0;
+      }
+      catch (Throwable t)
+      {
+         System.err.println("Error: Could not generate. (use --show-traces to see full traces)");
+         if (!showTraces)
+         {
+            String message = t.getMessage();
+            if (message == null)
+               message = t.getClass().getSimpleName();
+            System.err.println("Error: " + message);
+         }
+         else
+         {
+            t.printStackTrace(System.err);
+         }
+         
+      }
+      
+      return 1;
+   }
+
+   private void processClassPath(String classPath)
+   {
+      String[] entries =  classPath.split(File.pathSeparator);
+      List<URL> urls= new ArrayList<URL>(entries.length);
+      for (String entry : entries)
+      {
+         try 
+         {
+            urls.add(new File(entry).toURL());
+         }
+         catch (MalformedURLException e)
+         {
+            System.err.println("Error: a classpath entry was malformed: " + entry);
+         }
+      }
+      loader = new URLClassLoader(urls.toArray(new URL[0]), loader);
+   }
+
+   private static void printHelp()
+   {
+      PrintStream out = System.out;
+      out.println("wsprovide generates portable JAX-WS artifacts for an endpoint implementation.\n");
+      out.println("usage: " + PROGRAM_NAME + " [options] <endpoint class name>\n");
+      out.println("options: ");
+      out.println("    -h, --help                  Show this help message");
+      out.println("    -k, --keep                  Keep/Generate Java source");
+      out.println("    -w, --wsdl                  Enable WSDL file generation");
+      out.println("    -c. --classpath             The classpath that contains the endpoint");
+      out.println("    -o, --output=<directory>    The directory to put generated artifacts");
+      out.println("    -r, --resource=<directory>  The directory to put resource artifacts");
+      out.println("    -s, --source=<directory>    The directory to put Java source");
+      out.println("    -q, --quiet                 Be somewhat more quiet");
+      out.println("    -t, --show-traces           Show full exception stack traces");
+      out.flush();
+   }
+}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderFactoryImpl.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.tools.jaxws.impl;
+
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+import org.jboss.ws.tools.jaxws.spi.WSContractProviderFactory;
+
+public class WSContractProviderFactoryImpl implements WSContractProviderFactory
+{
+   public WSContractProvider createGenerator(ClassLoader loader)
+   {
+      WSContractProviderImpl impl = new WSContractProviderImpl();
+      impl.setClassLoader(loader);
+      return impl;
+   }
+}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WSContractProviderImpl.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,183 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.ws.tools.jaxws.impl;
+
+import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3;
+import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import javax.ejb.Stateless;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
+import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+
+/**
+ * The provided implementation of a WSContractProvider.
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ */
+final class WSContractProviderImpl extends WSContractProvider
+{
+   private ClassLoader loader;
+   private boolean generateWsdl = false;
+   private boolean generateSource = false;
+   private File outputDir = new File("output");
+   private File resourceDir = null;
+   private File sourceDir = null;
+   private PrintStream messageStream = new NullPrintStream();
+   
+   private void createDirectories(File resourceDir, File sourceDir)
+   {
+      if (!outputDir.exists())
+         if (!outputDir.mkdirs())
+            throw new WSException("Could not create directory: " + outputDir);
+      
+      if (generateWsdl && !resourceDir.exists())
+         if (!resourceDir.mkdirs())
+            throw new WSException("Could not create directory: " + resourceDir);
+      
+      if (generateSource && !sourceDir.exists())
+         if (!sourceDir.mkdirs())
+            throw new WSException("Could not create directory: " + sourceDir);
+   }
+
+   private UnifiedDeploymentInfo createUDI(Class<?> endpointClass, ClassLoader loader)
+   {
+      DeploymentType type = (endpointClass.isAnnotationPresent(Stateless.class)) ? JAXWS_EJB3 : JAXWS_JSE;
+      UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(type)
+      {
+         @Override
+         public URL getMetaDataFileURL(String resourcePath) throws IOException
+         {
+            return null;
+         }
+      };
+      udi.classLoader = loader;
+      return udi;
+   }
+
+   @Override
+   public void provide(Class<?> endpointClass)
+   {
+      // Use the output directory as the default
+      File resourceDir = (this.resourceDir != null) ? this.resourceDir : outputDir;
+      File sourceDir = (this.sourceDir != null) ? this.sourceDir : outputDir;
+      
+      createDirectories(resourceDir, sourceDir);
+      
+      // Create a dummy classloader to catch generated classes
+      ClassLoader loader = new URLClassLoader(new URL[0], this.loader);
+      UnifiedMetaData umd = new UnifiedMetaData(new ResourceLoaderAdapter(loader));
+      umd.setClassLoader(loader);
+      
+      ChainedWritableWrapperGenerator generator = new ChainedWritableWrapperGenerator();
+      if (generateSource)
+         generator.add(new SourceWrapperGenerator(loader, messageStream), sourceDir);
+      generator.add(new BytecodeWrapperGenerator(loader, messageStream), outputDir);
+      
+      JAXWSWebServiceMetaDataBuilder builder = new JAXWSWebServiceMetaDataBuilder();
+      builder.setWrapperGenerator(generator);
+      builder.setGenerateWsdl(generateWsdl);
+      builder.setToolMode(true);
+      builder.setWsdlDirectory(resourceDir);
+      builder.setMessageStream(messageStream);
+      
+      if (generateWsdl)
+         messageStream.println("Generating WSDL:");
+
+      UnifiedDeploymentInfo udi = createUDI(endpointClass, loader);
+      builder.buildWebServiceMetaData(umd, udi, endpointClass, null);
+      try
+      {
+         generator.write();
+      }
+      catch (IOException io)
+      {
+         throw new WSException("Could not write output files:", io);
+      }
+   }
+
+   @Override
+   public void provide(String endpointClass)
+   {
+      try
+      {
+         provide(loader.loadClass(endpointClass));
+      }
+      catch (ClassNotFoundException e)
+      {
+         throw new WSException("Class not found: " + endpointClass);
+      }
+   }
+
+   @Override
+   public void setClassLoader(ClassLoader loader)
+   {
+      this.loader = loader;
+   }
+
+   @Override
+   public void setGenerateWsdl(boolean generateWsdl)
+   {
+      this.generateWsdl = generateWsdl;
+   }
+
+   @Override
+   public void setOutputDirectory(File directory)
+   {
+      outputDir = directory;
+   }
+
+   @Override
+   public void setGenerateSource(boolean generateSource)
+   {
+      this.generateSource = generateSource;
+   }
+   
+   @Override
+   public void setResourceDirectory(File directory)
+   {
+      resourceDir = directory;
+   }
+
+   @Override
+   public void setSourceDirectory(File directory)
+   {
+      sourceDir = directory;
+   }
+
+   @Override
+   public void setMessageStream(PrintStream messageStream)
+   {
+      this.messageStream = messageStream;
+   }
+}

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorImpl.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,167 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.tools.jaxws.impl;
-
-import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3;
-import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.URL;
-
-import javax.ejb.Stateless;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
-import org.jboss.ws.metadata.umdm.ResourceLoaderAdapter;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-
-/**
- * The provided implementation of a WebServiceGenerator.
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- */
-final class WebServiceGeneratorImpl extends WebServiceGenerator
-{
-   private ClassLoader loader;
-   private boolean generateWsdl = false;
-   private boolean generateSource = false;
-   private File outputDir = new File("output");
-   private File resourceDir = outputDir;
-   private File sourceDir = outputDir;
-   private PrintStream messageStream = new NullPrintStream();
-   
-   @Override
-   public void generate(Class<?> endpointClass)
-   {
-      if (!outputDir.exists())
-         if (!outputDir.mkdirs())
-            throw new WSException("Could not create directory: " + outputDir);
-      
-      if (generateWsdl && !resourceDir.exists())
-         if (!resourceDir.mkdirs())
-            throw new WSException("Could not create directory: " + resourceDir);
-      
-      
-      if (generateSource && !sourceDir.exists())
-         if (!sourceDir.mkdirs())
-            throw new WSException("Could not create directory: " + sourceDir);
-      
-      DeploymentType type = (endpointClass.isAnnotationPresent(Stateless.class)) ? JAXWS_EJB3 : JAXWS_JSE;
-      UnifiedDeploymentInfo udi = new UnifiedDeploymentInfo(type)
-      {
-         @Override
-         public URL getMetaDataFileURL(String resourcePath) throws IOException
-         {
-            return null;
-         }
-      };
-      udi.classLoader = loader;
-      
-      UnifiedMetaData umd = new UnifiedMetaData(new ResourceLoaderAdapter(loader));
-      umd.setClassLoader(loader);
-      
-      ChainedWritableWrapperGenerator generator = new ChainedWritableWrapperGenerator();
-      if (generateSource)
-         generator.add(new SourceWrapperGenerator(loader, messageStream), sourceDir);
-      generator.add(new BytecodeWrapperGenerator(loader, messageStream), outputDir);
-      
-      JAXWSWebServiceMetaDataBuilder builder = new JAXWSWebServiceMetaDataBuilder();
-      builder.setWrapperGenerator(generator);
-      builder.setGenerateWsdl(generateWsdl);
-      builder.setToolMode(true);
-      builder.setWsdlDirectory(resourceDir);
-      builder.setMessageStream(messageStream);
-      
-      if (generateWsdl)
-         messageStream.println("Generating WSDL:");
-      
-      builder.buildWebServiceMetaData(umd, udi, endpointClass, null);
-      try
-      {
-         generator.write();
-      }
-      catch (IOException io)
-      {
-         throw new WSException("Could not write output files:", io);
-      }
-   }
-
-   @Override
-   public void generate(String endpointClass)
-   {
-      try
-      {
-         generate(loader.loadClass(endpointClass));
-      }
-      catch (ClassNotFoundException e)
-      {
-         throw new WSException("Class not found: " + endpointClass);
-      }
-   }
-
-   @Override
-   public void setClassLoader(ClassLoader loader)
-   {
-      this.loader = loader;
-   }
-
-   @Override
-   public void setGenerateWsdl(boolean generateWsdl)
-   {
-      this.generateWsdl = generateWsdl;
-   }
-
-   @Override
-   public void setOutputDirectory(File directory)
-   {
-      outputDir = directory;
-   }
-
-   @Override
-   public void setGenerateSource(boolean generateSource)
-   {
-      this.generateSource = generateSource;
-   }
-   
-   @Override
-   public void setResourceDirectory(File directory)
-   {
-      resourceDir = directory;
-   }
-
-   @Override
-   public void setSourceDirectory(File directory)
-   {
-      sourceDir = directory;
-   }
-
-   @Override
-   public void setMessageStream(PrintStream messageStream)
-   {
-      this.messageStream = messageStream;
-   }
-}

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/WebServiceGeneratorProviderImpl.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.tools.jaxws.impl;
-
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-import org.jboss.ws.tools.jaxws.spi.WebServiceGeneratorProvider;
-
-public class WebServiceGeneratorProviderImpl implements WebServiceGeneratorProvider
-{
-   public WebServiceGenerator createGenerator(ClassLoader loader)
-   {
-      WebServiceGeneratorImpl impl = new WebServiceGeneratorImpl();
-      impl.setClassLoader(loader);
-      return impl;
-   }
-}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractConsumerFactory.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.tools.jaxws.spi;
+
+import org.jboss.ws.tools.jaxws.api.WSContractConsumer;
+
+/**
+ * WSContractConsumerFactory defines the contract for a WSContractConsumer factory.
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ */
+public interface WSContractConsumerFactory
+{
+   /**
+    * Create a new WSContractConsumer. There are no restrictions on how this
+    * should be performed. 
+    * 
+    * @return a new WSContractConsumer
+    */
+   public WSContractConsumer createImporter();
+}

Copied: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java (from rev 2328, trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java)
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WSContractProviderFactory.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ws.tools.jaxws.spi;
+
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+
+/**
+ * WSContractProviderFactory defines the contract for a WSContractProvider factory.
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ */
+public interface WSContractProviderFactory
+{
+   /**
+    * Create a new WSContractProvider. There are no restrictions on how this
+    * should be performed. The passed ClassLoader is the one used in
+    * {@link WSContractProvider#newInstance(ClassLoader)}. This loader
+    * should be made available to the generated WSContractProvider.
+    * 
+    * @param loader the ClassLoader for type discovery
+    * @return a new WSContractProvider
+    */
+   public WSContractProvider createGenerator(ClassLoader loader);
+}

Deleted: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/spi/WebServiceGeneratorProvider.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ws.tools.jaxws.spi;
-
-import org.jboss.ws.tools.jaxws.api.WebServiceGenerator;
-
-/**
- * WebServiceGeneratorProvider defines the contract for a WebServiceGenerator provider.
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- */
-public interface WebServiceGeneratorProvider
-{
-   /**
-    * Create a new WebServiceGenerator. There are no restrictions on how this
-    * should be performed. The passed ClassLoader is the one used in
-    * {@link WebServiceGenerator#newInstance(ClassLoader)}. This loader
-    * should be made available to the generated WebServiceGenerator.
-    * 
-    * @param loader the ClassLoader for type discovery
-    * @return a new WebServiceGenerator
-    */
-   public WebServiceGenerator createGenerator(ClassLoader loader);
-}

Modified: branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java	2007-02-10 06:02:20 UTC (rev 2331)
+++ branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -459,7 +459,9 @@
       StringBuilder bodyParts = new StringBuilder();
       if (Constants.DOCUMENT_LITERAL == wsdlStyle)
       {
-         bodyParts.append(reference.getPartName());
+         // Empty bare body
+         if (reference.getPartName() != null)
+            bodyParts.append(reference.getPartName());
       }
       else
       {

Added: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java	                        (rev 0)
+++ branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java	2007-02-10 06:04:23 UTC (rev 2332)
@@ -0,0 +1,156 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.ws.tools.jaxws;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.jaxws.samples.soapbinding.DocWrappedServiceImpl;
+import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrder;
+import org.jboss.test.ws.jaxws.samples.soapbinding.PurchaseOrderAck;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.tools.jaxws.api.WSContractProvider;
+import org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory;
+
+/**
+ * Tests the WSContractProvider API.
+ * 
+ * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
+ * @version $Revision$
+ */
+public class WSContractProviderTestCase extends JBossWSTest
+{
+   public void testBasic() throws Exception
+   {
+      WSContractProvider gen = getGenerator();
+      File outputDir = new File("tools/wsprovide/basic/out");
+      gen.setOutputDirectory(outputDir);
+      gen.provide(DocWrappedServiceImpl.class);
+      
+      checkWrapperClasses(outputDir);
+   
+      // There should be no source code
+      checkWrapperSource(outputDir, false);
+   }
+
+   private WSContractProvider getGenerator()
+   {
+      return WSContractProvider.newInstance();
+   }
+
+   private void checkWrapperSource(File outputDir, boolean shouldExist)
+   {
+      File file1 = new File(outputDir, "org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPO.java");
+      File file2 = new File(outputDir, "org/jboss/test/ws/jaxws/samples/soapbinding/jaxws/SubmitPOResponse.java");
+      assertEquals(shouldExist, file1.exists());
+      assertEquals(shouldExist, file2.exists());
+   }
+
+   private void checkWrapperClasses(File outputDir) throws MalformedURLException, ClassNotFoundException, NoSuchMethodException
+   {
+      // Use a different loader each time to make sure the files exist
+      URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDir.toURL()}, Thread.currentThread().getContextClassLoader());
+      
+      // Check request wrapper
+      Class wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.jaxws.samples.soapbinding.jaxws.SubmitPO", classLoader);      
+      wrapper.getMethod("setPurchaseOrder", PurchaseOrder.class);
+      assertEquals(PurchaseOrder.class.getName(), wrapper.getMethod("getPurchaseOrder").getReturnType().getName());
+      
+      // Check response wrapper
+      wrapper = JavaUtils.loadJavaType("org.jboss.test.ws.jaxws.samples.soapbinding.jaxws.SubmitPOResponse", classLoader);
+      wrapper.getMethod("setPurchaseOrderAck", PurchaseOrderAck.class);
+      assertEquals(PurchaseOrderAck.class.getName(), wrapper.getMethod("getPurchaseOrderAck").getReturnType().getName());
+   }
+   
+   public void testSource() throws Exception
+   {
+      WSContractProvider gen = getGenerator();
+      File outputDir = new File("tools/wsprovide/source/out");
+      gen.setOutputDirectory(outputDir);
+      gen.setGenerateSource(true);
+      gen.provide(DocWrappedServiceImpl.class);
+      
+      checkWrapperClasses(outputDir);
+      checkWrapperSource(outputDir, true);
+   }
+   
+   public void testSourceDir() throws Exception
+   {
+      WSContractProvider gen = getGenerator();
+      File outputDir = new File("tools/wsprovide/sourcedir/out");
+      File sourceDir = new File("tools/wsprovide/sourcedir/source");
+      
+      gen.setOutputDirectory(outputDir);
+      gen.setSourceDirectory(sourceDir);
+      gen.setGenerateSource(true);
+      gen.provide(DocWrappedServiceImpl.class);
+      
+      checkWrapperClasses(outputDir);
+      checkWrapperSource(outputDir, false);
+      checkWrapperSource(sourceDir, true);
+   }
+   
+   public void testWsdl() throws Exception
+   {
+      WSContractProvider gen = getGenerator();
+      File outputDir = new File("tools/wsprovide/wsdl/out");
+      gen.setOutputDirectory(outputDir);
+      gen.setGenerateWsdl(true);
+      gen.provide(DocWrappedServiceImpl.class);
+      
+      checkWrapperClasses(outputDir);
+   
+      // There should be no source code
+      checkWrapperSource(outputDir, false);
+      
+      File wsdlFile = new File(outputDir, "DocWrappedService.wsdl");
+      WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
+      wsdlFactory.parse(wsdlFile.toURL());
+   }
+   
+   public void testResourceDir() throws Exception
+   {
+      WSContractProvider gen = getGenerator();
+      File outputDir = new File("tools/wsprovide/resourcedir/out");
+      File wsdlDir = new File("tools/wsprovide/resourcedir/wsdl");
+      gen.setOutputDirectory(outputDir);
+      gen.setResourceDirectory(wsdlDir);
+      gen.setGenerateWsdl(true);
+      gen.provide(DocWrappedServiceImpl.class);
+      
+      checkWrapperClasses(outputDir);
+   
+      // There should be no source code
+      checkWrapperSource(outputDir, false);
+      
+      String wsdlName = "DocWrappedService.wsdl";
+      File wsdlFile = new File(outputDir, wsdlName);
+      assertFalse(wsdlFile.exists());
+      
+      wsdlFile = new File(wsdlDir, wsdlName);
+      WSDLDefinitionsFactory wsdlFactory = WSDLDefinitionsFactory.newInstance();
+      wsdlFactory.parse(wsdlFile.toURL());
+   }
+}
\ No newline at end of file


Property changes on: branches/jbossws-1.2.0/jbossws-tests/src/main/java/org/jboss/test/ws/tools/jaxws/WSContractProviderTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jbossws-commits mailing list