Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Next, we run the client class in the run target using the java task with the JAR file generated using the -clientjar option in the classpath:
<target name="run">
<java fork="true" classname="hellowsclient.HelloWSClient">
<classpath>
<path refid="classpath"/>
<pathelement location="${build.classes.home}"/>
<pathelement location="${build.classes.home} /HelloWSServiceClient.jar"/>
<pathelement location="${basedir}/config"/>
</classpath>
<jvmarg value="-Dcom.sun.xml.ws.transport. http.client.HttpTransportPipe.dump=${log}"/>
</java>
</target>
The build.xml is listed as follows:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="help" name="clientjar">
<property name="java.home" value="C:/Program Files/Java/jdk1.7.0" />
<property name="modules.home" value="C:/glassfish3/glassfish/modules" />
<import file="config/deploy-targets.xml"/>
<path id="classpath">
<pathelement location="${java.home}/lib/tools.jar"/>
<fileset dir="${modules.home}">
<include name="*.jar"/>
</fileset>
</path>
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath refid="classpath"/>
Apache Ant build file, creatingclient, running</taskdef>
<target name="setup">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.classes.home}"/>
<mkdir dir="${build.war.home}"/>
</target>
<target name="clean">
<delete dir=....