<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
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 https://glassfish.dev.java.net/public/CDDL+GPL.html
or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
Sun designates this particular file as subject to the "Classpath" exception
as provided by Sun in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the License
Header, with the fields enclosed by brackets [] replaced by your own
identifying information: "Portions Copyrighted [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.
-->
<target name="help">
<echo message="server: Builds and deploy the service endpoint WAR"/>
<echo message="client: Builds the client"/>
<echo message="run: Runs the client"/>
</target>
ifbo-wsdl-xml-secure/build.xml
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
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 https://glassfish.dev.java.net/public/CDDL+GPL.html
or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
language governing permissions and limitations under the License.
When distributing the software, include this License Header Notice in each
file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
Sun designates this particular file as subject to the "Classpath" exception
as provided by Sun in the GPL Version 2 section of the License file that
accompanied this code. If applicable, add the following below the License
Header, with the fields enclosed by brackets [] replaced by your own
identifying information: "Portions Copyrighted [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 basedir="." default="help" name="ifbo-wsdl-xml-secure">
<import file="etc/deploy-targets.xml"/>
<property name="service.wsdl.location" value="https://${domain.name}:${https.port}/jaxws-ifbo-wsdl-xml-secure/if
boService?wsdl"/>
<path id="jaxws.classpath">
<pathelement location="${java.home}/../lib/tools.jar"/>
<pathelement location="${ifbo.home}/WEB-INF/lib/apifw.jar"/>
<pathelement location="${ifbo.home}/WEB-INF/lib/log4j-1.2.jar"/>
<pathelement location="${javax.home}/servlet-api.jar"/>
<fileset dir="${lib.home}">
<include name="*.jar"/>
<exclude name="j2ee.jar"/>
</fileset>
</path>
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath refid="jaxws.classpath"/>
</taskdef>
<target name="setup">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.classes.home}"/>
<mkdir dir="${build.war.home}"/>
</target>
<target name="clean">
<delete dir="${build.home}" includeEmptyDirs="true"/>
</target>
<target name="build-server-wsdl" depends="setup">
<wsimport
debug="true"
verbose="${verbose}"
keep="true"
extension="true"
destdir="${build.classes.home}"
package="ifbo_wsdl_xml_secure.server"
wsdl="${basedir}/etc/ifboService.wsdl">
</wsimport>
<javac
fork="true"
srcdir="${basedir}/src"
destdir="${build.classes.home}"
includes="**/server/**,**/common/**">
<classpath refid="jaxws.classpath"/>
</javac>
</target>
<target name="create-war">
<war warfile="${build.war.home}/jaxws-${ant.project.name}.war" webxml="etc/web.xml">
<webinf dir="${basedir}/etc" includes="sun-jaxws.xml"/>
<zipfileset
dir="${basedir}/etc"
includes="*.wsdl, *.xsd"
prefix="WEB-INF/wsdl"/>
<classes dir="${build.classes.home}"/>
</war>
</target>
<target name="generate-client" depends="setup, setup-client-truststore">
<echo message="Importing wsdl: ${service.wsdl.location}"/>
<wsimport
fork="true"
debug="true"
verbose="${verbose}"
keep="true"
extension="true"
destdir="${build.classes.home}"
package="ifbo_wsdl_xml_secure.client"
wsdl="${service.wsdl.location}">
<!-- http://today.java.net/pub/a/today/2006/09/19/asynchronous-jax-ws-web-services.html#client-for-synchronous-invocation
-->
<!-- Synchronous -->
<!--
<binding dir="${basedir}/etc" includes="${schema.binding}"/>
<binding dir="${basedir}/etc" includes="${client.binding}"/>
-->
<jvmarg value="-Djavax.net.ssl.trustStore=${client.truststore.file}"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=${client.truststore.pass}" />
</wsimport>
</target>
<target name="client" depends="generate-client">
<javac
fork="true"
srcdir="${basedir}/src"
destdir="${build.classes.home}"
includes="**/client/**,**/common/**">
<classpath refid="jaxws.classpath"/>
</javac>
</target>
<target name="run" depends="setup-certs-props">
<java fork="true" classname="ifbo_wsdl_xml_secure.client.AddNumbersClient">
<classpath>
<path refid="jaxws.classpath"/>
<pathelement location="${build.classes.home}"/>
<pathelement location="${basedir}/etc"/>
</classpath>
<jvmarg value="-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=${log}"/>
<jvmarg value="-Djavax.net.ssl.trustStore=${client.truststore.file}"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=${client.truststore.pass}" />
</java>
</target>
<target name="help">
<echo message="server: Builds and deploy the service endpoint WAR"/>
<echo message="client: Builds the client"/>
<echo message="run: Runs the client"/>
</target>
<target name="server" depends="setup">
<antcall target="clean"/>
<antcall target="build-server-wsdl"/>
<antcall target="create-war"/>
<antcall target="deploy"/>
</target>
</project>