ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arvi <>
Subject Ant error while running wsdl2java in loop
Date Mon, 26 Apr 2010 06:19:03 GMT

I am trying to run axis2's wsdl2java tool in a loop from a ant build file.

Attached below is the snippet of the build xml to do this

 <target name="wsdl2java">
    <basename property="wsdl" file="${file}" />
        <echo message="Running wsdl to java for service:   ${wsdl}"/>
        <java classname="org.apache.axis2.wsdl.WSDL2Java" fork="yes"
classpathref="classpath" failonerror="true">
            <arg value="-p"/>
            <arg value="${stub-package}"/>
            <arg value="-d"/>
            <arg value="jibx"/>
            <arg value="-Ebindingfile"/>
            <arg value="${jibx-location}\binding.xml"/>
            <arg value="-o"/>
            <arg value="${src-location}"/>
            <arg value="-uri"/>
            <arg value="${wsdl-location}\${wsdl}"/>
            <arg value="-s"/>
    	 <copy toDir="${src-location}\src" failonerror="false"
includeEmptyDirs="yes" verbose="true" >
            <fileset dir="${jibx-location}">
            	<include name="**/*" />                
    	<delete quiet="true" file="${src-location}\build.xml"/>
	 <target name="createstubs" depends="jibxgen">
	  <echo message="Invoking wsdl2java in a loop"/>
 	<foreach target="wsdl2java" param="file" inheritall="true">
 	        <fileset dir="${wsdl-location}" />


When i run the taget "createstubs", i get the following error

     [echo] Invoking wsdl2java in a loop

E:\jibx\23 Apr 2010\build\build.xml:95: Problem: failed to create task or
type foreach
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Can you please help me resolve this?

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message