You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by mm...@apache.org on 2005/05/13 06:33:59 UTC

svn commit: r169934 - in /incubator/beehive/trunk: ./ samples/ samples/controls-webservices-blank/ samples/controls-webservices-blank/junit/ samples/controls-webservices-blank/junit/test/ samples/controls-webservices-blank/schemas/ system-controls/samples/webservice/wsm_samples_client/ system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/ test/dist-test/ant/

Author: mmerz
Date: Thu May 12 21:33:57 2005
New Revision: 169934

URL: http://svn.apache.org/viewcvs?rev=169934&view=rev
Log:
Added the controls-webservices-blank sample 
modified the jdbc drt test to remove the MST dependent assertions.

Contributor: Daryoush Mehrtash


Added:
    incubator/beehive/trunk/samples/controls-webservices-blank/
    incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
    incubator/beehive/trunk/samples/controls-webservices-blank/build.properties
    incubator/beehive/trunk/samples/controls-webservices-blank/build.xml
    incubator/beehive/trunk/samples/controls-webservices-blank/junit/
    incubator/beehive/trunk/samples/controls-webservices-blank/junit/log4j.xml
    incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/
    incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
    incubator/beehive/trunk/samples/controls-webservices-blank/schemas/
    incubator/beehive/trunk/samples/controls-webservices-blank/schemas/Service.wsdl
    incubator/beehive/trunk/samples/controls-webservices-blank/systemcontrols-imports.xml
Modified:
    incubator/beehive/trunk/beehive-imports.xml
    incubator/beehive/trunk/distribution.xml
    incubator/beehive/trunk/samples/build.xml
    incubator/beehive/trunk/system-controls/samples/webservice/wsm_samples_client/build.xml
    incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
    incubator/beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java
    incubator/beehive/trunk/test/dist-test/ant/build.xml

Modified: incubator/beehive/trunk/beehive-imports.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/beehive-imports.xml?rev=169934&r1=169933&r2=169934&view=diff
==============================================================================
--- incubator/beehive/trunk/beehive-imports.xml (original)
+++ incubator/beehive/trunk/beehive-imports.xml Thu May 12 21:33:57 2005
@@ -49,6 +49,15 @@
         <include name="velocity-dep-1.4.jar"/>
     </fileset>
 
+   <fileset id="commons-cli.fileset" 
+        file="${beehive.home}/system-controls/external/commons/commons-cli-1.0.jar"/>
+
+ 
+
+   <fileset id="commons-codec.fileset" 
+        file="${beehive.home}/external/commons/commons-codec-1.3.jar"/>
+
+ 
     <fileset id="commons-codec.fileset" 
         file="${beehive.home}/external/commons/commons-codec-1.3.jar"/>
 

Modified: incubator/beehive/trunk/distribution.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/distribution.xml?rev=169934&r1=169933&r2=169934&view=diff
==============================================================================
--- incubator/beehive/trunk/distribution.xml (original)
+++ incubator/beehive/trunk/distribution.xml Thu May 12 21:33:57 2005
@@ -97,6 +97,7 @@
         <ant antfile="${samples.verify.dir}/samples/wsm-addressbook/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
         <ant antfile="${samples.verify.dir}/samples/wsm-blank/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
         <ant antfile="${samples.verify.dir}/samples/wsm-samples/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
+        <ant antfile="${samples.verify.dir}/samples/controls-webservices-blank/build.xml" target="build" inheritAll="false"/>
 <!--
         <ant antfile="${samples.verify.dir}/controls-spring/integration/build.xml" target="build" inheritAll="false"/>
         <ant antfile="${samples.verify.dir}/controls-spring/web/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
@@ -121,6 +122,7 @@
     <!-- target for building libraries -->
     <target name="build.lib">
         <copy todir="${lib.dir}/common" failOnError="true">
+            <fileset refid="commons-cli.fileset"/>
             <fileset refid="commons-codec.fileset"/>
             <fileset refid="commons-discovery.fileset"/>
             <fileset refid="commons-logging.fileset"/>
@@ -128,6 +130,7 @@
             <fileset refid="xbean.fileset"/>
             <fileset refid="jsr173.fileset"/>
             <fileset refid="velocity.fileset"/>
+
         </copy>
 
         <copy todir="${lib.dir}/controls" failOnError="true">
@@ -327,6 +330,16 @@
                 <exclude name="WEB-INF/src/build*svn.xml"/>
             </fileset>
         </copy>
+
+
+       <!-- Build the sample: controls-webservices-blank -->
+        <copy todir="${dist.dir}/samples/controls-webservices-blank" failOnError="true">
+            <fileset dir="samples/controls-webservices-blank">
+                <exclude name="build*svn.xml"/>
+            </fileset>
+        </copy>
+
+
 
         <!-- Build the sample: wsm-addressbook -->
         <copy todir="${dist.dir}/samples/wsm-addressbook" failOnError="true">

Modified: incubator/beehive/trunk/samples/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/build.xml?rev=169934&r1=169933&r2=169934&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/build.xml (original)
+++ incubator/beehive/trunk/samples/build.xml Thu May 12 21:33:57 2005
@@ -27,7 +27,8 @@
         <echo>Cleaning distribution samples</echo>
         <echo>---------------------------------------------------------</echo>
 
-        <ant antfile="petstoreWeb/build.xml" target="scrub" inheritAll="false"/>
+       	<ant antfile="controls-webservices-blank/build-svn.xml" target="clean" inheritAll="false"/>
+       	<ant antfile="petstoreWeb/build.xml" target="scrub" inheritAll="false"/>
         <ant antfile="netui-samples/WEB-INF/src/build-dist.xml" target="clean" inheritAll="false"/>
         <ant antfile="controls-blank/build.xml" target="clean" inheritAll="false"/>
         <ant antfile="wsm-addressbook-enhanced/WEB-INF/src/build-svn.xml" target="clean" inheritAll="false"/>
@@ -37,7 +38,7 @@
         <ant antfile="wsm-samples/WEB-INF/src/build.xml" target="clean" inheritAll="false"/>
         <ant antfile="controls-spring/integration/build.xml" target="clean" inheritAll="false"/>
         <ant antfile="controls-spring/web/WEB-INF/src/build-svn.xml" target="clean" inheritAll="false"/>
-        <!-- <ant antfile="wsm-petstore-dashboard/WEB-INF" target="clean" inheritAll="false"/> -->
+         <!-- <ant antfile="wsm-petstore-dashboard/WEB-INF" target="clean" inheritAll="false"/> -->
     </target>
 
     <target name="build" description="Build the Beehive samples">
