You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2005/02/25 16:19:18 UTC
svn commit: r155334 - in incubator/apollo/trunk/src/site/content/example:
build.properties build.xml wsrf-Interop-2.0-draft-03.wsdl
wsrf-Interop-2.0-draft-03.xsd
Author: scamp
Date: Fri Feb 25 07:19:16 2005
New Revision: 155334
URL: http://svn.apache.org/viewcvs?view=rev&rev=155334
Log: (empty)
Added:
incubator/apollo/trunk/src/site/content/example/build.properties
Removed:
incubator/apollo/trunk/src/site/content/example/wsrf-Interop-2.0-draft-03.wsdl
incubator/apollo/trunk/src/site/content/example/wsrf-Interop-2.0-draft-03.xsd
Modified:
incubator/apollo/trunk/src/site/content/example/build.xml
Added: incubator/apollo/trunk/src/site/content/example/build.properties
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/build.properties?view=auto&rev=155334
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/build.properties (added)
+++ incubator/apollo/trunk/src/site/content/example/build.properties Fri Feb 25 07:19:16 2005
@@ -0,0 +1,15 @@
+base.url=http://localhost:8080/wsrf/services/
+#base.url=http://localhost:8080/wsrf/services/PrinterFactory
+#base.url=http://localhost:8080/wsrf/services/PrinterPort
+#base.url=http://localhost:8080/wsrf/services/JobPort
+
+
+# Uncomment and modify the below lines if you would like to deploy to a
+# wsrf webapp located somewhere other than the default location of
+# ../webapps/wsrf (e.g. ${env.CATALINA_HOME}/webapps/wsrf)
+wsrf.webapp.dir=${env.CATALINA_HOME}/webapps/wsrf
+
+# Uncomment and modify the below lines if you require a proxy to connect to external web sites
+#http.proxyHost=proxy.xyz.com
+#http.proxyPort=8088
+#http.nonProxyHosts=localhost
Modified: incubator/apollo/trunk/src/site/content/example/build.xml
URL: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/site/content/example/build.xml?view=diff&r1=155333&r2=155334
==============================================================================
--- incubator/apollo/trunk/src/site/content/example/build.xml (original)
+++ incubator/apollo/trunk/src/site/content/example/build.xml Fri Feb 25 07:19:16 2005
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<project name="filesystem_example" default="usage" basedir=".">
+<project name="interop_buildfile" default="usage" basedir=".">
<property environment="env" />
<property file="build.properties" />
@@ -8,67 +8,85 @@
<!-- workaround for those IDEs that dont set ant.home as per the ant script -->
<property name="ant.home" value="env.ANT_HOME"/>
-
- <property name="out.dir" location="generated"/>
- <property name="lib.dir" location="${out.dir}/.xmlbeans/lib"/>
- <property name="filesystem.wsdl" location="FileSystem.wsdl" />
- <property name="sysprop.wsdl" location="SysProps.wsdl" />
- <property name="interop.wsdl" location="wsrf-Interop-2.0-draft-03.wsdl" />
- <property name="interop.xsd" location="wsrf-Interop-2.0-draft-03.xsd" />
-
-
- <target name="init">
-
- <available file="../../webapps/wsrf" type="dir" property="dist.wsrf.webapp.dir" value="../../webapps/wsrf" />
- <condition property="wsrf.webapp.dir" value="${dist.wsrf.webapp.dir}">
- <isset property="dist.wsrf.webapp.dir"/>
- </condition>
-
- <fail unless="wsrf.webapp.dir" message="webapp dir ../../webapps/wsrf does not exist." />
- <echo>Using webapp dir: ${wsrf.webapp.dir}</echo>
- <mkdir dir="${lib.dir}" />
+ <!-- <property name="endpoint.url" value="${base.url}/PrinterFactory" /> -->
+<property name="endpoint.url" value="${base.url}/PrinterPort" />
+ <!-- <property name="endpoint.url" value="${base.url}/JobPort" />-->
+ <property name="classes.dir" location="${basedir}\classes" />
+ <property name="jar.dir" location="${basedir}\lib" />
+ <property name="src.dir" location="${basedir}\src\java" />
+ <property name="wsdl.file" location="${basedir}\src\wsdl\wsrf-Interop-2.0-draft-03.wsdl" />
+ <property name="xsd.file" location="${basedir}\src\wsdl\wsrf-Interop-2.0-draft-03.xsd" />
+
+ <target name="init" unless="apollo.classpath">
+
+ <fail message="Please set the location of the wsrf.webapp.dir in build.properties" unless="wsrf.webapp.dir" />
+ <echo>Using webapp dir: ${wsrf.webapp.dir}</echo>
<path id="apollo.classpath.id">
<pathelement location="${wsrf.webapp.dir}/WEB-INF/classes" />
<fileset dir="${wsrf.webapp.dir}/WEB-INF/lib" includes="*.jar" />
- <fileset dir="${lib.dir}" includes="*.jar" />
+ <fileset dir="${jar.dir}" />
<pathelement location="${activation.jar}" />
<pathelement location="${mail.jar}" />
</path>
<property name="apollo.classpath" refid="apollo.classpath.id" />
-
- </target>
+ </target>
- <target name="generate"
+ <target name="compile"
+ depends="init"
+ description="compile all classes below classes directory">
+ <mkdir dir="${classes.dir}" />
+ <javac srcdir="${src.dir}"
+ destdir="${classes.dir}"
+ classpathref="apollo.classpath.id"
+ debug="on"
+ excludes="xmlbeans/**"/>
+ <copy todir="${classes.dir}">
+ <fileset dir="${src.dir}" excludes="**/*.java,**/package.html" />
+ </copy>
+ </target>
+
+ <target name="deploy"
depends="init"
- description="generate Axis service classes and XMLBeans types for the filesystem WSDL">
-
- <property name="tmp.dir" location="${wsrf.webapp.dir}/_tmp_" />
- <mkdir dir="${tmp.dir}" />
- <copy file="${filesystem.wsdl}" todir="${tmp.dir}" overwrite="true" />
- <copy file="${sysprop.wsdl}" todir="${tmp.dir}" overwrite="true" />
- <copy file="${interop.wsdl}" todir="${tmp.dir}" overwrite="true" />
- <mkdir dir="${wsrf.webapp.dir}/wsdl" />
- <copy file="${interop.xsd}" todir="${wsrf.webapp.dir}/wsdl" overwrite="true" />
-
-
- <taskdef name="wsdl2Java" classname="org.apache.ws.resource.tool.Wsdl2JavaTask" classpath="${apollo.classpath}" />
-
- <wsdl2Java outputDir="${out.dir}"
- classpath="${apollo.classpath}"
- debug="off"
- proxyHost="${http.proxyHost}"
- proxyPort="${http.proxyPort}"
- nonProxyHosts="${http.nonProxyHosts}">
- <wsdls dir="${tmp.dir}">
- <include name="**/*.wsdl" />
- </wsdls>
- </wsdl2Java>
+ description="deploys the JobPort service to the wsrf webapp">
- <delete dir="${tmp.dir}" />
-
- </target>
-
+ <copy file="${wsdl.file}" todir="${wsrf.webapp.dir}/WEB-INF/classes/wsdl" overwrite="true" verbose="true" />
+ <mkdir dir="${wsrf.webapp.dir}/wsdl" />
+ <copy file="${xsd.file}" todir="${wsrf.webapp.dir}/wsdl" overwrite="true" verbose="true" />
+ <echo>Deploying classes to ${wsrf.webapp.dir}/WEB-INF/classes/...</echo>
+ <copy todir="${wsrf.webapp.dir}/WEB-INF/classes" overwrite="true" verbose="true" >
+ <fileset dir="${classes.dir}" />
+ </copy>
+
+ <copy file="${jar.dir}/wsrf-Interop-2.0-draft-03-xbeans.jar" todir="${wsrf.webapp.dir}/WEB-INF/lib" />
+ <!-- update server-config.wsdd using WsddUpdater -->
+ <taskdef name="wsddUpdater" classname="org.apache.ws.util.platform.axis.tool.WsddUpdater" classpathref="apollo.classpath.id" />
+ <property name="config.wsdd" location="${wsrf.webapp.dir}/WEB-INF/server-config.wsdd" /> <!-- normalize path -->
+ <wsddUpdater configWsdd="${config.wsdd}">
+ <wsddPaths dir="${src.dir}" includes="**/*.wsdd" />
+ </wsddUpdater>
+
+ <!-- update jndi-config.wsdd using JndiConfigUpdater -->
+ <taskdef name="jndiUpdater" classname="org.apache.ws.util.jndi.tools.JndiConfigUpdater" classpathref="apollo.classpath.id" />
+ <property name="jndi.config" location="${wsrf.webapp.dir}/WEB-INF/classes/jndi-config.xml" /> <!-- normalize path -->
+ <jndiUpdater jndiConfig="${jndi.config}">
+ <jndiConfigPaths dir="${src.dir}" includes="**/*-config.xml" />
+ </jndiUpdater>
+
+ </target>
+
+ <target name="sendRequest"
+ description="sends a request to the service">
+ <ant antfile="soapclient.xml">
+ <property name="url" value="${endpoint.url}" />
+ </ant>
+
+ </target>
+
+ <target name="clean" description="delete the class files">
+ <delete dir="${classes.dir}" />
+ </target>
+
<target name="usage">
<java classname="org.apache.tools.ant.Main">
<arg value="-buildfile" />
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org