Author: mmerz
Date: Tue Nov  2 13:59:25 2004
New Revision: 56425

Added:
   
incubator/beehive/branches/v1/alpha/samples/AddressBookWS/WEB-INF/client-build.xml
   
incubator/beehive/branches/v1/alpha/samples/wsm-blank/WEB-INF/client-build.xml
Modified:
   incubator/beehive/branches/v1/alpha/build.xml
   incubator/beehive/branches/v1/alpha/samples/AddressBookWS/WEB-INF/build.xml
   incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/build.xml
   
incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/src/web/EmployeeWS.jws
   incubator/beehive/branches/v1/alpha/samples/EmployeeWS/index.html
   
incubator/beehive/branches/v1/alpha/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
Log:
Added build for web service samples, and fixed the build.xml to get the 
commons-logging.jar in the samples.

Contributor: Daryoush Mehrtash


Modified: incubator/beehive/branches/v1/alpha/build.xml
==============================================================================
--- incubator/beehive/branches/v1/alpha/build.xml       (original)
+++ incubator/beehive/branches/v1/alpha/build.xml       Tue Nov  2 13:59:25 2004
@@ -262,6 +262,7 @@
                 <include name="saaj.jar"/>
                 <include name="wsdl4j.jar"/>
                 <include name="commons-discovery.jar"/>
+                <include name="commons-logging.jar"/>
             </fileset>
         </copy>
 
@@ -368,18 +369,24 @@
             <fileset dir="samples/wsm-blank"/>
         </copy>
 
-        <!-- Build the WSM/AddressBook sample -->
+        <!-- Build the WSM/AddressBookWS sample -->
         <copy todir="${dist.dir}/samples/AddressBookWS" failOnError="true">
             <fileset dir="samples/AddressBookWS">
                 <exclude name="build.xml"/>
             </fileset>
         </copy>
+        <!-- Build the WSM/EmployeeWS sample -->
+        <copy todir="${dist.dir}/samples/EmployeeWS" failOnError="true">
+            <fileset dir="samples/EmployeeWS">
+                <exclude name="build.xml"/>
+            </fileset>
+        </copy>
         <ant 
                     dir="${dist.dir}/samples/controls-db" 
              antfile="build.xml" 
                  target="build"
                  inheritall="false"/>
-        <copy todir="${dist.dir}/samples/AddressBookWS/WEB-INF/lib" 
failOnError="true">
+        <copy todir="${dist.dir}/samples/EmployeeWS/WEB-INF/lib" 
failOnError="true">
             <fileset dir="${dist.dir}/samples/controls-db/build">
                 <include name="dbControl.jar"/>
             </fileset>

Modified: 
incubator/beehive/branches/v1/alpha/samples/AddressBookWS/WEB-INF/build.xml
==============================================================================
--- incubator/beehive/branches/v1/alpha/samples/AddressBookWS/WEB-INF/build.xml 
(original)
+++ incubator/beehive/branches/v1/alpha/samples/AddressBookWS/WEB-INF/build.xml 
Tue Nov  2 13:59:25 2004
@@ -20,61 +20,106 @@
 
 <project name="AddressBookWS" default="build" basedir=".">
 
-    <property environment="env" />
+       <property environment="env" />
 