@@ -45,7 +46,8 @@
         <echo>Building distribution samples</echo>
         <echo>---------------------------------------------------------</echo>
 
-        <ant antfile="petstoreWeb/build.xml" target="deploy-beehive" inheritAll="false"/>
+        <ant antfile="controls-webservices-blank/build-svn.xml" target="build" inheritAll="false"/>
+       	<ant antfile="petstoreWeb/build.xml" target="deploy-beehive" inheritAll="false"/>
         <ant antfile="petstoreWeb/build.xml" target="build" inheritAll="false"/>
         <ant antfile="netui-samples/WEB-INF/src/build-dist.xml" target="build" inheritAll="false"/>
         <ant antfile="controls-blank/build.xml" target="build" inheritAll="false"/>

Added: incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml?rev=169934&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml (added)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/build-svn.xml Thu May 12 21:33:57 2005
@@ -0,0 +1,248 @@
+<?xml version="1.0" ?>
+
+<!--
+   Copyright 2005 The Apache Software Foundation 
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+  
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+   $Header:$
+ -->
+<project name="controls-webservices-blank" basedir="." default="usage">
+
+	<property environment="os" />
+	
+	<property name="beehive.home" value="../.." />
+
+	<property name="sc.home" value="${beehive.home}/system-controls"/>
+	<property name="external.dir" value="${sc.home}/external" />
+
+	<import file="${basedir}/systemcontrols-imports.xml" />
+
+	<property name="junit.source.dir" value="${basedir}/junit" />
+	<property name="build.dir" value="${basedir}/build" />
+	<property name="build.classes" value="${build.dir}/classes" />
+	<property name="build.beansrc" value="${build.dir}/beansrc" />
+
+	<!-- Service control specific properties -->
+	<property name="gen.source.dir" value="${build.dir}/jcxsrc" />
+	<property name="my.service.control.package" value="mypackage" />
+	<property name="schema.dir" value="${basedir}/schemas" />
+	<property name="xmlbean.type.gen.dir" value="${build.dir}/xmlbeantypes" />
+	<property name="build.jar" value="myservicecontrols.jar" />
+	<property name="test.logs" value="${basedir}/logs" />
+	<property name="junit.build.dir" value="${build.dir}/junitclasses" />
+	<property name="junit.build.beansrc" value="${build.dir}/junitbeansrc" />
+
+	<path id="beehive.classpath">
+		<path refid="webservices.dependency.path" />
+		<path refid="controls.dependency.path" />
+		<path refid="servlet.dependency.path" />
+		<path refid="junit.dependency.path" />
+	</path>
+	
+	<path id="service.control.dependencies">
+		<pathelement path="${beehive-webservice-control.jar}" />
+		<path refid="beehive.classpath" />
+		<path refid="xbean.dependency.path" />
+		<path refid="log4j.dependency.path" />
+		<path refid="velocity.dependency.path" />
+		<path refid="commons-logging.dependency.path" />
+		<path refid="commons-discovery.dependency.path" />
+	</path>	
+
+	<path id="build.classpath">
+		<pathelement path="${build.classes}" />
+		<path refid="service.control.dependencies" />
+	</path>
+
+	<path id="run.classpath">
+		<pathelement path="${build.classes}" />  <!-- this should not be needed, but without it wsdl is not found -->
+		<path refid="service.control.dependencies" />
+		<pathelement path="${build.dir}/${build.jar}"  />
+	 	<path refid="junit.dependency.path" />
+		<pathelement path="${junit.build.dir}" />
+	</path>
+
+
+
+	<taskdef name="control-jar" classname="org.apache.beehive.controls.runtime.packaging.ControlJarTask" onerror="report">
+		<classpath>
+			<path refid="controls.dependency.path" />
+		</classpath>
+	</taskdef>
+
+	<target name="clean" description="Delete all generated files">
+		<delete dir="${build.dir}" />
+		<delete file="velocity.log" />
+		<delete dir="${test.logs}" />
+	</target>
+
+	<target name="dirs">
+		<mkdir dir="${build.classes}" />
+		<mkdir dir="${build.beansrc}" />
+		<mkdir dir="${xmlbean.type.gen.dir}" />
+		<mkdir dir="${test.logs}" />
+		<mkdir dir="${junit.build.dir}" />
+		<mkdir dir="${junit.build.beansrc}" />
+
+	</target>
+
+
+	<target name="build" depends="gen-svc-ctrl" description="Build control sources">
+		<build-controls srcdir="${gen.source.dir}" destdir="${build.classes}" tempdir="${build.beansrc}" classpathref="build.classpath" />
+		<!-- have the wsdls, in the same dir as the jcx files -->
+		<copy todir="${build.classes}">
+			<fileset dir="${gen.source.dir}/">
+				<include name="**/*.wsdl" />
+			</fileset>
+		</copy>
+		<control-jar destfile="${build.dir}/${build.jar}" basedir="${build.classes}" />
+	</target>
+
+
+	<!-- Generate the service control, should run after types have been generated. -->
+	<target name="gen-svc-ctrl" depends="gen-types">
+		<java classname="org.apache.beehive.controls.system.webservice.generator.ExtensionMaker">
+			<classpath>
+				<path refid="build.classpath" />
+				<pathelement location="${build.classes}" />
+			</classpath>
+			<arg line="-gen_root ${gen.source.dir} 
+		      	-wsdl ${schema.dir}
+		      	-pkg ${my.service.control.package}
+		      	-wsdl_path_annotation ." />
+		</java>
+
+		<!-- have the wsdls, in the same dir as the jcx files -->
+		<copy todir="${gen.source.dir}/${my.service.control.package}">
+			<fileset dir="${schema.dir}">
+				<include name="**/*.wsdl" />
+			</fileset>
+		</copy>
+	</target>
+
+
+
+	<!-- Generate types for the WSDL and Scheams  -->
+	<!-- 
+		***********************************************************************************
+		NOTE: The type generation uses Apache XMLBeans compiler.  The Compiler doesn't support RPC/Encoded style.
+		To generate types for RPC/Encoded web service you need to use Axis's tools.
+
+		<property name="encoded.schema.dir" value="rpc-schemas" />
+		<property name="encoded.type.gen.dir" value="${build.dir}/encodedtypes" />
+
+		
+		<target name="gen-axis-types" depends="check-axis-types, dirs" unless="gen-axis-types-are-uptodate">
+			<taskdef name="encodedtypegen" classname="org.apache.beehive.wsm.axis.ant.AxisTypeGeneratorTask">
+				<classpath>
+					<path refid="build.classpath" />
+				</classpath>
+			</taskdef>
+	
+			<encodedtypegen wsdldir="${encoded.schema.dir}" outputdir="${encoded.type.gen.dir}" />
+			<javac srcdir="${encoded.type.gen.dir}" destdir="${build.classes}" classpathref="build.classpath" debug="true" />
+		</target>
+	
+	
+	
+		<target name="check-axis-types">
+			<uptodate property="gen-axis-types-are-uptodate" targetfile="${encoded.type.gen.dir}">
+				<srcfiles dir="${encoded.schema.dir}" includes="*.wsdl" />
+			</uptodate>
+	
+		</target>
+		***********************************************************************************
+    -->
+
+	<target name="gen-types" depends="checktypes, dirs" unless="gen-types-are-uptodate">
+		<!-- XMLBean build -->
+		<taskdef name="xmlbeanbuild" classname="org.apache.xmlbeans.impl.tool.XMLBean">
+			<classpath>
+				<path refid="xbean.dependency.path" />
+			</classpath>
+		</taskdef>
+
+		<xmlbeanbuild schema="${schema.dir}" srcgendir="${xmlbean.type.gen.dir}" classgendir="${build.classes}" failonerror="true">
+			<classpath>
+				<path refid="build.classpath" />
+			</classpath>
+		</xmlbeanbuild>
+	</target>
+
+	<target name="checktypes">
+		<uptodate property="gen-types-are-uptodate" targetfile="${xmlbean.type.gen.dir}">
+			<srcfiles dir="${schema.dir}" includes="*.wsdl,*.xsd" />
+		</uptodate>
+	</target>
+
+
+
+
+	<!-- Build the junit tests -->
+	<target name="build.junit" depends="build">
+		<build-controls srcdir="${junit.source.dir}" 
+			destdir="${junit.build.dir}" 
+			tempdir="${junit.build.beansrc}" 
+			classpathref="run.classpath" />
+		
+		<!-- have the wsdls, in the same dir as the jcx files -->
+		<copy todir="${junit.build.dir}">
+			<fileset dir="${junit.source.dir}">
+				<include name="**/*.properties" />
+				<include name="**/*.xml" />
+	<include name="**/*.properties" />
+			</fileset>
+		</copy>
+	</target>
+	
+	
+	<target name="run.junit" depends="build.junit">
+		
+		<echo message="** junit logfiles written to ${test.logs} **" />
+		<junit failureproperty="testfailed" printsummary="on" tempdir="${junit.build.dir}" fork="yes" >
+			<classpath>
+				<path refid="run.classpath" />
+			</classpath>
+			<formatter type="plain" />
+			<batchtest filtertrace="off" todir="${test.logs}">
+				<fileset dir="${junit.source.dir}">
+					<include name="**/*Test.java" />
+				</fileset>
+			</batchtest>
+		</junit>
+		<fail if="testfailed" message="One or more tests failed.  The unit test requires
+			the wsm-addressbook-enhanced web serivce to be running.  Please verify
+	 that http://localhost:8080/EnhancedAddressBook/ is available before trying the unit testing.
+	 	See the http://incubator.apache.org/beehive/wsm/sample_AddressBook.html for instruction
+	on running the sample." />
+	</target>
+
+
+	<target name="usage" description="Print the usage for this build.xml">
+		<echo message="" />
+		<echo message="" />
+		<echo message="Service Controls Project Template Build file" />
+		<echo message="" />
+		<echo message="" />
+		<echo message="----------------------------------------------------------------" />
+		<echo message="|                      Standard Targets                        |" />
+		<echo message="----------------------------------------------------------------" />
+		<echo message="clean               - Delete all generated files" />
+		<echo message="build               - Build control sources" />
+		<echo message="gen-types           - Just generate the types from schemas" />
+		<echo message="run.junit           - Run Junit tests for the service control" />
+		<echo message="----------------------------------------------------------------" />
+	</target>
+
+</project>

