<!DOCTYPE project [
]>

<project name="UniVerwaltung" default="wsdl2java" basedir=".">

  <!-- targets.xml: Referenced by the build.xml files, this file
     contains targets common to all of the jaxrpc examples.  -->

<property file="build.properties"/>
<!--property name="catalina.home"  value = "/tomcat" /-->
<property name="axislib.home"   value = "${catalina.home}/webapps/axis/WEB-INF/lib" />
<property name="axis.services"  value = "${catalina.home}/webapps/axis/WEB-INF/classes" />
<property name="src"            value = "de/tu_muenchen/informatik/webkemper1/UniVerwaltung_wsdl"/>
<property name="build"          value = "build" />
<property name="lib"            value = "lib" />
<property name="deploy.name"    value = "UniVerwaltung"/>


<property name="service.wsdl.file"    value = "UniVerwaltung.wsdl" />
<property name="axis.wsdl2java.class" value = "org.apache.axis.wsdl.WSDL2Java" />
<property name="endpoint.address"     value = "-lhttp://webkemper1.informatik.tu-muenchen.de:8080/axis/services/UniVerwaltung" />
<property name="client.class"         value = "${src}.Client" />
<property name="Call.ProfName"        value = "Sokrates"/>




  <path id="compile.classpath">        
    <pathelement location="${axislib.home}/axis.jar"/>
    <pathelement location="${axislib.home}/jaxrpc.jar"/>
    <pathelement location="${axislib.home}/saaj.jar"/>
    <pathelement location="${axislib.home}/commons-logging-1.0.4.jar"/>
    <pathelement location="${axislib.home}/commons-discovery-0.2.jar"/>
    <pathelement location="${axislib.home}/wsdl4j-1.5.1.jar"/>  
    <pathelement location="${lib}/xalan.jar"/>    
    <pathelement location="${lib}/xercesImpl.jar"/>    
  </path>
  
  <path id="run.classpath">
     <path refid="compile.classpath"/>
     <pathelement location="${build}"/>     
  </path>
  


  
  <target name="deploy-axis" depends="compile"
     description="deploys the UniVerwaltung Web Service to Axis/services">
     <echo message="Deploying the UniVerwaltung Web Service to Axis/services...."/>
      <java classname="org.apache.axis.client.AdminClient" fork="yes" >
        <arg line="${endpoint.address}  ${src}/deploy.wsdd" />
        <classpath refid="run.classpath" />
    </java>
  </target>
  
  <target name="undeploy-axis"     
     description="undeploys the UniVerwaltung Web Service">
     <echo message="Undeploying the UniVerwaltung Web Service...."/>
      <java classname="org.apache.axis.client.AdminClient" fork="yes" >
        <arg line="${src}/undeploy.wsdd" />
        <classpath refid="run.classpath" />
    </java>
  </target>
  
  
  <target name="deploy" 
    description="Deploys a Web application"  
    depends="deploy-axis">
    <copy todir="${axis.services}/${src}">
        <fileset dir="${build}/${src}" />           
    </copy>
    <delete file="${axis.services}/${src}/Client.class"/>
  </target>

  <target name="undeploy" 
    description="Undeploys a Web application" depends="undeploy-axis">        
  </target>

  <target name="redeploy" 
    description="Undeploys and deploys a Web aplication">
    <antcall target="undeploy" />
    <antcall target="deploy" />
  </target>

  <target name="prepare" 
    description="Creates the build directory" >
    <echo message="Creating the required directories...." />
    <mkdir dir="${build}" />
  </target>

  
  
<target name="compile" depends="prepare"
  description="Compiles the source code created by wsdl2java">
  <echo message="Compiling the source code created by wsdl2java...."/>
  <javac srcdir="${src}" destdir="${build}" includes="*.java">
    <classpath refid="compile.classpath"/>
  </javac>
</target>
  
  
  <target name="wsdl2java" 
     description="Building stubs, skeletons, and data types from WSDL">
      <java classname="${axis.wsdl2java.class}" fork="yes" >
        <arg line="--server-side ${service.wsdl.file} " />
        <classpath refid="compile.classpath" />
    </java>
  </target>
  
  
  
  <target name="run-client" 
     description="Calls UniVerwaltungService">
     <java classname="${client.class}" fork="yes" >
        <arg line="${Call.ProfName}" />
        <classpath refid="run.classpath" />
    </java>
  </target>


  <target name="clean" 
     description="Removes the build directory">
    <delete dir="${build}" />
  </target>

</project>
