You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/12/19 22:42:34 UTC

svn commit: r357809 - in /beehive/trunk/system-controls/test/webservice: ./ jcxgen-tests/ junit/ junit/src/ junit/tests/ junit/wsdl/ junit/wsdls/ schemas/ servers/webapp/ tests/ webapp/ webapp/src/ webapp/src/attachments/ webapp/src/handlers/ webapp/sr...

Author: ekoneil
Date: Mon Dec 19 13:42:22 2005
New Revision: 357809

URL: http://svn.apache.org/viewcvs?rev=357809&view=rev
Log:
Rewire the WSC tests.  This was just silly complicated, now, there's a webapp directory that contains all of the tests and sources for a WSC webapp tested against web services running in Axis.  README coming with more info.

BB: self
Test: WSC pass


Added:
    beehive/trunk/system-controls/test/webservice/junit/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/jcxgen-tests/
    beehive/trunk/system-controls/test/webservice/junit/src/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/jcxgen-tests/tests/
    beehive/trunk/system-controls/test/webservice/junit/wsdl/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/jcxgen-tests/wsdls/
    beehive/trunk/system-controls/test/webservice/webapp/
    beehive/trunk/system-controls/test/webservice/webapp/src/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/src/
    beehive/trunk/system-controls/test/webservice/webapp/src/attachments/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/webservices/attachments/
    beehive/trunk/system-controls/test/webservice/webapp/src/handlers/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/webservices/handlers/
    beehive/trunk/system-controls/test/webservice/webapp/src/header/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/webservices/header/
    beehive/trunk/system-controls/test/webservice/webapp/src/soapMarshalling/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/webservices/soapMarshalling/
    beehive/trunk/system-controls/test/webservice/webapp/src/web/complex/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/webservices/web/complex/
    beehive/trunk/system-controls/test/webservice/webapp/src/web/complex3/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/webservices/web/complex3/
    beehive/trunk/system-controls/test/webservice/webapp/src/web/webparam/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/WEB-INF/webservices/web/webparam/
    beehive/trunk/system-controls/test/webservice/webapp/tests/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/tests/
    beehive/trunk/system-controls/test/webservice/webapp/web/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/servers/webapp/
    beehive/trunk/system-controls/test/webservice/webapp/wsdl/
      - copied from r357770, beehive/trunk/system-controls/test/webservice/schemas/
Removed:
    beehive/trunk/system-controls/test/webservice/jcxgen-tests/
    beehive/trunk/system-controls/test/webservice/junit/tests/
    beehive/trunk/system-controls/test/webservice/junit/wsdls/
    beehive/trunk/system-controls/test/webservice/schemas/
    beehive/trunk/system-controls/test/webservice/servers/webapp/
    beehive/trunk/system-controls/test/webservice/tests/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/src/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/webservices/attachments/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/webservices/handlers/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/webservices/header/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/webservices/soapMarshalling/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/webservices/web/complex/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/webservices/web/complex3/
    beehive/trunk/system-controls/test/webservice/webapp/web/WEB-INF/webservices/web/webparam/
Modified:
    beehive/trunk/system-controls/test/webservice/build.xml
    beehive/trunk/system-controls/test/webservice/junit/build.xml

Modified: beehive/trunk/system-controls/test/webservice/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/build.xml?rev=357809&r1=357808&r2=357809&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/build.xml (original)
+++ beehive/trunk/system-controls/test/webservice/build.xml Mon Dec 19 13:42:22 2005
@@ -17,6 +17,38 @@
   
    $Header:$
 -->