Added: incubator/beehive/trunk/samples/controls-webservices-blank/build.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/build.properties?rev=169934&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/build.properties (added)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/build.properties Thu May 12 21:33:57 2005
@@ -0,0 +1,7 @@
+#
+#
+#
+servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
+jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
+
+beehive.home=../../
\ No newline at end of file

Added: incubator/beehive/trunk/samples/controls-webservices-blank/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/build.xml?rev=169934&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/build.xml (added)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/build.xml Thu May 12 21:33:57 2005
@@ -0,0 +1,247 @@
+<?xml version="1.0" ?>
+
+<!--
+   Copyright 2005 The Apache Software Foundation 
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+  
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+   $Header:$
+ -->
+<project name="controls-webservices-blank" basedir="." default="usage">
+	<property environment="os" />
+	<property file="build.properties" />
+
+	<import file="${beehive.home}/beehive-imports.xml" />
+	<import file="${beehive.home}/ant/beehive-tools.xml" />
+
+	<property name="junit.source.dir" value="./junit" />
+	<property name="build.dir" value="./build" />
+	<property name="build.classes" value="${build.dir}/classes" />
+	<property name="build.beansrc" value="${build.dir}/beansrc" />
+	<property name="lib.dir" location="./lib" />
+
+	<!-- Service control specific properties -->
+	<property name="gen.source.dir" value="${build.dir}/jcxsrc" />
+	<property name="my.service.control.package" value="mypackage" />
+	<property name="schema.dir" value="schemas" />
+	<property name="xmlbean.type.gen.dir" value="${build.dir}/xmlbeantypes" />
+	<property name="build.jar" value="myservicecontrols.jar" />
+	<property name="test.logs" value="./logs" />
+	<property name="junit.build.dir" value="${build.dir}/junitclasses" />
+	<property name="junit.build.beansrc" value="${build.dir}/junitbeansrc" />
+
+
+	<path id="lib.path">
+		<fileset dir="${lib.dir}">
+			<include name="**/*.jar" />
+		</fileset>
+	</path>
+
+	<path id="build.classpath">
+		<path refid="lib.path" />
+		<pathelement location="${build.classes}" />
+	</path>
+
+	<path id="run.classpath">
+		<pathelement path="${build.classes}" />
+		<!-- this should not be needed, but without it wsdl is not found -->
+		<path refid="lib.path" />
+		<pathelement location="${servlet-api.jar}" />
+		<pathelement location="${jsp-api.jar}" />
+		<pathelement path="${build.dir}/${build.jar}" />
+		<pathelement path="${junit.build.dir}" />
+	</path>
+
+	<taskdef name="control-jar" classname="org.apache.beehive.controls.runtime.packaging.ControlJarTask" onerror="report">
+		<classpath>
+			<path refid="controls.dependency.path" />
+		</classpath>
+	</taskdef>
+
+	<target name="clean" description="Delete all generated files">
+		<delete dir="${build.dir}" />
+		<delete file="velocity.log" />
+		<delete dir="${test.logs}" />
+		<delete dir="${lib.dir}" />
+	</target>
+
+	<target name="dirs">
+		<mkdir dir="${build.classes}" />
+		<mkdir dir="${lib.dir}" />
+		<mkdir dir="${build.beansrc}" />
+		<mkdir dir="${xmlbean.type.gen.dir}" />
+		<mkdir dir="${test.logs}" />
+		<mkdir dir="${junit.build.dir}" />
+		<mkdir dir="${junit.build.beansrc}" />
+
+	</target>
+
+	<!-- copy all dependencies -->
+	<target name="get.dependencies" depends="dirs">
+		<copy todir="${lib.dir}">
+			<fileset file="${beehive.home}/lib/common/*.jar" />
+			<fileset file="${beehive.home}/lib/controls/beehive-controls.jar" />
+			<fileset file="${beehive.home}/lib/controls/beehive-webservice-control.jar" />
+			<fileset file="${beehive.home}/lib/wsm/*.jar" />
+		</copy>
+	</target>
+
+
+
+
+
+	<target name="build" depends="gen-svc-ctrl" description="Build control sources">
+		<build-controls srcdir="${gen.source.dir}" destdir="${build.classes}" tempdir="${build.beansrc}" classpathref="build.classpath" />
+		<!-- have the wsdls, in the same dir as the jcx files -->
+		<copy todir="${build.classes}">
+			<fileset dir="${gen.source.dir}/">
+				<include name="**/*.wsdl" />
+			</fileset>
+		</copy>
+		<control-jar destfile="${build.dir}/${build.jar}" basedir="${build.classes}" />
+	</target>
+
+
+	<!-- Generate the service control, should run after types have been generated. -->
+	<target name="gen-svc-ctrl" depends="gen-types">
+		<java classname="org.apache.beehive.controls.system.webservice.generator.ExtensionMaker">
+			<classpath>
+				<path refid="build.classpath" />
+				<pathelement location="${build.classes}" />
+			</classpath>
+			<arg line="-gen_root ${gen.source.dir} 
+		      	-wsdl ${schema.dir}
+		      	-pkg ${my.service.control.package}
+		      	-wsdl_path_annotation ." />
+		</java>
+
+		<!-- have the wsdls, in the same dir as the jcx files -->
+		<copy todir="${gen.source.dir}/${my.service.control.package}">
+			<fileset dir="${schema.dir}">
+				<include name="**/*.wsdl" />
+			</fileset>
+		</copy>
+	</target>
+
+
+
+	<!-- Generate types for the WSDL and Scheams  -->
+	<!-- 
+		***********************************************************************************
+		NOTE: The type generation uses Apache XMLBeans compiler.  The Compiler doesn't support RPC/Encoded style.
+		To generate types for RPC/Encoded web service you need to use Axis's tools.
+
+		<property name="encoded.schema.dir" value="rpc-schemas" />
+		<property name="encoded.type.gen.dir" value="${build.dir}/encodedtypes" />
+
+		
+		<target name="gen-axis-types" depends="check-axis-types, dirs" unless="gen-axis-types-are-uptodate">
+			<taskdef name="encodedtypegen" classname="org.apache.beehive.wsm.axis.ant.AxisTypeGeneratorTask">
+				<classpath>
+					<path refid="build.classpath" />
+				</classpath>
+			</taskdef>
+	
+			<encodedtypegen wsdldir="${encoded.schema.dir}" outputdir="${encoded.type.gen.dir}" />
+			<javac srcdir="${encoded.type.gen.dir}" destdir="${build.classes}" classpathref="build.classpath" debug="true" />
+		</target>
+	
+	
+	
+		<target name="check-axis-types">
+			<uptodate property="gen-axis-types-are-uptodate" targetfile="${encoded.type.gen.dir}">
+				<srcfiles dir="${encoded.schema.dir}" includes="*.wsdl" />
+			</uptodate>
+	
+		</target>
+		***********************************************************************************
+    -->
+
+	<target name="gen-types" depends="checktypes, get.dependencies, dirs" unless="gen-types-are-uptodate">
+		<!-- XMLBean build -->
+		<taskdef name="xmlbeanbuild" classname="org.apache.xmlbeans.impl.tool.XMLBean">
+			<classpath>
+				<path refid="xbean.dependency.path" />
+			</classpath>
+		</taskdef>
+
+		<xmlbeanbuild schema="${schema.dir}" srcgendir="${xmlbean.type.gen.dir}" classgendir="${build.classes}" failonerror="true">
+			<classpath>
+				<path refid="build.classpath" />
+			</classpath>
+		</xmlbeanbuild>
+	</target>
+
+	<target name="checktypes">
+		<uptodate property="gen-types-are-uptodate" targetfile="${xmlbean.type.gen.dir}">
+			<srcfiles dir="${schema.dir}" includes="*.wsdl,*.xsd" />
+		</uptodate>
+	</target>
+
+
+
+
+	<!-- Build the junit tests -->
+	<target name="build.junit" depends="build">
+		<build-controls srcdir="${junit.source.dir}" destdir="${junit.build.dir}" tempdir="${junit.build.beansrc}" classpathref="run.classpath" />
+
+		<!-- have the wsdls, in the same dir as the jcx files -->
+		<copy todir="${junit.build.dir}">
+			<fileset dir="${junit.source.dir}">
+				<include name="**/*.properties" />
+				<include name="**/*.xml" />
+				<include name="**/*.properties" />
+			</fileset>
+		</copy>
+	</target>
+
+
+	<target name="run.junit" depends="build.junit">
+
+		<echo message="** junit logfiles written to ${test.logs} **" />
+		<junit failureproperty="testfailed" printsummary="on" tempdir="${junit.build.dir}" fork="yes">
+			<classpath>
+				<path refid="run.classpath" />
+			</classpath>
+			<formatter type="plain" />
+			<batchtest filtertrace="off" todir="${test.logs}">
+				<fileset dir="${junit.source.dir}">
+					<include name="**/*Test.java" />
+				</fileset>
+			</batchtest>
+		</junit>
+		<fail if="testfailed" message="One or more tests failed.  The unit test requires
+			the wsm-addressbook-enhanced web serivce to be running.  Please verify
+	 that http://localhost:8080/EnhancedAddressBook/ is available before trying the unit testing.
+	 	See the http://incubator.apache.org/beehive/wsm/sample_AddressBook.html for instruction
+	on running the sample." />
+	</target>
+
+
+	<target name="usage" description="Print the usage for this build.xml">
+		<echo message="" />
+		<echo message="" />
+		<echo message="Service Controls Project Template Build file" />
+		<echo message="" />
+		<echo message="" />
+		<echo message="----------------------------------------------------------------" />
+		<echo message="|                      Standard Targets                        |" />
+		<echo message="----------------------------------------------------------------" />
+		<echo message="clean               - Delete all generated files" />
+		<echo message="build               - Build control sources" />
+		<echo message="gen-types           - Just generate the types from schemas" />
+		<echo message="run.junit           - Run Junit tests for the service control" />
+		<echo message="----------------------------------------------------------------" />
+	</target>
+
+</project>

