| <!-- |
| |
| Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <!DOCTYPE project [ |
| <!ENTITY commonSetup SYSTEM "file:./../../../config/properties.xml"> |
| <!ENTITY commonBuild SYSTEM "file:./../../../config/common.xml"> |
| <!ENTITY testproperties SYSTEM "file:./build.properties"> |
| ]> |
| |
| <project name="xsd test" default="usage" basedir="."> |
| |
| <!-- include common.xml and testcommon.xml --> |
| &commonSetup; |
| &commonBuild; |
| &testproperties; |
| |
| <target name="all" depends="clean,build,deploy,run,undeploy"/> |
| |
| |
| <target name="run.wscompile"> |
| <exec executable="${WSCOMPILE}" failonerror="true" > |
| <arg line="-source 1.1.2 ${wscompile.command}" /> |
| </exec> |
| </target> |
| |
| <target name="compile" depends=""> |
| <antcall target="compile-common"> |
| <param name="src" value="client"/> |
| </antcall> |
| <antcall target="compile-common"> |
| <param name="src" value="ejb"/> |
| </antcall> |
| </target> |
| |
| <target name="build" depends="init-common, clean"> |
| <antcall target="gen-mapping-appclient"/> |
| <antcall target="gen-mapping-ejb"/> |
| <antcall target="wscompile-appclient"/> |
| <antcall target="wscompile-ejb"/> |
| <antcall target="assemble"/> |
| </target> |
| |
| <target name="wscompile-appclient" depends="init-common"> |
| <mkdir dir="output"/> |
| <antcall target="run.wscompile"> |
| <param name="wscompile.command" |
| value="-import -keep -d output -s output -classpath . -f:explicitcontext wscompile_config_appclient.xml"/> |
| </antcall> |
| <copy todir="${build.classes.dir}/soapfaults"> |
| <fileset dir="output/soapfaults" |
| includes="TestService.class, Test.class, Test1RequestType.class, Test2RequestType.class, Test1ResponseType.class, FaultOne.class, FaultTwo.class, FaultThree.class"/> |
| </copy> |
| <delete dir="output"/> |
| </target> |
| |
| <target name="wscompile-ejb" depends="init-common"> |
| <mkdir dir="output"/> |
| <antcall target="run.wscompile"> |
| <param name="wscompile.command" |
| value="-import -keep -d output -s output -classpath . -f:explicitcontext wscompile_config_ejb.xml"/> |
| </antcall> |
| <copy todir="${build.classes.dir}/soapfaultsejb"> |
| <fileset dir="output/soapfaultsejb" |
| includes="TestService.class, Test.class, Test1RequestType.class, Test2RequestType.class, Test1ResponseType.class, FaultOne.class, FaultTwo.class, FaultThree.class"/> |
| </copy> |
| <delete dir="output"/> |
| </target> |
| |
| <target name="assemble" depends="init-common, compile"> |
| <copy todir="${build.classes.dir}/META-INF/wsdl" |
| file="soapfaults.wsdl"/> |
| <copy todir="${build.classes.dir}" |
| file="mapping_appclient.xml"/> |
| <antcall target="appclient-jar-common"> |
| <param name="appclientjar.classes" |
| value="mapping_appclient.xml,META-INF/wsdl/**,soapfaults/*.class" /> |
| |
| </antcall> |
| <copy todir="${build.classes.dir}" |
| file="mapping_ejb.xml"/> |
| <antcall target="ejb-jar-common"> |
| <param name="ejbjar.classes" |
| value="mapping_ejb.xml,META-INF/wsdl/**,soapfaultsejb/*.class" /> |
| |
| </antcall> |
| <antcall target="ear-common" /> |
| </target> |
| |
| <target name="deploy" |
| depends="init-common"> |
| <antcall target="deploy-common"/> |
| </target> |
| |
| <target name="clean" depends="init-common"> |
| <antcall target="clean-common"/> |
| <delete dir="out"/> |
| <delete dir="output"/> |
| <delete dir="soapfaults"/> |
| <delete dir="soapfaultsejb"/> |
| <delete file="mapping.xml"/> |
| <delete file="mapping_ejb.xml"/> |
| <delete file="mapping_appclient.xml"/> |
| <delete file="jaxrpc.log"/> |
| <delete file="good.debugModel.txt"/> |
| <delete file="bad.debugModel.txt"/> |
| </target> |
| |
| <target name="run" depends="init-common"> |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="http://${http.host}:${http.port}/soapfaultsejb/SoapFaultsTest"/> |
| </antcall> |
| </target> |
| |
| <target name="undeploy" depends="init-common"> |
| <antcall target="undeploy-common"/> |
| </target> |
| |
| <target name="gen-mapping-appclient" depends="init-common"> |
| <antcall target="run.wscompile"> |
| <param name="wscompile.command" |
| value="-import -cp . -mapping mapping_appclient.xml -f:explicitcontext wscompile_config_appclient.xml"/> |
| </antcall> |
| </target> |
| |
| <target name="gen-mapping-ejb" depends="init-common"> |
| <antcall target="run.wscompile"> |
| <param name="wscompile.command" |
| value="-import -cp . -mapping mapping_ejb.xml -f:explicitcontext wscompile_config_ejb.xml"/> |
| </antcall> |
| </target> |
| |
| <target name="mapping" depends="init-common"> |
| <delete dir="out"/> |
| <mkdir dir="out"/> |
| <antcall target="run.wscompile"> |
| <param name="wscompile.command" |
| value="-import -cp . -keep -d out -Xprintstacktrace -Xdebugmodel:good.debugModel.txt -mapping mapping.xml -f:explicitcontext wscompile_config_ejb.xml"/> |
| </antcall> |
| </target> |
| |
| <target name="genall" depends="init-common, mapping"> |
| <delete dir="out"/> |
| <mkdir dir="out"/> |
| <antcall target="run.wscompile"> |
| <param name="wscompile.command" |
| value="-gen:both -cp . -keep -d out -Xprintstacktrace -Xdebugmodel:bad.debugModel.txt -f:explicitcontext config.xml"/> |
| </antcall> |
| </target> |
| |
| |
| <target name="usage"> |
| <echo> |
| Usage: |
| ant all (Executes the WebServices test) |
| </echo> |
| </target> |
| </project> |