Ant Build.xml - Cant get wsdl2java target to compile directory of files

Discussion in 'Java' started by DaveJ, May 18, 2007.

  1. DaveJ

    DaveJ Guest

    Hi,

    I'm fairly new to using the ant build environment, so I'm sure I'm
    asking a silly question but here goes anyway.
    I have a directory of wsdl files called /tmp/wsdl

    I'm trying to use the axis wsdl2java target to compile each of the
    wsdl files to java. At the moment I have to put a line in my
    build.xml for each file I want to compile to java.

    Is there a way I can just get an entire dir of wsdl files compiled?
    I've already tried using "*". Heres what my build file looks like at
    the moment:

    <path id="axis.classpath">
    <fileset dir="third-party/lib">
    <include name="**/*jar"/>
    <include name="apache-axis-1.1-beta.jar"/>
    <include name="apache-axis-commons-discovery-1.1-
    beta.jar"/>
    <include name="apache-axis-commons-logging-1.1-
    beta.jar"/>
    <include name="apache-axis-jaxrpc-1.1-beta.jar"/>
    <include name="apache-axis-saaj-1.1-beta.jar"/>
    <include name="apache-axis-wsdl4j-1.1-beta.jar"/>
    </fileset>
    </path>
    <taskdef resource="axis-tasks.properties"
    classpathref="axis.classpath" />

    <target name="wsdl2java" description="wsdl2java">
    <axis-wsdl2java output="/tmp/java" all="true" url="/tmp/wsdl/
    **" >
    </axis-wsdl2java>
    </target>
    DaveJ, May 18, 2007
    #1
    1. Advertising

  2. Re: Ant Build.xml - Cant get wsdl2java target to compile directoryof files

    DaveJ wrote:
    > I'm fairly new to using the ant build environment, so I'm sure I'm
    > asking a silly question but here goes anyway.
    > I have a directory of wsdl files called /tmp/wsdl
    >
    > I'm trying to use the axis wsdl2java target to compile each of the
    > wsdl files to java. At the moment I have to put a line in my
    > build.xml for each file I want to compile to java.
    >
    > Is there a way I can just get an entire dir of wsdl files compiled?
    > I've already tried using "*". Heres what my build file looks like at
    > the moment:


    > <target name="wsdl2java" description="wsdl2java">
    > <axis-wsdl2java output="/tmp/java" all="true" url="/tmp/wsdl/
    > **" >
    > </axis-wsdl2java>
    > </target>


    It is not standard for URL's to supporrt wildcards.

    You could try the for task in ant-contrib:
    http://ant-contrib.sourceforge.net/tasks/tasks/for.html
    as a workaround.

    Arne
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, May 19, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Thomas Stien
    Replies:
    0
    Views:
    466
    Thomas Stien
    Oct 18, 2004
  2. Nagaraj
    Replies:
    1
    Views:
    853
    Lionel B
    Mar 1, 2007
  3. DaveJ
    Replies:
    2
    Views:
    1,875
    p.lechev
    Nov 4, 2010
  4. mauro
    Replies:
    0
    Views:
    411
    mauro
    Oct 10, 2007
  5. Replies:
    0
    Views:
    1,228
Loading...

Share This Page