-    <property name="build.dir" location="build" />
-    <property name="src.dir" location="src" />
-    <property name="lib.dir" location="lib" />
-    <property name="jars.dir" location="${build.dir}/jars" />
-    <property name="classes.dir" location="${build.dir}/classes" />
-
-    <condition property="isJDK15">
-        <equals arg1="${ant.java.version}" arg2="1.5" />
-    </condition>
-
-    <path id="jars">
-        <fileset dir="${lib.dir}/">
-            <include name="**/*.jar" />
-        </fileset>
-    </path>
-
-
-    <!-- ========================================= -->
-    <!-- build - build jar-file                    -->
-    <!-- ========================================= -->
-
-    <target name="build" depends="compile">
-        <jar jarfile="${jars.dir}/AddressBookWS.jar">
-            <fileset dir="${classes.dir}" />
-        </jar>
-    </target>
-
-
-    <!-- ========================================= -->
-    <!-- compile - compile sources                 -->
-    <!-- ========================================= -->
-
-    <target name="compile" depends="dirs" if="isJDK15">
-        <javac srcdir="${src.dir}" destdir="${classes.dir}" 
classpathref="jars" failonerror="true" />
-    </target>
-
-    
-    <!-- ========================================= -->
-    <!-- dirs - create dirs required for compile   -->
-    <!-- ========================================= -->
-
-    <target name="dirs">
-        <mkdir dir="${classes.dir}" />
-        <mkdir dir="${jars.dir}" />
-    </target>
-
-    
-    <!-- ========================================= -->
-    <!-- clean - remove build files                -->
-    <!-- ========================================= -->
-
-    <target name="clean">
-        <delete dir="${build.dir}" />
-    </target>
+       <property name="build.dir" location="build" />
+       <property name="gen.dir" location="${build.dir}/gen" />
+       <property name="classes.dir" location="${build.dir}/classes" />
+
+       <condition property="isJDK15">
+               <equals arg1="${ant.java.version}" arg2="1.5" />
+       </condition>
+
+       <path id="jars">
+               <fileset dir="./lib" >
+                       <include name="**/*.jar" />
+               </fileset>
+       </path>
+
+
+       <!-- ========================================= -->
+       <!-- build - build jar-file                    -->
+       <!-- ========================================= -->
+
+       <target name="build" depends="compile">
+               <jar jarfile="./lib/AddressBookWS.jar">
+                       <fileset dir="${classes.dir}" />
+               </jar>
+       </target>
+
+
+       <!-- ========================================= -->
+       <!-- compile - compile sources                 -->
+       <!-- ========================================= -->
+
+       
+       <target name="compile" depends="update_jars, dirs" if="isJDK15" >
+               <taskdef name="apt" 
classname="org.apache.beehive.controls.runtime.generator.AptTask" 
classpath="lib/controls.jar" onerror="report" />
+
+               <apt srcdir="./src" destdir="${classes.dir}" 
gendir="${gen.dir}" compileByExtension="true" 
+                       classpathref="jars" 
srcExtensions="*.java,*.jcx,*.jcs,*.jws" >
+
+               </apt>
+
+       </target>       
+
+       <target name="update_jars" >
+               <property name="log4j.jar" 
location="${env.BEEHIVE_HOME}/external/log4j/log4j-1.2.8.jar" />
+               <property name="junit.jar" 
location="${env.BEEHIVE_HOME}/external/junit/junit.jar" />
+               <property name="velocity14.jar" 
location="${env.BEEHIVE_HOME}/external/velocity/velocity-1.4.jar" />
+               <property name="velocitydep14.jar" 
location="${env.BEEHIVE_HOME}/external/velocity/velocity-dep-1.4.jar" />
+               <property name="derby.jar" 
location="${env.BEEHIVE_HOME}/external/derby/derby_46005.jar" />
+               <property name="xbean.jar" 
location="${env.BEEHIVE_HOME}/external/xmlbeans/apache-xbean.jar" />
+
+               <copy todir="lib" >
+                       <fileset file="${log4j.jar}"/>
+                       <fileset file="${xbean.jar}"/>
+
+                       <!-- these are required by Controls and WSM -->
+                       <fileset file="${velocity14.jar}" />
+                       <fileset file="${velocitydep14.jar}"/>
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/lib">
+                               <include name="wsdltypes.jar"/>
+                       </fileset>
+
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/external">
+                               <include name="axis.jar"/>
+                               <include name="axis-ant.jar"/>
+                               <include name="jaxrpc.jar"/>
+                               <include name="saaj.jar"/>
+                               <include name="wsdl4j.jar"/>
+                               <include name="commons-discovery.jar"/>
+                       </fileset>
+
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/build/jars">
+                               <include name="wsm.jar"/>
+                               <include name="wsm-axis.jar"/>
+                       </fileset>
+                       <fileset dir="${env.BEEHIVE_HOME}/controls/build/jars">
+                               <include name="controls.jar"/>
+                       </fileset>
+               </copy>
+       </target>
+
+       <!-- ========================================= -->
+       <!-- dirs - create dirs required for compile   -->
+       <!-- ========================================= -->
+
+       <target name="dirs">
+               <mkdir dir="${classes.dir}" />
+               <mkdir dir="${gen.dir}" />
+       </target>
+
+
+       <!-- ========================================= -->
+       <!-- clean - remove build files                -->
+       <!-- ========================================= -->
+
+       <target name="clean" >
+               <delete file="velocity.log" />
+               <delete file="./lib/AddressBookWS.jar" />
+               <delete dir="${build.dir}" />
+               <delete dir="${gen.dir}" />
+       </target>
 
 </project>

