blob: 09611632a9cf8a2864d85581e3e398274493d5ba [file] [log] [blame]
Vinay Vishal57171472018-09-18 20:22:00 +05301<?xml version="1.0"?>
2<!--
3
4 Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved.
5
6 This program and the accompanying materials are made available under the
7 terms of the Eclipse Public License v. 2.0, which is available at
8 http://www.eclipse.org/legal/epl-2.0.
9
10 This Source Code may also be made available under the following Secondary
11 Licenses when the conditions for such availability set forth in the
12 Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
13 version 2 with the GNU Classpath Exception, which is available at
14 https://www.gnu.org/software/classpath/license.html.
15
16 SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
17
18-->
19
20<!DOCTYPE project [
21<!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml">
22<!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml">
23<!ENTITY jaxwsTools SYSTEM "file:./../jaxwstools.xml">
24<!ENTITY testproperties SYSTEM "file:./build.properties">
25]>
26
27<project name="webservices13-addressing-2" default="all" basedir=".">
28
29 &commonSetup;
30 &commonBuild;
31 &testproperties;
32 &jaxwsTools;
33
34 <path id="classpath">
35 <fileset dir="${env.S1AS_HOME}/modules">
36 <include name="*.jar"/>
37 </fileset>
38 <fileset dir="${env.S1AS_HOME}/modules/endorsed">
39 <include name="*.jar"/>
40 </fileset>
41 <fileset dir="${env.APS_HOME}/lib">
42 <include name="*.jar"/>
43 </fileset>
44 </path>
45
46
47 <target name="all" depends="clean, setup, runtest,undeploy"/>
48
49 <target name="clean" depends="init-common">
50 <antcall target="clean-common"/>
51 <delete dir="${env.S1AS_HOME}/build/localwsdl"/>
52 </target>
53
54 <target name="setup" depends="assemble-web, deploy-app, assemble-client, deploy-client" />
55
56 <target name="compile" depends="init-common">
57 <antcall target="compile-common">
58 <param name="src" value="endpoint"/>
59 </antcall>
60 </target>
61
62 <target name="assemble-web" depends="init-common">
63 <mkdir dir="${build.classes.dir}"/>
64 <!--<antcall target="wsimport">
65 <param name="wsimport.args"
66 value=" -Xendorsed -p endpoint -keep -d ${build.classes.dir} ${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing/SubtractNumbers.wsdl"/>
67 </antcall> -->
68 <antcall target="compile"/>
69 <antcall target="pkg-war">
70 <param name="wsdlfile.location" value="${env.APS_HOME}/devtests/webservice/annotations/webservices13-addressing-2"/>
71 <param name="wsdlfile.name" value="SubtractNumbers.wsdl"/>
72 <param name="war.classes" value="${build.classes.dir}"/>
73 <param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
74 </antcall>
75 </target>
76
77 <target name="assemble-client" depends="init-common">
78 <mkdir dir="${build.classes.dir}/webclient/WEB-INF/classes"/>
79 <antcall target="wsimport">
80 <param name="wsimport.args"
81 value="-p client -Xendorsed -keep -d ${build.classes.dir}/webclient/WEB-INF/classes http://${http.host}:${http.port}/webservices13-addressing-2/webservice/SubtractNumbersService?wsdl"/>
82 </antcall>
83 <javac srcdir="." destdir="${build.classes.dir}/webclient/WEB-INF/classes"
84 includes="webclient/**">
85 <classpath refid="classpath"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +020086
Vinay Vishal57171472018-09-18 20:22:00 +053087 </javac>
88 <copy file="client-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/web.xml"/>
89 <copy file="client-sun-web.xml" tofile="${build.classes.dir}/webclient/WEB-INF/sun-web.xml"/>
90 <jar destfile="${assemble.dir}/wsclient.war" basedir="${build.classes.dir}/webclient" includes="**"/>
91 </target>
92
93 <target name="deploy-client" depends="init-common">
94 <property name="client.war" value="${assemble.dir}/wsclient.war"/>
95 <echo message="Deploying ${wsdl.war} from ${basedir}." level="verbose"/>
96 <exec executable="${ASADMIN}">
97 <arg line="deploy"/>
98 <arg line="--user ${admin.user}"/>
99 <arg line="--passwordfile ${admin.password.file}"/>
100 <arg line="--host ${admin.host}"/>
101 <arg line="--port ${admin.port}"/>
102 <arg line="${client.war}"/>
103 </exec>
104 </target>
105
106 <target name="undeploy-client" depends="init-common">
107 <exec executable="${ASADMIN}">
108 <arg line="undeploy"/>
109 <arg line="--user ${admin.user}"/>
110 <arg line="--passwordfile ${admin.password.file}"/>
111 <arg line="--host ${admin.host}"/>
112 <arg line="--port ${admin.port}"/>
113 <arg line="wsclient"/>
114 </exec>
115 </target>
116
117 <target name="deploy-app">
118 <antcall target="deploy-war-common">
119 <param name="contextroot" value="${appname}"/>
120 </antcall>
121 </target>
122
123 <target name="undeploy" depends="init-common">
124 <antcall target="undeploy-war-common"/>
125 <antcall target="undeploy-client"/>
126 </target>
David Matějčekf4dc06a2021-05-17 12:10:57 +0200127
Vinay Vishal57171472018-09-18 20:22:00 +0530128 <target name="runtest" depends="init-common">
129 <mkdir dir="${build.classes.dir}/client"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +0200130 <javac srcdir="." destdir="${build.classes.dir}/client"
131 classpath="${env.APS_HOME}/lib/reporter.jar"
Vinay Vishal57171472018-09-18 20:22:00 +0530132 includes="client/**"/>
133 <unjar src="${env.APS_HOME}/lib/reporter.jar" dest="${build.classes.dir}/client"/>
134 <java classname="client.TestClient">
135 <classpath>
136 <pathelement path="${build.classes.dir}/client"/>
137 </classpath>
138 <arg value="http://${http.host}:${http.port}/wsclient/RequestProcessor"/>
139 </java>
140 </target>
141</project>
142