<?xml version="1.0" ?>
<!DOCTYPE project [
        <!ENTITY properties SYSTEM "file:../../../xmls/properties.xml">
        <!ENTITY paths  SYSTEM "file:../../../xmls/path_refs.xml">
        <!ENTITY taskdefs SYSTEM "file:../../../xmls/taskdefs.xml">
        <!ENTITY taskdefs_post_compile SYSTEM "file:../../../xmls/taskdefs_post_compile.xml">
        <!ENTITY targets SYSTEM "file:../../../xmls/targets.xml">
]>

<!-- ===================================================================
<description>
   Test/Sample Component file for Axis

Notes:
   This is a build file for use with the Jakarta Ant build tool.

Prerequisites:

   jakarta-ant from http://jakarta.apache.org

Build Instructions:
   To compile
        ant compile
   To execute
        ant run

Author:
  Matt Seibert mseibert@us.ibm.com

Copyright:
  Copyright (c) 2002-2003 Apache Software Foundation.
</description>
==================================================================== -->

<project default="compile">

<property name="axis.home" location="../../.." />
<property name="componentName" value="test/wsdl/_import" />
<property name="extraServices" value="work/test/import2/**" />
<property name="extraTestCases" value="test/import2/**" />
        &properties;
        &paths;
        &taskdefs;
        &taskdefs_post_compile;
        &targets;

<target name="clean">
    <echo message="Cleaning up directories" />
    <delete dir="${build.dir}/classes/test/import2" />
    <delete dir="${build.dir}/classes/test/import3" />
    <delete dir="${build.dir}/classes/test/wsdl/_import" />
    <delete dir="${build.dir}/classes/test/_import" />
    <delete dir="${build.dir}/work/test/import2" />
    <delete dir="${build.dir}/work/test/import3" />
    <delete dir="${build.dir}/work/test/wsdl/_import" />
    <delete dir="${build.dir}/work/test/_import" />
</target>

<target name="copy" depends="setenv">
    <copy todir="${build.dir}/classes" overwrite="yes">
      <fileset dir="${test.dir}/wsdl/_import">
        <include name="NStoPkg.properties"/>
      </fileset>
    </copy>
</target>

<target name="compile" depends="copy">

  <!-- cleanup old code -->
  <delete>
    <fileset dir="${build.dir}" includes="work/test/wsdl/_import/**/*.java"/>
    <fileset dir="${build.dir}" includes="work/test/import2/**/*.java"/>
  </delete>

  <echo message="Compiling test.wsdl._import"/>
    <!-- Import Test 1:  some namespace->package mappings from the -->
    <!--                 command line, some generated, some from   -->
    <!--                 NStoPkg.properties.                       -->
    <wsdl2java url="${axis.home}/test/wsdl/_import/Import.wsdl"
               output="${axis.home}/build/work"
               deployscope="none"
               serverSide="yes"
               skeletonDeploy="yes"
               noimports="no"
               verbose="no"
               testcase="yes">
        <mapping namespace="urn:import" package="test.wsdl.import"/>
        <mapping namespace="urn:importBinding1" package="test.wsdl.import.binding1"/>
        <mapping namespace="urn:importBinding2" package="test.wsdl.import.binding2"/>
    </wsdl2java>
    <!-- Import Test 2:  all namespace->package mappings from the -->
    <!--                 command line.                            -->
    <wsdl2java url="${axis.home}/test/wsdl/_import/Import.wsdl"
               output="${axis.home}/build/work"
               deployscope="none"
               serverSide="yes"
               skeletonDeploy="yes"
               noimports="no"
               verbose="no"
               testcase="yes">
        <mapping namespace="urn:import" package="test.import2"/>
        <mapping namespace="urn:importBinding1" package="test.import2.binding1"/>
        <mapping namespace="urn:importBinding2" package="test.import2.binding2"/>
        <mapping namespace="urn:types.import.test" package="test.import2.types"/>
        <mapping namespace="urn:iface.import.test" package="test.import2.iface"/>
        <mapping namespace="urn:messages.import.test" package="test.import2.messages"/>
    </wsdl2java>

    <!-- Import Test 3:  all namespace->package mappings from the -->
    <!--                 command line.  Make sure an xsd:import   -->
    <!--                 statement inside a schema inside a type  -->
    <!--                 works properly.                          -->
    <wsdl2java url="${axis.home}/test/wsdl/_import/ImportMessagesXSDImport.wsdl"
               output="${axis.home}/build/work"
               noimports="no">
        <mapping namespace="urn:types.import.test" package="test.import.test3"/>
    </wsdl2java>

    <javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="${debug}" nowarn="${nowarn}" source="${source}" fork="${javac.fork}">
      <classpath refid="classpath" />
      <include name="test/import2/**/*.java" />
      <include name="test/import3/**/*.java" />
      <include name="test/wsdl/_import/**/*.java" />
      <include name="test/_import/**/*.java" />
    </javac>


</target>

<target name="run" >
  <antcall target="execute-Component" />
</target>

</project>
