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/02/04 02:53:24 UTC

svn commit: r151288 - incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF incubator/beehive/trunk/samples/wsm-blank/WEB-INF/src/template

Author: mmerz
Date: Thu Feb  3 17:53:22 2005
New Revision: 151288

URL: http://svn.apache.org/viewcvs?view=rev&rev=151288
Log:
Fixing enhanced address book sample.

Added:
    incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-client-svn.xml
      - copied, changed from r151285, incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/client-build.xml
    incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-svn.xml
      - copied, changed from r151285, incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build.xml
Removed:
    incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build.xml
    incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/client-build.xml
Modified:
    incubator/beehive/trunk/samples/wsm-blank/WEB-INF/src/template/Blank.jws

Copied: incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-client-svn.xml (from r151285, incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/client-build.xml)
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-client-svn.xml?view=diff&rev=151288&p1=incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/client-build.xml&r1=151285&p2=incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-client-svn.xml&r2=151288
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/client-build.xml (original)
+++ incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-client-svn.xml Thu Feb  3 17:53:22 2005
@@ -1,69 +1,97 @@
 <?xml version="1.0" ?>
 
-<project name="AddressBookClient" basedir="." default="all">
-	
-	<property name="AddressBook.wsdl.url" 
-		value="http://localhost:8080/EnhancedAddressBook/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>
-
+<!--
+   Copyright 2004 The Apache Software Foundation 
  
-	<target name="clean">
-		<delete dir="build" />
-		<delete dir="./logs" />
-		
-	</target>
-	
-	<target name="dirs">
-		<mkdir dir="build" />
-		<mkdir dir="build/generated" />
-		<mkdir dir="build/classes" />
-		<mkdir dir="./logs" />
+   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:$
+ -->
 
-	</target>	
-	<target name="all" depends="genClient, compile, test"/>
+<project name="EnhancedAddressBookWS Client" basedir="." default="test">
 	
-	<target name="genClient" depends="dirs">
-	    <wsdl2java url="${AddressBook.wsdl.url}"
-	               output="build/generated"
-	               testcase="yes">
-	    </wsdl2java>
+  <import file="../../../beehive-imports.xml" />
+
+  <property
+      name="wsdl.url" 
+      value="http://localhost:8080/EnhancedAddressBookWS/web/Service.jws?wsdl" />
+  <property name="webapp.dir" value=".." />
+  <property name="web.inf.dir" value="${webapp.dir}/WEB-INF" />
+  <property name="lib.dir" value="${web.inf.dir}/lib" />
+  <property name="log.dir" value="${web.inf.dir}/logs" />
+  <property name="build.dir" value="${web.inf.dir}/build-client" />
+  <property name="gen.dir" value="${build.dir}/gen" />
+  <property name="classes.dir" value="${build.dir}/classes" />
+      
+  <path id="jars">
+    <fileset dir="${lib.dir}">
+      <include name="**/*.jar"/>
+    </fileset>
+  </path>
+	
+  <target name="test" depends="dirs,compile">
+    <junit
+        printsummary="yes"
+        haltonfailure="yes"
+        showoutput="yes">
+      <classpath>
+        <pathelement location= "${classes.dir}"/>
+      <path refid="jars"/>
+      </classpath>
+      <formatter type="plain"/>
+      <batchtest fork="yes" todir="${log.dir}">
+        <fileset dir="${classes.dir}">
+          <include name="**/*Test*.class"/>
+        </fileset>
+      </batchtest>
+    </junit>
+  </target>
+	
+  <target name="compile" depends="genClient">
+    <javac
+        srcdir="${gen.dir}"
+	destdir="${classes.dir}"
+	classpathref="jars"
+	failonerror="true"
+ 	source="1.4" />
+  </target>	
+	
+  <target name="genClient" depends="dirs">
+    <deploy-wsm webappDir="${webapp.dir}" />
+    <taskdef
+        name="wsdl2java"
+        classname="org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask"
+        loaderref="axis">
+      <classpath refid="jars"/>
+    </taskdef>
+    <wsdl2java
+        url="${wsdl.url}"
+	output="${gen.dir}"
+	testcase="yes">
+    </wsdl2java>
+  </target>
+	
+  <target name="clean">
+    <delete dir="${build.dir}" />
+    <delete dir="${log.dir}" />
+    <delete dir="${lib.dir}" />
+  </target>
+	
+  <target name="dirs">
+    <mkdir dir="${build.dir}" />
+    <mkdir dir="${gen.dir}" />
+    <mkdir dir="${classes.dir}" />
+    <mkdir dir="${log.dir}" />
+  </target>	
 
