<?xml version="1.0"?>
<!DOCTYPE project [
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
The contents of this file are subject to the terms of either the GNU
General Public License Version 2 only ("GPL") or the Common Development
and Distribution License("CDDL") (collectively, the "License"). You
may not use this file except in compliance with the License. You can
obtain a copy of the License at
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
GPL Classpath Exception:
Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the GPL Version 2 section of the License
file that accompanied this code.
Modifications:
If applicable, add the following below the License Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyright [year] [name of copyright owner]"
Contributor(s):
If you wish your version of this file to be governed by only the CDDL or
only the GPL Version 2, indicate your decision by adding "[Contributor]
elects to include this software in this distribution under the [CDDL or GPL
Version 2] license." If you don't indicate a single choice of license, a
recipient has the option to distribute your version of this file under
either the CDDL, the GPL Version 2 or to extend the choice of license to
its licensees as provided above. However, if you add GPL Version 2 code
and therefore, elected the GPL Version 2 license, then the option applies
only if the new code is made subject to such option by the copyright
holder.
-->
]>
<project name="web-client" default="all" basedir=".">
&commonBuild;
&testproperties;
&jaxwsTools;
&jbiproperties;
<target name="all" depends="clean, setup, runtest, undeploy"/>
<target name="clean">
<antcall target="clean-common"/>
<delete file="${jbi-component-su-dir}/assembly/${appname}.war"/>
<delete file="${basedir}/RepRunConf.txt"/>
<delete dir="${basedir}/common:endpoint"/>
</target>
<target name="setup" depends="clean, assemble-web, deploy-app, deploy-dummy-app,assemble-client,deploy-client"/>
<target name="compile">
<antcall target="compile-common">
<param name="src" value="common:endpoint"/>
</antcall>
</target>
<target name="assemble-web" depends="compile">
<echo message="classes dir = ${build.classes.dir}"/>
<echo message="assemble.dir = ${assemble.dir}/${appname}.war"/>
<antcall target="pkg-war">
</antcall>
</target>
<target name="deploy-app">
<exec executable="${ASADMIN}">
<arg line="deploy"/>
<arg line="--user ${admin.user}"/>
<arg line="--host ${admin.host}"/>
<arg line="--port ${admin.port}"/>
<arg line="${app.war}"/>
</exec>
</target>
<target name="deploy-dummy-app">
<antcall target="deploy-jbi-component-su">
<param name="jbi-su-dir" value="${jbi-dummy-su-dir}"/>
<param name="jbi-component-su" value="${jbi-dummy-su}"/>
<param name="jbi-su-assembly" value="${jbi-dummy-su-assembly}"/>
</antcall>
</target>
<target name="assemble-client" >
<mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
<mkdir dir="${assemble.dir}"/>
<echo message="wsimport -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/rpc-literal-generated-wsdl/webservice/CalculatorService?WSDL" />
<antcall target="wsimport">
<param name="wsimport.args"
value="-keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://localhost:8080/rpc-literal-generated-wsdl/webservice/CalculatorService?WSDL"/>
</antcall>
classpath="${env.S1AS_HOME}/modules/javax.servlet.jar"
includes="common/**, webclient/**"/>
<jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
</target>
<target name="deploy-client">
<mkdir dir="/temp"/>
<antcall target="deploy-jbi-component-su">
<param name="jbi-su-dir" value="${jbi-client-su-dir}"/>
<param name="jbi-su-assembly" value="${jbi-client-su-assembly}"/>
</antcall>
</target>
<target name="undeploy" >
<antcall target="undeploy-app"/>
<antcall target="undeploy-dummy-app"/>
<antcall target="undeploy-jbi-client"/>
</target>
<target name="undeploy-app">
<exec executable="${ASADMIN}">
<arg line="undeploy"/>
<arg line="--user ${admin.user}"/>
<arg line="--host ${admin.host}"/>
<arg line="--port ${admin.port}"/>
<arg line="${appname}"/>
</exec>
</target>
<target name="undeploy-dummy-app">
<antcall target="undeploy-jbi-component-su">
<param name="jbi-su-assembly" value="${jbi-dummy-su-assembly}"/>
</antcall>
</target>
<target name="undeploy-jbi-client">
<antcall target="undeploy-jbi-component-su">
<param name="jbi-su-assembly" value="${jbi-client-su-assembly}"/>
</antcall>
</target>
<target name="runtest" >
<mkdir dir="${build.classes.dir}/client"/>
classpath="${env.APS_HOME}/jbi/lib/reporter.jar"
includes="common/**, client/**"/>
<java classname="client.TestClient">
<classpath>
<pathelement path="${build.classes.dir}/client"/>
</classpath>
<arg value="http://${http.host}:${http.port}/wsclient/webclient/RequestProcessor"/>
</java>
</target>
</project>