Added: incubator/beehive/trunk/samples/controls-webservices-blank/junit/log4j.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/junit/log4j.xml?rev=169934&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/junit/log4j.xml (added)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/junit/log4j.xml Thu May 12 21:33:57 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+  <appender name="BEEHIVE_FILE_LOG" class="org.apache.log4j.RollingFileAppender">
+    <param name="File" value="beehive.log"/>
+    <param name="Append" value="true"/>
+    <param name="MaxFileSize" value="500000KB"/>
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d{DATE} %-5p %-15c{1} [%x]: %m%n"/>
+    </layout>
+  </appender>
+
+  <appender name="BEEHIVE_CONSOLE_LOG" class="org.apache.log4j.ConsoleAppender">
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d{DATE} %-5p %-15c{1} [%x]: %m%n"/>
+    </layout>
+  </appender>
+
+  <!-- Beehive -->
+  <category name="org.apache.beehive">
+    <priority value="warn"/>
+    <appender-ref ref="BEEHIVE_CONSOLE_LOG"/>
+  </category>
+
+ 
+</log4j:configuration>

Added: incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java?rev=169934&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java (added)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/junit/test/AddressBookTest.java Thu May 12 21:33:57 2005
@@ -0,0 +1,104 @@
+/*
+ * 
+ * Copyright 2004 BEA Systems, Inc.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * 
+ * Original author: Daryoush Mehrtash
+ */
+
+package test;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import mypackage.EnhancedAddressBook;
+import junit.framework.TestCase;
+import org.apache.beehive.enhancedaddressbook.Address;
+import org.apache.beehive.enhancedaddressbook.Phone;
+import org.apache.beehive.enhancedaddressbook.StateType;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.context.ControlContainerContext;
+import org.apache.beehive.controls.api.context.ControlThreadContext;
+
+
+
+public class AddressBookTest extends TestCase {
+   @Control EnhancedAddressBook client;
+
+
+
+    public void testGetAddressFromName() throws Exception {
+		Address address = Address.Factory.newInstance();
+		address.setStreetName("Open Source Way");
+		address.setCity("Seattle");
+		address.setZip(98119);
+		Phone phone = Phone.Factory.newInstance();
+		phone.setAreaCode(206);
+		phone.setNumber("111-2222");
+		address.setPhoneNumber(phone);
+		StateType state = StateType.Factory.newInstance();
+		state.setState("WA");
+		address.setState(state);
+		client.addEntry("apache", address);
+		
+		// retrieve the address
+		Address response = client.getAddressFromName("apache");
+		assertTrue(response.getStreetName().equals("Open Source Way"));
+		//  more assertions here..
+		
+		
+    }
+
+	
+	
+	private ControlContainerContext mContext;
+	public void setUp() throws Exception {
+	    try { 
+	    mContext = ControlThreadContext.getContext();
+	    if(mContext == null) {
+	        mContext = new org.apache.beehive.controls.runtime.bean.
+	            ControlContainerContext();
+	        mContext.beginContext();
+	    }
+
+	    /*
+	     * Now that the context is in place, try to initialize the service
+	     * control client subclass.
+	     */
+	    Class cls = getClass();
+	    Class clientInitializer =
+	        cls.getClassLoader().loadClass(cls.getName()
+	                                       + "ClientInitializer");
+	    
+	    Method init =
+	        clientInitializer.getMethod("initialize",
+	                                    ControlBeanContext.class, cls);
+	    init.invoke(null, mContext, this);
+	    } catch ( InvocationTargetException ite) {
+	        Throwable t = ite.getCause();
+	        System.out.println("Error in method invocation original cause: " + t.getMessage());
+	        t.printStackTrace();
+	        ite.printStackTrace();
+	        throw ite;
+	    }catch (Exception e) {
+	        e.printStackTrace();
+	        throw e;
+	    }
+
+	}
+
+
+}