+
+<!--
+todo: 
+  - create the following directory structure:
+    webapps/
+        serviceControlTestWeb/ (yes, this name is different)
+            build.xml
+            src/
+            web/
+            tests/
+            wsdl/
+    and move the tests requiring a container into this model.  Will be a bit of work, but it's nicely
+    encapsulated and will be easeier to load into IDEA (etc).
+  - rationalize the build/ directory, ie: what relates to what?  encapsulation is a good thing.
+  - fixup the web application's structure
+  - rename .jws to .java files (all of them!)
+  - add documentation to the tests
+  - tests use assertEquals rather than assertTrue
+  - add READMEs to the sub-directories
+  - decompose /build.xml so that the standalone JUnit and container JUnit tests can be run individually 
+  - convert WEB-INF/src/log4j.properties to WEB-INF/src/log4j.xml
+  - merge webapp's webservices/ and src/ directories
+  - provide a web application build file
+  - container tests:
+    - cleanup source files (optimize and order imports, etc)
+  - change all "jcx" names to "wsc".  "jcx" doesn't mean anything specific
+  - get the service control tests working in an IDE with JUnit (might not be possible because of the 
+    generated source files, but if they exist, it would be *awesome* if this worked.
+  - port web service controls onto Controls test infrastructure
+  - bug: service control needs to hide its own annotations
+  - create real index.jsp page that finds all of the web services in the web application and displays links to them
+  -->
 <project name="Beehive/Controls/System/WebService/Tests" default="drt" basedir=".">
 
     <property environment="os"/>
@@ -24,30 +56,22 @@
     <import file="../../systemcontrols-imports.xml"/>
 
     <!-- client properties -->
-    <property name="junit-source.dir" location="tests"/>
     <property name="build.root.dir" location="build"/>
     <property name="client.build" location="${build.root.dir}/client"/>
+    <property name="build.fetchedwsdl.dir" location="${client.build}/wsdls"/>
+    <property name="junit-source.dir" location="webapp/tests"/>
+    <property name="webapp.build.dir" location="${build.root.dir}/webapp"/>
+
     <property name="client.beansrc" location="${client.build}/beansrc"/>
     <property name="client.axisgen" location="${client.build}/axisgen"/>
     <property name="client.xmlbeangen" location="${client.build}/xmlbeangen"/>
     <property name="client.classes" location="${client.build}/classes"/>
-    <property name="client.wsdls" location="${client.build}/wsdls"/>
-    <property name="wsdls.dir" location="schemas"/>
+    <property name="wsdls.dir" location="webapp/wsdl"/>
     <property name="rpc.encoded.wsdls.dir" location="${wsdls.dir}/rpcEncoded"/>
     <property name="client.jcxgensrc" location="${client.build}/jcxsrc"/>
     <property name="client.jcxgen.packageName" value="test"/>
 
-    <!-- webapp properties -->
-    <property name="webapp.template.dir" location="servers/webapp"/>
-    <property name="webapp.build.dir" location="${build.root.dir}/webapp"/>
-    <property name="webapp.lib" location="${webapp.build.dir}/WEB-INF/lib"/>
-    <property name="webapp.src" location="${webapp.build.dir}/WEB-INF/src"/>
-    <property name="webapp.schemas" location="${webapp.build.dir}/WEB-INF/schemas"/>
-    <property name="webapp.ws.src" location="${webapp.build.dir}/WEB-INF/webservices"/>
-    <property name="webapp.beansrc" location="${webapp.build.dir}/WEB-INF/beansrc"/>
-    <property name="webapp.classes" location="${webapp.build.dir}/WEB-INF/classes"/>
-
-    <!-- runtime -->
+    <!-- Properties used for server testing -->
     <property name="log.dir" location="${build.root.dir}/logs"/>
     <property name="context.path" value="ServiceControlDRT"/>
     <property name="waitfor.url" value="http://localhost:8080/index.jsp"/>
@@ -76,24 +100,29 @@
         <pathelement location="external/geronimo-spec-javamail-1.3.1-rc6.jar"/>
     </path>
 
-    <target name="build" description="Build the web service control tests">
-        <ant dir="jcxgen-tests" target="build" inheritAll="false"/>
-        <antcall target="build-webapp"/>
-        <antcall target="build-client"/>
-    </target>
-
     <!-- =================================================================== -->
     <!-- drt - run the webservice control DRTs                               -->
     <!-- =================================================================== -->
     <target name="drt" description="Clean, build, and run the web service control drts.">
-
         <antcall target="clean"/>
-        <antcall target="build-webapp"/>
+        <antcall target="test.junit"/>
+        <antcall target="build.webapp"/>
+        <antcall target="test.server"/>
+    </target>
 
-        <ant dir="jcxgen-tests" target="drt" inheritAll="false"/>
+    <target name="test.junit" description="Run the WSC JUnit tests">
+        <echo message="--------------------------------------------------"/>
+        <echo message="|     Start WSC JUnit tests                      |"/>
+        <echo message="--------------------------------------------------"/>
+        <ant dir="junit" target="drt" inheritAll="false"/>
+        <echo message="--------------------------------------------------"/>
+        <echo message="|     End WSC JUnit tests                        |"/>
+        <echo message="--------------------------------------------------"/>
+    </target>
 
+    <target name="test.server" description="Run the WSC server tests">
         <echo message="--------------------------------------------------"/>
-        <echo message="|     Web service control DRTs starting          |"/>
+        <echo message="|     Start WSC Server tests                     |"/>
         <echo message="--------------------------------------------------"/>
 
         <parallel failonany="true">
@@ -105,40 +134,26 @@
                          timeoutproperty="server.timeout">
                     <http url="${waitfor.url}"/>
                 </waitfor>
+
                 <fail if="server.timeout" message="Server failed to start up properly at URL: ${waitfor.url}"/>
 
-                <antcall target="deploy-webapps"/>
+                <antcall target="ensure.deployed"/>
 
                 <!-- Validate the wsdls we have against those returned from WSM, fail if any diffs -->
                 <antcall target="check-wsdls"/>
 
                 <!-- wsdls have been validated and we are good to go - build the services controls -->
-                <antcall target="build-client"/>
+                <antcall target="build.client"/>
+
+                <antcall target="server.junit"/>
 
-                <echo message="** junit logfiles written to ${log.dir} **"/>
-                <junit failureproperty="drtfailed"
-                       printsummary="on"
-                       tempdir="${client.build}"
-                       fork="yes">
-                    <classpath>
-                        <path refid="client.classpath"/>
-                    </classpath>
-                    <formatter type="plain"/>
-                    <batchtest filtertrace="off" todir="${log.dir}">
-                        <fileset dir="${junit-source.dir}">
-                            <include name="**/*Test.java"/>
-                            <exclude name="**/Image*Test.java"/>
-                            <exclude name="**/DataHandler*Test.java"/>
-                        </fileset>
-                    </batchtest>
-                </junit>
                 <antcall target="undeploy"/>
                 <stop-server/>
             </sequential>
         </parallel>
 
         <echo message="--------------------------------------------------"/>
-        <echo message="|     Web service control DRTs completed         |"/>
+        <echo message="|     End WSC Server tests                     |"/>
         <echo message="--------------------------------------------------"/>
 
         <fail if="drtfailed" message="One or more tests in the ServiceControl DRT failed."/>
@@ -147,7 +162,7 @@
     <!-- =================================================================== -->
     <!-- build - build the junit tests and webservice controls               -->
     <!-- =================================================================== -->
-    <target name="build-client" description="Build the tests and controls for the drts.">
+    <target name="build.client" description="Build the server-side JUnit tests and web service controls.">
 
         <echo message="--------------------------------------------------"/>
         <echo message="|     Web service control client build starting   |"/>
@@ -180,64 +195,36 @@
 
     </target>
 
-    <!-- =================================================================== -->
-    <!-- build - build the webapp and web services for the DRTs              -->
-    <!-- =================================================================== -->
-    <target name="build-webapp" description="Build the webapp for the drts.">
-
-        <antcall target="dirs"/>
-
-        <echo message="----------------------------------------------------"/>
-        <echo message="|     Web service control drt webapp build starting |"/>
-        <echo message="----------------------------------------------------"/>
-
-        <!-- copy the webapp template dir -->
-        <copy todir="${webapp.build.dir}">
-            <fileset dir="${webapp.template.dir}" includes="**/*"/>
-        </copy>
-
-        <!-- deploy beehive files to the webapp -->
-        <mkdir dir="${webapp.lib}"/>
-        <deploy-wsm webappDir="${webapp.build.dir}"/>
-
-        <!-- add the jars necessary for attachment support -->
-        <copy todir="${webapp.lib}">
-            <fileset dir="external" includes="*.jar"/>
-        </copy>
+    <target name="server.junit" description="Run the server's JUnit tests">
+        <echo message="JUnit log files written to: ${log.dir}"/>
 
-        <build-schemas srcdir="${webapp.schemas}" destdir="${webapp.classes}"/>
-
-        <mkdir dir="${webapp.classes}"/>
-        <mkdir dir="${webapp.beansrc}"/>
-
-        <build-controls srcdir="${webapp.src}"
-                        destdir="${webapp.classes}"
-                        tempdir="${webapp.beansrc}"
-                        classpathref="client.classpath"/>
-
-        <build-webservices srcdir="${webapp.ws.src}"
-                           destdir="${webapp.classes}"
-                           tempdir="${webapp.beansrc}"
-                           classpathref="client.classpath"/>
-
-        <copy todir="${webapp.classes}">
-            <fileset dir="${webapp.ws.src}">
-                <include name="**/*.gif"/>
-                <include name="**/*.jpg"/>
-            </fileset>
-        </copy>
+        <junit failureproperty="drtfailed"
+               printsummary="on"
+               tempdir="${client.build}"
+               fork="yes">
+            <classpath>
+                <path refid="client.classpath"/>
+            </classpath>
+            <formatter type="plain"/>
+            <batchtest filtertrace="off" todir="${log.dir}">
+                <fileset dir="${junit-source.dir}">
+                    <include name="**/*Test.java"/>
+                    <exclude name="**/Image*Test.java"/>
+                    <exclude name="**/DataHandler*Test.java"/>
+                </fileset>
+            </batchtest>
+        </junit>
+    </target>
 
-        <echo message="----------------------------------------------------"/>
-        <echo message="|     Web service control drt webapp build ending  |"/>
-        <echo message="----------------------------------------------------"/>
+    <target name="build.webapp" description="Build the webapp for the drts.">
+        <ant dir="webapp" target="build" inheritAll="false"/>
+    </target>
 
+    <target name="clean.webapp" description="Build the webapp for the drts.">
+        <ant dir="webapp" target="clean" inheritAll="false"/>
     </target>
 
-    <!-- =================================================================== -->
-    <!-- generate_webservicecontrols - Generate webservice controls from wsdls             -->
-    <!-- =================================================================== -->
     <target name="generate_webservicecontrols">
-
         <taskdef name="axisbeanbuild" 
                  classname="org.apache.beehive.wsm.axis.tools.ant.AxisTypeGeneratorTask"
                  classpathref="client.classpath"/>
@@ -283,6 +270,8 @@
     <!-- wsdl we keep a copy of.                                             -->
     <!-- =================================================================== -->
     <target name="check-wsdls" description="Verify that the webservice wsdl matches our DRT wsdl.">
+        <mkdir dir="${build.fetchedwsdl.dir}"/>
+
         <check-wsdl webservicePath="soapMarshalling" webserviceName="SoapMarshallingDocLitWrapped" drtWsdlDir="${wsdls.dir}"/>
         <check-wsdl webservicePath="soapMarshalling" webserviceName="SoapMarshallingDocLitWrappedArrayTypes" drtWsdlDir="${wsdls.dir}"/>
         <check-wsdl webservicePath="soapMarshalling" webserviceName="SoapMarshallingDocLitBare" drtWsdlDir="${wsdls.dir}"/>
@@ -325,7 +314,7 @@
         <mkdir dir="${client.xmlbeangen}"/>
         <mkdir dir="${client.axisgen}"/>
         <mkdir dir="${client.jcxgensrc}"/>
-        <mkdir dir="${client.wsdls}"/>
+        <mkdir dir="${build.fetchedwsdl.dir}"/>
         <mkdir dir="${webapp.build.dir}"/>
         <mkdir dir="${log.dir}"/>
     </target>
@@ -335,10 +324,6 @@
     <!-- Targets for running the web service control drts on tomcat       -->
     <!--                                                                  -->
     <!-- ================================================================ -->
-    <target name="deploy-webapps">
-        <antcall target="ensure.deployed"/>
-    </target>
-
     <target name="ensure.deployed" description="Deploy webapp for the test recorder">
         <echo>Ensuring that the webapp ${context.path} is deployed on a running server at the url
             ${webapp.waitfor.url}</echo>
@@ -377,7 +362,7 @@
     </target>
 
     <target name="deploy" description="Deploy webapp">
-        <echo message="** deploying ${webapp.build.dir} to ${context.path} **"/>
+        <echo message="Deploying ${webapp.build.dir} to ${context.path}"/>
         <deploy-webapp webappDir="${webapp.build.dir}" contextPath="${context.path}"/>
     </target>
 
@@ -395,17 +380,17 @@
 
         <sequential>
             <get src="${webapp.waitfor.url}/@{webservicePath}/@{webserviceName}.jws?wsdl"
-                 dest="${client.wsdls}/@{webserviceName}.wsdl"/>
+                 dest="${build.fetchedwsdl.dir}/@{webserviceName}.wsdl"/>
 
             <!-- based on the platform the generated wsdl may contain CR/LF line endings -->
             <fixcrlf srcdir="@{drtWsdlDir}" eol="lf" includes="@{webserviceName}.wsdl"/>
-            <fixcrlf srcdir="${client.wsdls}" eol="lf" includes="**/@{webserviceName}.wsdl"/>
+            <fixcrlf srcdir="${build.fetchedwsdl.dir}" eol="lf" includes="**/@{webserviceName}.wsdl"/>
 
-            <fail message="ERROR: WSDL generated by webservice, ${client.wsdls}/@{webserviceName}.wsdl, does not match DRT WSDL @{drtWsdlDir}/@{webserviceName}.wsdl !">
+            <fail message="ERROR: WSDL generated by webservice, ${build.fetchedwsdl.dir}/@{webserviceName}.wsdl, does not match DRT WSDL @{drtWsdlDir}/@{webserviceName}.wsdl !">
                 <condition>
                     <not>
                         <filesmatch file1="@{drtWsdlDir}/@{webserviceName}.wsdl"
-                                    file2="${client.wsdls}/@{webserviceName}.wsdl"/>
+                                    file2="${build.fetchedwsdl.dir}/@{webserviceName}.wsdl"/>
                     </not>
                 </condition>
             </fail>

Modified: beehive/trunk/system-controls/test/webservice/junit/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/junit/build.xml?rev=357809&r1=357770&r2=357809&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/junit/build.xml (original)
+++ beehive/trunk/system-controls/test/webservice/junit/build.xml Mon Dec 19 13:42:22 2005
@@ -22,14 +22,17 @@
     <property environment="os"/>
     <import file="../../../systemcontrols-imports.xml"/>
 
-    <property name="junit-source.dir" location="tests"/>
-    <property name="wsdls.dir" location="wsdls"/>
+    <property name="junit-source.dir" location="src"/>
+    <property name="wsdls.dir" location="wsdl"/>
 
-    <property name="jcxgen.build.dir" location="../build/jcxgen"/>
-    <property name="jcxgen.beansrc" location="${jcxgen.build.dir}/beansrc"/>
-    <property name="jcxgen.classes" location="${jcxgen.build.dir}/classes"/>
-    <property name="jcxgen.gensrc" location="${jcxgen.build.dir}/jcxsrc"/>
-    <property name="log.dir" location="${basedir}/../build/logs/jcxgen"/>
+    <property name="wscgen.build.dir" location="../build/junit-wscgen"/>
+
+    <property name="wscgen.beansrc" location="${wscgen.build.dir}/beansrc"/>
+    <property name="wscgen.classes" location="${wscgen.build.dir}/classes"/>
+    <property name="wscgen.gensrc" location="${wscgen.build.dir}/wscsrc"/>
+
+    <property name="wscgen.package.name" value="generated.wsctest.junit"/>
+    <property name="log.dir" location="${basedir}/../build/logs/wscgen"/>
 
     <property name="beehive-webservice-control.jar"
               location="${beehive.home}/system-controls/build/jars/beehive-webservice-control.jar"/>
@@ -44,8 +47,8 @@
         <path refid="junit.dependency.path"/>
     </path>
 
-    <path id="jcxgen.classpath">
-        <pathelement path="${jcxgen.classes}"/>
+    <path id="wscgen.classpath">
+        <pathelement path="${wscgen.classes}"/>
         <pathelement path="${beehive-webservice-control.jar}"/>
         <path refid="beehive.classpath"/>
         <path refid="xbean.dependency.path"/>
@@ -55,81 +58,46 @@
         <path refid="commons-discovery.dependency.path"/>
     </path>
 
-    <!-- =================================================================== -->
-    <!-- drt - run the webservice control DRTs                               -->
-    <!-- =================================================================== -->
-    <target name="drt" depends="clean, build" description="Run the web service control drts.">
-        <echo message="-----------------------------------------------------"/>
-        <echo message="|     Web service control generation DRTs starting  |"/>
-        <echo message="-----------------------------------------------------"/>
+    <target name="build" description="Build the tests and controls for the drts.">
+        <mkdir dir="${log.dir}"/>
+        <mkdir dir="${wscgen.gensrc}"/>
 
-        <echo message="** junit logfiles written to ${log.dir} **"/>
-        <junit failureproperty="drtfailed"
-               printsummary="on"
-               tempdir="${jcxgen.build.dir}"
-               fork="yes">
-            <classpath>
-                <path refid="jcxgen.classpath"/>
-                <pathelement location="${jcxgen.classes}"/>
-            </classpath>
-            <formatter type="plain"/>
-            <batchtest filtertrace="off" todir="${log.dir}">
-                <fileset dir="${junit-source.dir}">
-                    <include name="**/*Test.java"/>
-                </fileset>
-            </batchtest>
-        </junit>
+        <antcall target="generate_wscs"/>
 
         <echo message="-----------------------------------------------------"/>
-        <echo message="|     Web service control generation DRTs completed |"/>
+        <echo message="|     Web service control generation build starting |"/>
         <echo message="-----------------------------------------------------"/>
 
-        <fail if="drtfailed" message="One or more tests in the ServiceControl DRT failed."/>
-    </target>
-
+        <build-controls srcdir="${wscgen.gensrc}"
+                        destdir="${wscgen.classes}"
+                        tempdir="${wscgen.beansrc}"
+                        classpathref="wscgen.classpath"/>
 
-    <!-- =================================================================== -->
-    <!-- build - build the junit tests and webservice controls               -->
-    <!-- =================================================================== -->
-    <target name="build" depends="dirs, generate_jcxs" description="Build the tests and controls for the drts.">
-
-        <echo message="-----------------------------------------------------"/>
-        <echo message="|     Web service control generation build starting |"/>
-        <echo message="-----------------------------------------------------"/>
-        <build-controls srcdir="${jcxgen.gensrc}"
-                        destdir="${jcxgen.classes}"
-                        tempdir="${jcxgen.beansrc}"
-                        classpathref="jcxgen.classpath"/>
-
-        <copy todir="${jcxgen.classes}">
-            <fileset dir="${jcxgen.gensrc}">
-                <include name="**/*.wsdl"/>
-            </fileset>
+        <copy todir="${wscgen.classes}">
+            <fileset dir="${wscgen.gensrc}" includes="**/*.wsdl"/>
         </copy>
 
         <!-- build the client junit tests, use apt since they may access controls -->
         <build-controls srcdir="${junit-source.dir}"
-                        destdir="${jcxgen.classes}"
-                        tempdir="${jcxgen.beansrc}"
-                        classpathref="jcxgen.classpath"/>
+                        destdir="${wscgen.classes}"
+                        tempdir="${wscgen.beansrc}"
+                        classpathref="wscgen.classpath"/>
 
         <echo message="-----------------------------------------------------"/>
         <echo message="|     Web service control generation build completed |"/>
         <echo message="-----------------------------------------------------"/>
     </target>
 
-    <!-- =================================================================== -->
-    <!-- generate_jcxs - Generate webservice controls from wsdls             -->
-    <!-- =================================================================== -->
-    <target name="generate_jcxs" depends="gen_xmlbeans">
+    <target name="generate_wscs" depends="gen_xmlbeans" description="Generate web service controls for JUnit tests">
         <taskdef name="scgen"
                  classname="org.apache.beehive.controls.system.webservice.generator.ServiceControlGeneratorTask"
-                 classpathref="jcxgen.classpath"/>
-        <scgen srcdir="${wsdls.dir}" destdir="${jcxgen.gensrc}"/>
+                 classpathref="wscgen.classpath"/>
+
+        <scgen srcdir="${wsdls.dir}" destdir="${wscgen.gensrc}"/>
     </target>
 
     <target name="gen_xmlbeans" depends="checkxbean" unless="noxbeanrebuild">
-        <build-schemas srcdir="${wsdls.dir}" destdir="${jcxgen.classes}"/>
+        <build-schemas srcdir="${wsdls.dir}" destdir="${wscgen.classes}"/>
     </target>
 
     <target name="checkxbean">
@@ -138,20 +106,41 @@
         </uptodate>
     </target>
 
-    <!-- =================================================================== -->
-    <!-- clean                                                               -->
-    <!-- =================================================================== -->
-    <target name="clean">
-        <delete dir="${jcxgen.build.dir}"/>
+    <target name="clean" description="Clean generated source and class artifacts">
+        <delete dir="${wscgen.build.dir}"/>
         <delete dir="${log.dir}"/>
     </target>
 
-    <!-- =================================================================== -->
-    <!-- create directories for the build                                    -->
-    <!-- =================================================================== -->
-    <target name="dirs">
-        <mkdir dir="${log.dir}"/>
-        <mkdir dir="${jcxgen.gensrc}"/>
+    <target name="drt" description="Run the web service control drts.">
+        <antcall target="clean"/>
+        <antcall target="build"/>
+
+        <echo message="-----------------------------------------------------"/>
+        <echo message="|     Web service control generation DRTs starting  |"/>
+        <echo message="-----------------------------------------------------"/>
+
+        <echo message="Web Service Control JUnit log files written to ${log.dir}"/>
+        <junit failureproperty="drtfailed"
+               printsummary="on"
+               tempdir="${wscgen.build.dir}"
+               fork="yes">
+            <classpath>
+                <path refid="wscgen.classpath"/>
+                <pathelement location="${wscgen.classes}"/>
+            </classpath>
+            <formatter type="plain"/>
+            <batchtest filtertrace="off" todir="${log.dir}">
+                <fileset dir="${junit-source.dir}">
+                    <include name="**/*Test.java"/>
+                </fileset>
+            </batchtest>
+        </junit>
+
+        <echo message="-----------------------------------------------------"/>
+        <echo message="|     Web service control generation DRTs completed |"/>
+        <echo message="-----------------------------------------------------"/>
+
+        <fail if="drtfailed" message="One or more tests in the ServiceControl DRT failed."/>
     </target>
 
 </project>