Added: 
incubator/beehive/branches/v1/alpha/samples/AddressBookWS/WEB-INF/client-build.xml
==============================================================================
--- (empty file)
+++ 
incubator/beehive/branches/v1/alpha/samples/AddressBookWS/WEB-INF/client-build.xml
  Tue Nov  2 13:59:25 2004
@@ -0,0 +1,76 @@
+<?xml version="1.0" ?>
+
+<project name="AddressBookClient" basedir="." default="all">
+       
+       <property name="AddressBook.wsdl.url" 
+               
value="http://localhost:8080/AddressBookWS/web/Service.jws?wsdl"; />
+       
+       
+       <path id="jars">
+           <fileset dir="lib">
+               <include name="**/*.jar"/>
+           </fileset>
+       </path>
+       
+       <taskdef name="wsdl2java" 
classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
+        loaderref="axis" >
+        <classpath refid="jars"/>
+       </taskdef>
+
+ 
+       <target name="clean">
+               <delete dir="build" />
+       </target>
+       
+       <target name="dirs">
+               <mkdir dir="build" />
+               <mkdir dir="build/generated" />
+               <mkdir dir="build/classes" />
+
+       </target>       
+       <target name="all" depends="genClient, compile, test"/>
+       
+       <target name="genClient" depends="dirs">
+           <wsdl2java url="${AddressBook.wsdl.url}"
+                      output="build/generated"
+                      testcase="yes">
+           </wsdl2java>
+
+       </target>
+       
+       <target name="compile" depends="genClient">
+                <javac srcdir="build/generated"
+                       destdir="build/classes"
+                       classpathref="jars"
+                       failonerror="true"
+                       source="1.4"
+                       />
+                       
+                <!-- just in case there are some client specific source -->
+                <javac srcdir="src"
+                       destdir="build/classes"
+                       classpathref="jars"
+                       failonerror="true"
+                       source="1.4"
+                       />
+
+          </target>    
+       
+       <target name="test" depends="compile">
+               <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
+               <classpath>
+                     <pathelement location= "build/classes"/>
+                     <path refid="jars"/>
+                 </classpath>
+
+
+               <batchtest fork="yes" todir=".">
+                   <fileset dir="build/classes">
+                     <include name="**/*Test*.class"/>
+                   </fileset>
+                 </batchtest>
+               </junit>
+               
+       </target>
+       
+</project>
\ No newline at end of file

Modified: 
incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/build.xml
==============================================================================
--- incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/build.xml    
(original)
+++ incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/build.xml    
Tue Nov  2 13:59:25 2004
@@ -20,7 +20,6 @@
 
 <project name="EmployeeWS" default="build" basedir=".">
 
-       <taskdef name="apt" 
classname="org.apache.beehive.controls.runtime.generator.AptTask" 
classpath="lib/controls.jar" onerror="report" />
 
 
        <property environment="env" />
@@ -31,9 +30,7 @@
        
 
 
-       <path id="build_classpath">
-               <dirset dir="${classes.dir}" />
-
+       <path id="jars">
                <fileset dir="./lib">
                        <include name="**/*.jar" />
                </fileset>
@@ -56,8 +53,10 @@
 
 
        <target name="compile" depends="update_jars, dirs" >