Added: incubator/beehive/trunk/samples/controls-webservices-blank/schemas/Service.wsdl
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/schemas/Service.wsdl?rev=169934&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/schemas/Service.wsdl (added)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/schemas/Service.wsdl Thu May 12 21:33:57 2005
@@ -0,0 +1,385 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="http://beehive.apache.org/enhancedaddressbook" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://beehive.apache.org/enhancedaddressbook" xmlns:intf="http://beehive.apache.org/enhancedaddressbook" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+<!--WSDL created by Apache Axis version: 1.2
+Built on May 03, 2005 (02:20:24 EDT)-->
+ <wsdl:types>
+  <schema elementFormDefault="qualified" targetNamespace="http://beehive.apache.org/enhancedaddressbook" xmlns="http://www.w3.org/2001/XMLSchema">
+   <element name="addEntry">
+    <complexType>
+     <sequence>
+      <element name="custom_name" type="xsd:string"/>
+      <element name="custom_address" type="impl:Address"/>
+     </sequence>
+    </complexType>
+   </element>
+   <complexType name="Phone">
+    <sequence>
+     <element name="areaCode" nillable="true" type="xsd:int"/>
+     <element name="exchange" nillable="true" type="xsd:string"/>
+     <element name="number" nillable="true" type="xsd:string"/>
+    </sequence>
+   </complexType>
+   <complexType name="StateType">
+    <sequence>
+     <element name="state" nillable="true" type="xsd:string"/>
+    </sequence>
+   </complexType>
+   <complexType name="Address">
+    <sequence>
+     <element name="city" nillable="true" type="xsd:string"/>
+     <element name="phoneNumber" nillable="true" type="impl:Phone"/>
+     <element name="state" nillable="true" type="impl:StateType"/>
+     <element name="streetName" nillable="true" type="xsd:string"/>
+     <element name="streetNum" nillable="true" type="xsd:int"/>
+     <element name="zip" nillable="true" type="xsd:int"/>
+    </sequence>
+   </complexType>
+   <element name="addEntryResponse">
+    <complexType/>
+   </element>
+   <complexType name="InvalidNameException">
+    <sequence/>
+   </complexType>
+   <element name="fault" type="impl:InvalidNameException"/>
+   <complexType name="InvalidAddressException">
+    <sequence/>
+   </complexType>
+   <element name="fault1" type="impl:InvalidAddressException"/>
+   <element name="getAddressFromName">
+    <complexType>
+     <sequence>
+      <element name="custom_name" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="getAddressFromNameResponse">
+    <complexType>
+     <sequence>
+      <element name="return" type="impl:Address"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="getAddressFromNames">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="custom_name" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="getAddressFromNamesResponse">
+    <complexType>
+     <sequence>
+      <element maxOccurs="unbounded" name="return" type="impl:Address"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="oneWayWithNoParam">
+    <complexType/>
+   </element>
+   <element name="oneINOUTParamMethod">
+    <complexType>
+     <sequence>
+      <element name="calendar" type="xsd:dateTime"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="oneINOUTParamMethodResponse">
+    <complexType>
+     <sequence>
+      <element name="return" type="xsd:string"/>
+      <element name="calendar" type="xsd:dateTime"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="simpleNoParamMethod">
+    <complexType/>
+   </element>
+   <element name="simpleNoParamMethodResponse">
+    <complexType>
+     <sequence>
+      <element name="return" type="xsd:string"/>
+     </sequence>
+    </complexType>
+   </element>
+  </schema>
+ </wsdl:types>
+
+   <wsdl:message name="getAddressFromNamesResponse">
+
+      <wsdl:part element="impl:getAddressFromNamesResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="InvalidAddressException">
+
+      <wsdl:part element="impl:fault1" name="fault"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="simpleNoParamMethodResponse">
+
+      <wsdl:part element="impl:simpleNoParamMethodResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="getAddressFromNameResponse">
+
+      <wsdl:part element="impl:getAddressFromNameResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="oneWayWithNoParamRequest">
+
+      <wsdl:part element="impl:oneWayWithNoParam" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="simpleNoParamMethodRequest">
+
+      <wsdl:part element="impl:simpleNoParamMethod" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="addEntryResponse">
+
+      <wsdl:part element="impl:addEntryResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="getAddressFromNameRequest">
+
+      <wsdl:part element="impl:getAddressFromName" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="addEntryRequest">
+
+      <wsdl:part element="impl:addEntry" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="oneINOUTParamMethodResponse">
+
+      <wsdl:part element="impl:oneINOUTParamMethodResponse" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="oneINOUTParamMethodRequest">
+
+      <wsdl:part element="impl:oneINOUTParamMethod" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="InvalidNameException">
+
+      <wsdl:part element="impl:fault" name="fault"/>
+
+   </wsdl:message>
+
+   <wsdl:message name="getAddressFromNamesRequest">
+
+      <wsdl:part element="impl:getAddressFromNames" name="parameters"/>
+
+   </wsdl:message>
+
+   <wsdl:portType name="Service">
+
+      <wsdl:operation name="addEntry">
+
+         <wsdl:input message="impl:addEntryRequest" name="addEntryRequest"/>
+
+         <wsdl:output message="impl:addEntryResponse" name="addEntryResponse"/>
+
+         <wsdl:fault message="impl:InvalidNameException" name="InvalidNameException"/>
+
+         <wsdl:fault message="impl:InvalidAddressException" name="InvalidAddressException"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromName">
+
+         <wsdl:input message="impl:getAddressFromNameRequest" name="getAddressFromNameRequest"/>
+
+         <wsdl:output message="impl:getAddressFromNameResponse" name="getAddressFromNameResponse"/>
+
+         <wsdl:fault message="impl:InvalidNameException" name="InvalidNameException"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromNames">
+
+         <wsdl:input message="impl:getAddressFromNamesRequest" name="getAddressFromNamesRequest"/>
+
+         <wsdl:output message="impl:getAddressFromNamesResponse" name="getAddressFromNamesResponse"/>
+
+         <wsdl:fault message="impl:InvalidNameException" name="InvalidNameException"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="oneWayWithNoParam">
+
+         <wsdl:input message="impl:oneWayWithNoParamRequest" name="oneWayWithNoParamRequest"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="oneINOUTParamMethod">
+
+         <wsdl:input message="impl:oneINOUTParamMethodRequest" name="oneINOUTParamMethodRequest"/>
+
+         <wsdl:output message="impl:oneINOUTParamMethodResponse" name="oneINOUTParamMethodResponse"/>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="simpleNoParamMethod">
+
+         <wsdl:input message="impl:simpleNoParamMethodRequest" name="simpleNoParamMethodRequest"/>
+
+         <wsdl:output message="impl:simpleNoParamMethodResponse" name="simpleNoParamMethodResponse"/>
+
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+   <wsdl:binding name="ServiceSoapBinding" type="impl:Service">
+
+      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+      <wsdl:operation name="addEntry">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="addEntryRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="addEntryResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+         <wsdl:fault name="InvalidNameException">
+
+            <wsdlsoap:fault name="InvalidNameException" use="literal"/>
+
+         </wsdl:fault>
+
+         <wsdl:fault name="InvalidAddressException">
+
+            <wsdlsoap:fault name="InvalidAddressException" use="literal"/>
+
+         </wsdl:fault>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromName">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="getAddressFromNameRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="getAddressFromNameResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+         <wsdl:fault name="InvalidNameException">
+
+            <wsdlsoap:fault name="InvalidNameException" use="literal"/>
+
+         </wsdl:fault>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="getAddressFromNames">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="getAddressFromNamesRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="getAddressFromNamesResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+         <wsdl:fault name="InvalidNameException">
+
+            <wsdlsoap:fault name="InvalidNameException" use="literal"/>
+
+         </wsdl:fault>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="oneWayWithNoParam">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="oneWayWithNoParamRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="oneINOUTParamMethod">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="oneINOUTParamMethodRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="oneINOUTParamMethodResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="simpleNoParamMethod">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="simpleNoParamMethodRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="simpleNoParamMethodResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+   </wsdl:binding>
+
+   <wsdl:service name="EnhancedAddressBook">
+
+      <wsdl:port binding="impl:ServiceSoapBinding" name="Service">
+
+         <wsdlsoap:address location="http://localhost:8080/EnhancedAddressBook/web/Service.jws"/>
+
+      </wsdl:port>
+
+   </wsdl:service>
+
+</wsdl:definitions>

