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

D

DaveJ

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>
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

DaveJ said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top