<project name="BPEL_BluePrint5" default="deploy" basedir=".">
	
	<description> 
		${ant.project.name}
		${line.separator}
	</description>
	
	<!-- Import the base Ant build script... -->
	<property file="../../../install/deployment.properties" />
	
	<property name="version" value="1" />
	
	<property name="server.dir" value="${org.jboss.as.home}/server/${org.jboss.as.config}"/>
	<property name="conf.dir" value="${server.dir}/conf"/>
	<property name="deploy.dir" value="${server.dir}/deploy"/>
	<property name="server.lib.dir" value="${server.dir}/lib"/>

	<property name="sample.jar.name" value="${ant.project.name}-${version}.jar" />
	
	<target name="deploy">
		<echo>Deploy ${ant.project.name}</echo>
		<jar basedir="bpelContent" destfile="${deploy.dir}/${sample.jar.name}" />
	</target> 
 
	<target name="undeploy">
		<echo>Undeploy ${ant.project.name}</echo>
		<delete file="${deploy.dir}/${sample.jar.name}" />
	</target>  
	
	<target name="book_airline">
		<echo>Send airline booking message to: ${ant.project.name}</echo>
	       	<java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
	         	<arg value="http://localhost:8080/BPEL_BluePrint5_ReservationService"/>
	         	<arg value="messages/book_airline.xml"/>
		        <classpath>
			      	<fileset dir="../../common/lib">
			        	<include name="**/*.jar"/>
			      	</fileset>
		           	<pathelement path="${java.class.path}"/>
		        </classpath>
	       </java>
	</target>  
	
	<target name="book_car">
		<echo>Send car booking message to: ${ant.project.name}</echo>
	       	<java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
	         	<arg value="http://localhost:8080/BPEL_BluePrint5_ReservationService"/>
	         	<arg value="messages/book_car.xml"/>
		        <classpath>
			      	<fileset dir="../../common/lib">
			        	<include name="**/*.jar"/>
			      	</fileset>
		           	<pathelement path="${java.class.path}"/>
		        </classpath>
	       </java>
	</target>  
	
	<target name="book_hotel">
		<echo>Send hotel booking message to: ${ant.project.name}</echo>
	       	<java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
	         	<arg value="http://localhost:8080/BPEL_BluePrint5_ReservationService"/>
	         	<arg value="messages/book_hotel.xml"/>
		        <classpath>
			      	<fileset dir="../../common/lib">
			        	<include name="**/*.jar"/>
			      	</fileset>
		           	<pathelement path="${java.class.path}"/>
		        </classpath>
	       </java>
	</target>  
	
	<target name="book_all">
		<echo>Send airline, car and hotel booking message to: ${ant.project.name}</echo>
	       	<java classname="org.apache.ode.tools.sendsoap.cline.HttpSoapSender">
	         	<arg value="http://localhost:8080/BPEL_BluePrint5_ReservationService"/>
	         	<arg value="messages/book_all.xml"/>
		        <classpath>
			      	<fileset dir="../../common/lib">
			        	<include name="**/*.jar"/>
			      	</fileset>
		           	<pathelement path="${java.class.path}"/>
		        </classpath>
	       </java>
	</target>  
</project>