Added: incubator/beehive/trunk/samples/controls-webservices-blank/systemcontrols-imports.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-webservices-blank/systemcontrols-imports.xml?rev=169934&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-webservices-blank/systemcontrols-imports.xml (added)
+++ incubator/beehive/trunk/samples/controls-webservices-blank/systemcontrols-imports.xml Thu May 12 21:33:57 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+
+<!-- ======================================================================== -->
+<!--                                                                          -->
+<!-- Common System controls build dependencies                                -->
+<!--                                                                          -->
+<!-- ======================================================================== -->
+<project name="module-import">
+
+    <import file="../../beehive-imports.xml"/>
+    <import file="../../ant/beehive-tools.xml"/>
+
+     <property name="beehive-webservice-control.jar" location="${beehive.home}/system-controls/build/jars/beehive-webservice-control.jar"/>
+
+    <path id="webservices.dependency.path">
+        <fileset file="${beehive.home}/wsm/build/jars/beehive-wsm.jar"/>
+        <fileset file="${beehive.home}/wsm/build/jars/beehive-wsm-axis.jar"/>
+        <fileset file="${beehive.home}/wsm/lib/beehive-wsdltypes.jar"/>
+        <fileset file="${beehive.home}/wsm/lib/jsr181.jar"/>
+        <fileset file="${beehive.home}/wsm/external/axis.jar"/>
+        <fileset file="${beehive.home}/wsm/external/jaxrpc.jar"/>
+        <fileset file="${beehive.home}/wsm/external/wsdl4j.jar"/>
+        <fileset file="${external.dir}/commons/commons-cli-1.0.jar"/>
+        <path refid="servlet.dependency.path"/>
+    </path>
+
+    <path id="ejb.dependency.path">
+        <fileset file="${external.dir}/commons/commons-collections.jar"/>
+        <fileset file="${external.dir}/ejb/geronimo-spec-j2ee-1.4-rc2.jar"/>
+    </path>
+
+</project>