-	</target>
-	
-	<target name="compile" depends="genClient">
-  		 <javac srcdir="build/generated"
-			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>
-            <formatter type="plain"/>
-	    	<batchtest fork="yes" todir="./logs">
-	   	    <fileset dir="build/classes">
-	   	      <include name="**/*Test*.class"/>
-	   	    </fileset>
-	   	  </batchtest>
-	   	</junit>
-		
-	</target>
-	
 </project>

Copied: incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-svn.xml (from r151285, incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build.xml)
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-svn.xml?view=diff&rev=151288&p1=incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build.xml&r1=151285&p2=incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-svn.xml&r2=151288
==============================================================================
--- incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build.xml (original)
+++ incubator/beehive/trunk/samples/wsm-addressbook-enhanced/WEB-INF/build-svn.xml Thu Feb  3 17:53:22 2005
@@ -20,107 +20,75 @@
 
 <project name="EnhancedAddressBookWS" default="build" basedir=".">
 
-	<property environment="env" />
+  <import file="../../../beehive-imports.xml" />
 
-	<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/EnhancedAddressBookWS.jar">
-			<fileset dir="${classes.dir}" />
-		</jar>
-	</target>
-
-
-	<!-- ========================================= -->
-	<!-- compile - compile sources                 -->
-	<!-- ========================================= -->
-
-	
-	<!-- <target name="compile" depends="update_jars, dirs" if="isJDK15" >  -->
-		<target name="compile" depends="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/EnhancedAddressBookWS.jar" />
-		<delete dir="${build.dir}" />
-		<delete dir="${gen.dir}" />
-	</target>
+  <property name="service.name" value="EnhancedAddressBook" />
+  
+  <property name="webapp.dir" location=".." />
+  <property name="web.inf.dir" location="${webapp.dir}/web-inf" />
+  <property name="attachments.dir" location="${web.inf.dir}/attachments" />
+  <property name="classes.dir" location="${web.inf.dir}/classes" />
+  <property name="lib.dir" location="${web.inf.dir}/lib" />
+  <property name="webservice.jar" location="${lib.dir}/${service.name}WS.jar" />
+  <property name="webservice.war" location="${service.name}WS.war" />
+  
+  <condition property="isJDK15">
+    <equals arg1="${ant.java.version}" arg2="1.5" />
+  </condition>
+
+  <path id="jars">
+    <fileset dir="${lib.dir}" >
+      <include name="**/*.jar" />
+    </fileset>
+  </path>
+
+  
+  <!-- ========================================= -->
+  <!-- deploy.war - build deployable artifact    -->
+  <!-- ========================================= -->
+  
+  <target name="deploy.war">
+    <jar jarfile="${to.dir}/${service.name}WS.war">
+      <fileset dir="${webapp.dir}">
+        <exclude name="${web.inf}/src/**" />
+        <exclude name="${web.inf}/.tmpbeansrc/**" />
+      </fileset>
+    </jar>
+  </target>
+  
+
+  <!-- ========================================= -->
+  <!-- build - build all binaries                -->
+  <!-- ========================================= -->
+
+  <target name="build" depends="dirs">
+    <deploy-wsm webappDir="${webapp.dir}" />
+    <build-webapp webappDir="${webapp.dir}" />
+    <jar jarfile="${webservice.jar}">
+      <fileset dir="${classes.dir}" />
+    </jar>
+  </target>
+
+  
+  <!-- ========================================= -->
+  <!-- clean - remove binary files               -->
+  <!-- ========================================= -->
+
+  <target name="clean">
+    <delete dir="${attachments.dir}" />
+    <delete dir="${lib.dir}" />
+    <delete file="velocity.log" />
+    <clean-webapp webappDir="${webapp.dir}" />
+  </target>
+
+  
+  <!-- ========================================= -->
+  <!-- dirs - create dirs required for compile   -->
+  <!-- ========================================= -->
+
+  <target name="dirs">
+    <mkdir dir="${attachments.dir}" />
+    <mkdir dir="${classes.dir}" />
+  </target>
 
 </project>

Modified: incubator/beehive/trunk/samples/wsm-blank/WEB-INF/src/template/Blank.jws
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/wsm-blank/WEB-INF/src/template/Blank.jws?view=diff&r1=151287&r2=151288
==============================================================================
--- incubator/beehive/trunk/samples/wsm-blank/WEB-INF/src/template/Blank.jws (original)
+++ incubator/beehive/trunk/samples/wsm-blank/WEB-INF/src/template/Blank.jws Thu Feb  3 17:53:22 2005
@@ -17,13 +17,14 @@
  */
 
 import javax.jws.WebMethod;
+import javax.jws.WebParam;
 import javax.jws.WebService;
 
 @WebService
 public class Blank
 {
     @WebMethod
-    public String sayHelloWorld(String s)
+    public String sayHelloWorld(@WebParam(name="name",header=true) String s)
     {
         return "Hello world, " + s + "!";
     }