+               <taskdef name="apt" 
classname="org.apache.beehive.controls.runtime.generator.AptTask" 
classpath="lib/controls.jar" onerror="report" />
+
                <apt srcdir="./src" destdir="${classes.dir}" 
gendir="${gen.dir}" compileByExtension="true" 
-                       classpathref="build_classpath" 
srcExtensions="*.java,*.jcx,*.jcs,*.jws" >
+                       classpathref="jars" 
srcExtensions="*.java,*.jcx,*.jcs,*.jws" >
 
                </apt>
 
@@ -65,16 +64,43 @@
        
 
        <target name="update_jars" >
+               <property name="log4j.jar" 
location="${env.BEEHIVE_HOME}/external/log4j/log4j-1.2.8.jar" />
+               <property name="junit.jar" 
location="${env.BEEHIVE_HOME}/external/junit/junit.jar" />
+               <property name="velocity14.jar" 
location="${env.BEEHIVE_HOME}/external/velocity/velocity-1.4.jar" />
+               <property name="velocitydep14.jar" 
location="${env.BEEHIVE_HOME}/external/velocity/velocity-dep-1.4.jar" />
+               <property name="derby.jar" 
location="${env.BEEHIVE_HOME}/external/derby/derby_46005.jar" />
+               <property name="xbean.jar" 
location="${env.BEEHIVE_HOME}/external/xmlbeans/apache-xbean.jar" />
+
                <copy todir="lib" >
-                 <fileset dir="${env.BEEHIVE_HOME}/wsm/build/jars">
-                       <include name="wsm.jar"/>
-                       <include name="wsm-axis.jar"/>
-                   </fileset>
-                 <fileset dir="${env.BEEHIVE_HOME}/controls/build/jars">
-                       <include name="controls.jar"/>
-                   </fileset>
+                       <fileset file="../../controls-db/build/dbControl.jar" />
+                       <fileset file="${log4j.jar}"/>
+                       <fileset file="${xbean.jar}"/>
+
+                       <!-- these are required by Controls and WSM -->
+                       <fileset file="${velocity14.jar}" />
+                       <fileset file="${velocitydep14.jar}"/>
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/lib">
+                               <include name="wsdltypes.jar"/>
+                       </fileset>
+
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/external">
+                               <include name="axis.jar"/>
+                               <include name="axis-ant.jar"/>
+                               <include name="jaxrpc.jar"/>
+                               <include name="saaj.jar"/>
+                               <include name="wsdl4j.jar"/>
+                               <include name="commons-discovery.jar"/>
+                       </fileset>
+
+                       <fileset dir="${env.BEEHIVE_HOME}/wsm/build/jars">
+                               <include name="wsm.jar"/>
+                               <include name="wsm-axis.jar"/>
+                       </fileset>
+                       <fileset dir="${env.BEEHIVE_HOME}/controls/build/jars">
+                               <include name="controls.jar"/>
+                       </fileset>
                </copy>
-        </target>
+       </target>
 
        <!-- ========================================= -->
        <!-- dirs - create dirs required for compile   -->

Modified: 
incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/src/web/EmployeeWS.jws
==============================================================================
--- 
incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/src/web/EmployeeWS.jws
       (original)
+++ 
incubator/beehive/branches/v1/alpha/samples/EmployeeWS/WEB-INF/src/web/EmployeeWS.jws
       Tue Nov  2 13:59:25 2004
@@ -26,7 +26,7 @@
 
 
  
-   // @Control 
+    @Control 
     public EmployeeDBControl employeeDB;
 
 

Modified: incubator/beehive/branches/v1/alpha/samples/EmployeeWS/index.html
==============================================================================
--- incubator/beehive/branches/v1/alpha/samples/EmployeeWS/index.html   
(original)
+++ incubator/beehive/branches/v1/alpha/samples/EmployeeWS/index.html   Tue Nov 
 2 13:59:25 2004
@@ -13,7 +13,7 @@
   <li> <a href="happyaxis.jsp">Validate</a> the local installation <br>
     <i>see below if this does not work.</i> </li>
   <li> View Employee Web Service's <a
