<?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="assemble-web, deploy-jbi-component,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>
<mkdir dir="${build.classes.dir}/tmp/META-INF"/>
<echo message="created dir = ${build.classes.dir}/tmp/META-INF"/>
<copy file="${jbi-component-su-dir}/su/META-INF/jbi.xml" tofile="${build.classes.dir}/tmp/META-INF/jbi.xml"/>
<fileset dir="${build.classes.dir}/tmp">
</fileset>
</jar>
<!-- Add the WSDL -->
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
<copy file="${basedir}/wsdl/CalculatorService_schema1.xsd" todir="${build.classes.dir}/tmp/WEB-INF/wsdl"/>
<fileset dir="${build.classes.dir}/tmp">
<include name="WEB-INF/wsdl/CalculatorService_schema1.xsd"/>
<include name="WEB-INF/wsdl/CalculatorService.wsdl"/>
</fileset>
</jar>
<!-- Copy the JavaEE app to the service assembly -->
</target>
<target name="deploy-jbi-component">
<antcall target="deploy-jbi-component-su">
<param name="jbi-su-dir" value="${jbi-component-su-dir}"/>
<param name="jbi-su-assembly" value="${jbi-component-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-bundled-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-bundled-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-jbi-component"/>
<antcall target="undeploy-jbi-client"/>
</target>
<target name="undeploy-jbi-component">
<antcall target="undeploy-jbi-component-su">
<param name="jbi-su-assembly" value="${jbi-component-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>