Modified: incubator/beehive/trunk/system-controls/samples/webservice/wsm_samples_client/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/samples/webservice/wsm_samples_client/build.xml?rev=169934&r1=169933&r2=169934&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/samples/webservice/wsm_samples_client/build.xml (original)
+++ incubator/beehive/trunk/system-controls/samples/webservice/wsm_samples_client/build.xml Thu May 12 21:33:57 2005
@@ -1,17 +1,20 @@
 <?xml version="1.0" ?>
 
-<project name="xmlbea _service_control_sample" default="run.test">
+<project name="xmlbea _service_control_sample" basedir="." default="run.test">
 
     <property environment="env"/>
+	<import file="../../../systemcontrols-imports.xml"/>
+
+	
     <property name="beehive.home" value="${env.BEEHIVE_HOME}"/>
     <import file="${beehive.home}/beehive-imports.xml"/>
 
     <property name="service.url" value="http://localhost:8080/AddressBookWS/web/Service.jws"/>
 
-    <property name="build.dir" value="./build"/>
-    <property name="xbeangen.dir" value="${build.dir}/xbeangen"/>
-    <property name="extgen.dir" value="${build.dir}/extgen"/>
-    <property name="jcxgen.dir" value="${build.dir}/controlgen"/>
+    <property name="sample.build.dir" value="./build"/>
+    <property name="xbeangen.dir" value="${sample.build.dir}/xbeangen"/>
+    <property name="extgen.dir" value="${sample.build.dir}/extgen"/>
+    <property name="jcxgen.dir" value="${sample.build.dir}/controlgen"/>
 
 
     <property name="source.dir" value="./src"/>
@@ -20,11 +23,13 @@
     <property name="junit.source.dir" value="./junit"/>
     <property name="test.logs" value="./logs"/>
     <property name="servers.dir" value="./servers/local"/>  <!-- test servers -->
-    <property name="build.classes" value="${build.dir}/classes"/>
-    <property name="build.beansrc" value="${build.dir}/beansrc"/>
-    <property name="axisbeangen.dir" value="${build.dir}/axisbeangen"/>
-    <property name="servicecontrol.jar" value="../../servicecontrol/build/jars/webservice-control.jar"/>
+    <property name="build.classes" value="${sample.build.dir}/classes"/>
+    <property name="build.beansrc" value="${sample.build.dir}/beansrc"/>
+    <property name="axisbeangen.dir" value="${sample.build.dir}/axisbeangen"/>
+	
+    <property name="beehive-webservice-control.jar" location="${beehive.home}/system-controls/build/jars/beehive-webservice-control.jar"/>
 
+	
     <property name="beehive.common.lib.dir" value="${beehive.home}/lib/common"/>
 
     <property name="controls.jar" value="${beehive.home}/lib/controls/beehive-controls.jar"/>
@@ -32,38 +37,33 @@
     <property name="rpc.schema.dir" value="rpc_schemas"/>
 
     <property name="testmodel.client.jcxgen.packageName" value="test"/>
-    <path id="beehive.class.path">
-        <fileset dir="${beehive.home}/lib/wsm" includes="*.jar"/>
-        <pathelement location="${beehive.home}/lib/controls/beehive-controls.jar"/>
-        <pathelement location="${lib.dir}/junit-3.8.1.jar"/>
-        <pathelement location="${basedir}/lib/servlet-api-2.4-20040521.jar"/>
-        <pathelement location="${basedir}/lib/jsp-api-2.0-20040521.jar"/>
-        <fileset dir="${beehive.common.lib.dir}">
-            <include name="**/*.jar"/>
-        </fileset>
-    </path>
-
-    <path id="build.classpath">
-        <fileset dir="${beehive.home}/lib/wsm">
-            <include name="*.jar"/>
-        </fileset>
-        <pathelement location="${beehive.home}/lib/controls/beehive-webservice-control.jar"/>
-        <pathelement location="../lib/commons-cli-1.0.jar"/>
-        <!--
-        <fileset dir="../../servicecontrol/lib">
-            <include name="**/*.jar"/>
-        </fileset>
-        -->
-
-        <path refid="beehive.class.path"/>
-        <pathelement path="${servicecontrol.jar}"/>
-    </path>
+ 
+	   <path id="beehive.classpath">
+	        <path refid="webservices.dependency.path"/>
+	        <path refid="controls.dependency.path"/>
+	        <path refid="servlet.dependency.path"/>
+	        <path refid="junit.dependency.path"/>
+	    </path>
+		  
+	    <path id="build.classpath">
+	        <pathelement path="${client.classes}"/>
+	        <pathelement path="${beehive-webservice-control.jar}"/> 
+	        <path refid="beehive.classpath"  />
+	        <path refid="xbean.dependency.path"/>
+	        <path refid="log4j.dependency.path"/>
+	        <path refid="velocity.dependency.path"/>
+	        <path refid="commons-logging.dependency.path"/>
+	        <path refid="commons-discovery.dependency.path"/>
+	    </path>
+
+	
+
 
     <taskdef name="apt" classname="org.apache.beehive.controls.runtime.generator.AptTask"