- href="org/EmployeeWebService.jws?wsdl">WSDL</a> </li>
+ href="web/EmployeeWS.jws?wsdl">WSDL</a> </li>
 </ul>
 <h3>Validating the local configuration</h3>
 If the validation page displays an exception instead of a

Added: 
incubator/beehive/branches/v1/alpha/samples/wsm-blank/WEB-INF/client-build.xml
==============================================================================
--- (empty file)
+++ 
incubator/beehive/branches/v1/alpha/samples/wsm-blank/WEB-INF/client-build.xml  
    Tue Nov  2 13:59:25 2004
@@ -0,0 +1,76 @@
+<?xml version="1.0" ?>
+
+<project name="AddressBookClient" basedir="." default="all">
+       
+       <property name="AddressBook.wsdl.url" 
+               value="http://localhost:8080/wsm-blank/template/Blank.jws?wsdl"; 
/>
+       
+       
+       <path id="jars">
+           <fileset dir="lib">
+               <include name="**/*.jar"/>
+           </fileset>
+       </path>
+       
+       <taskdef name="wsdl2java" 
classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
+        loaderref="axis" >
+        <classpath refid="jars"/>
+       </taskdef>
+
+ 
+       <target name="clean">
+               <delete dir="build" />
+       </target>
+       
+       <target name="dirs">
+               <mkdir dir="build" />
+               <mkdir dir="build/generated" />
+               <mkdir dir="build/classes" />
+
+       </target>       
+       <target name="all" depends="genClient, compile, test"/>
+       
+       <target name="genClient" depends="dirs">
+           <wsdl2java url="${AddressBook.wsdl.url}"
+                      output="build/generated"
+                      testcase="yes">
+           </wsdl2java>
+
+       </target>
+       
+       <target name="compile" depends="genClient">
+                <javac srcdir="build/generated"
+                       destdir="build/classes"
+                       classpathref="jars"
+                       failonerror="true"
+                       source="1.4"
+                       />
+                       
+                <!-- just in case there are some client specific source -->
+                <javac srcdir="src"
+                       destdir="build/classes"
+                       classpathref="jars"
+                       failonerror="true"
+                       source="1.4"
+                       />
+
+          </target>    
+       
+       <target name="test" depends="compile">
+               <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
+               <classpath>
+                     <pathelement location= "build/classes"/>
+                     <path refid="jars"/>
+                 </classpath>
+
+
+               <batchtest fork="yes" todir=".">
+                   <fileset dir="build/classes">
+                     <include name="**/*Test*.class"/>
+                   </fileset>
+                 </batchtest>
+               </junit>
+               
+       </target>
+       
+</project>
\ No newline at end of file

Modified: 
incubator/beehive/branches/v1/alpha/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
==============================================================================
--- 
incubator/beehive/branches/v1/alpha/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
   (original)
+++ 
incubator/beehive/branches/v1/alpha/wsm/src/runtime/org/apache/beehive/wsm/axis/AnnotatedWebServiceDeploymentHandler.java
   Tue Nov  2 13:59:25 2004
@@ -192,12 +192,14 @@
                 int indexOfDot = relPath.indexOf(".");
                 if (-1 != indexOfDot) relPath = relPath.substring(0, 
indexOfDot);
                 String clsName = relPath.replaceAll("/", ".");
-                log.debug("look for webserivce in class: " + clsName);
+                log.debug("looking for webserivce in class: " + clsName);
+                System.out.println("looking for webserivce in class: " + 
clsName);  //TODO remove this
                 try {
                     Class result = 
getClass().getClassLoader().loadClass(clsName);
                     return result;
                 } catch (ClassNotFoundException e) {
                     log.debug("class: " + clsName + " was not found by the 
AnnotatedWebServiceDeploymentHandler continue to the next handler. ");
+                    System.out.println("class: " + clsName + " was not found 
by the AnnotatedWebServiceDeploymentHandler continue to the next handler. ");  
//TODO: Remove this
                     return null;
                 }
             }

Reply via email to