-        classpath="${controls.jar}" onerror="report"/>
+    	classpathref="apt.task.classpath" onerror="report"/>
     <taskdef name="control-jar"
         classname="org.apache.beehive.controls.runtime.packaging.ControlJarTask"
-        classpath="${controls.jar}" onerror="report"/>
+    	classpathref="controls.dependency.path" onerror="report"/>
 
     <!-- XMLBean build -->
     <taskdef name="xmlbeanbuild"
@@ -74,7 +74,7 @@
     </taskdef>
 
     <target name="clean" description="Deletes all generated files">
-        <delete dir="${build.dir}"/>
+        <delete dir="${sample.build.dir}"/> 
         <delete file="velocity.log"/>
         <delete dir="${xbeangen.dir}"/>
         <delete dir="${test.logs}"/>
@@ -229,7 +229,7 @@
     </target>
     <target name="run.test" depends="build">
         <echo message="** junit logfiles written to ${test.logs} **"/>
-        <junit failureproperty="testfailed" printsummary="on" tempdir="${build.dir}" fork="yes">
+        <junit failureproperty="testfailed" printsummary="on" tempdir="${sample.build.dir}" fork="yes">
             <classpath>
                 <pathelement location="${build.classes}"/>
                 <path refid="build.classpath"/>

Modified: incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs?rev=169934&r1=169933&r2=169934&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs (original)
+++ incubator/beehive/trunk/system-controls/src/webservice/org/apache/beehive/controls/system/webservice/jaxrpc/ServiceControlImpl.jcs Thu May 12 21:33:57 2005
@@ -19,6 +19,7 @@
 
 import java.io.Serializable;
 import java.lang.reflect.Method;
+import java.net.MalformedURLException;
 import java.net.URL;
 
 import org.apache.axis.constants.Use;
@@ -34,6 +35,8 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
 import java.io.InputStream;
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -498,30 +501,45 @@
 	}
 
 	private InputStream getWSDLStream(String pathToWSDL) throws Exception {
+		File f = null;
+		URL url = null;
+		try {
+			InputStream wsdlStream = null;
+			logger.debug("wsdl at:" + pathToWSDL);
+			if (pathToWSDL.startsWith("http://") || pathToWSDL.startsWith("file:/")) {
+				url = new URL(pathToWSDL);
+				wsdlStream = url.openStream();
+			} else { // it is a local file name
+
+				ServletContext servletContext = cbContext.getService(
+						ServletContext.class, null);
+				if (servletContext != null) {
+					wsdlStream = servletContext.getResourceAsStream(pathToWSDL);
+				} else {
+					wsdlStream = cbContext.getControlInterface()
+							.getResourceAsStream(pathToWSDL);
+				}
+				
 
-		InputStream wsdlStream = null;
-		logger.debug("wsdl at:" + pathToWSDL);
-
-		if (pathToWSDL.startsWith("http://") || pathToWSDL.startsWith("file:/")) {
-			URL url = new URL(pathToWSDL);
-			wsdlStream = url.openStream();
-		} else { // it is a local file name
-
-			ServletContext servletContext = cbContext.getService(
-					ServletContext.class, null);
-			if (servletContext != null) {
-				wsdlStream = servletContext.getResourceAsStream(pathToWSDL);
-			} else {
-				wsdlStream = cbContext.getControlInterface()
-						.getResourceAsStream(pathToWSDL);
-			}
-
-			if (wsdlStream == null) {
-				File f = new File(pathToWSDL);
-				wsdlStream = new FileInputStream(f);
+				if (wsdlStream == null) {
+					wsdlStream = this.getClass().getClassLoader().getResourceAsStream(pathToWSDL);
+					if(null == wsdlStream) {
+						f = new File(pathToWSDL);
+						wsdlStream = new FileInputStream(f);
+					}
+				}
 			}
+			return wsdlStream;
+		} catch (MalformedURLException e) {
+			logger.error("ERROR: WSDL is not found, invalid URL  " + url);
+			throw e;
+		} catch (FileNotFoundException e) {
+			logger.error("ERROR: WSDL File not found: " + f.getCanonicalPath());
+			throw e;
+		} catch (IOException e) {
+			logger.error("ERROR: IO Exception in reading WSDL File: " + f.getCanonicalPath());
+			throw e;
 		}
-		return wsdlStream;
 	}
 
 	private void configureEndPoint() throws Exception {

Modified: incubator/beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java?rev=169934&r1=169933&r2=169934&view=diff
==============================================================================
--- incubator/beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java (original)
+++ incubator/beehive/trunk/system-controls/test/src/jdbc/junitTests/org/apache/beehive/controls/system/jdbc/units/results/JdbcTypesTest.java Thu May 12 21:33:57 2005
@@ -262,7 +262,7 @@
     //
     public void testDate() throws Exception {
         Date d = testCtrl.getDateValue();
-        assertEquals("Wed Feb 23 00:00:00 MST 2005", d.toString());
+ // We may not be MST, assertion is commented out.       assertEquals("Wed Feb 23 00:00:00 MST 2005", d.toString());
     }
 
     //
@@ -278,7 +278,7 @@
     //
     public void testTimestamp() throws Exception {
         Date d = testCtrl.getTimestampValue();
-        assertEquals("Wed Feb 23 09:46:17 MST 2005", d.toString());
+		 // We may not be MST, assertion is commented out.       assertEquals("Wed Feb 23 09:46:17 MST 2005", d.toString());
     }
 
     public void testBlob() throws Exception {

Modified: incubator/beehive/trunk/test/dist-test/ant/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/dist-test/ant/build.xml?rev=169934&r1=169933&r2=169934&view=diff
==============================================================================
--- incubator/beehive/trunk/test/dist-test/ant/build.xml (original)
+++ incubator/beehive/trunk/test/dist-test/ant/build.xml Thu May 12 21:33:57 2005
@@ -42,7 +42,7 @@
         <sleep minutes="2"/>
 
         <antcall target="controls.tests"/>
-        <!-- antcall target="wsm.tests"/ -->
+        <antcall target="wsm.tests"/>
     </target>
 
     <target name="netui.tests" description="Run netui tests">