ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: how to automate the java2wsdl using ant?
Date Thu, 01 Jul 2004 08:01:10 GMT
Does your build.xml file contain a <taskdef> for axis-wsdl2java (the last bullet point
on the output from Ant)?

Assuming ${dir.lib.axis} is the directory where your Axis jars are,

<path id="lib.axis">
    <fileset dir="${dir.lib.axis}" includes="*.jar"/>

<taskdef resource="" classpathref="lib.axis" />


-----Original Message-----
From: Lalith Weerasinghe []
Sent: 30 June 2004 17:22
Cc: Lalith Weerasinghe
Subject: how to automate the java2wsdl using ant?

Can u pls let me know how to use this axis-java2wsdl task or and way to
automate java2wsdl command in java which we use in command line as 
java org.apache.axis.wsdl.Java2WSDL -o wsdl/SimpleWebService.wsdl 


How i tried in my buil.xml is as follows(i used to hard code parameters
as for the trial)
    <target name="generate-wsdl" depends="compile">
    <axis-java2wsdl classname=
" " 
     style= "rpc " 
     namespace= "urn:" 
     location= "http://localhost:8080/rti/services/SimpleWebService
<http://localhost:8080/rti/services/SimpleWebService> " 
pcWS/ATFWSPackCustomerService.wsdl "> 
    <!-- if when trawling our classes, axis-ant finds a class, we need 
    to tell it how to remap the name --> 
     <mapping namespace= ""
package= ""/> 
Then i'm getting an error like this....
cWS>ant generate-wsdl
Buildfile: build.xml
tenRpcWS/build.xml:202: Could not create task or  type of type:
Ant could not find the task or a class this task relies upon.
This is common and has a number of causes; the usual
solutions are to read the manual pages then download and
install needed JAR files, or fix the build file:
 - You have misspelt 'axis-java2wsdl'.
   Fix: check your spelling.
 - The task needs an external JAR file to execute
   and this is not found at the right place in the classpath.
   Fix: check the documentation for dependencies.
   Fix: declare the task.
 - The task is an Ant optional task and optional.jar is absent
   Fix: look for optional.jar in ANT_HOME/lib, download if needed
 - The task was not built into optional.jar as dependent
   libraries were not found at build time.
   Fix: look in the JAR to verify, then rebuild with the needed
   libraries, or download a release version from
 - The build file was written for a later version of Ant
   Fix: upgrade to at least the latest release version of Ant
 - The task is not an Ant core or optional task
   and needs to be declared using <taskdef>.
Remember that for JAR files to be visible to Ant tasks implemented
in ANT_HOME/lib, the files must be in the same directory or on the
Please neither file bug reports on this problem, nor email the
Ant mailing lists, until all of these causes have been explored,
as this is not an Ant bug.
Total time: 1 second
I tried in may ways but time to time it is giving different errors and
making me confused.
pls help me to get this target work.

Thanks & Regards, 

Lalith Weerasinghe, 
Associate Software Engineer 
Virtusa (Sri Lanka) Private Limited 
Trans Asia Commercial Complex 
No. 117, Sir Chittampalam A. Gardiner Mw. 
Colombo 2, Sri Lanka. 
Office: +94 (0) 11 4702352 


This message, including any attachments, contains confidential information intended for a
specific individual and purpose, and is intended for the addressee only.  Any unauthorized
disclosure, use, dissemination, copying, or distribution of this message or any of its attachments
or the information contained in this e-mail, or the taking of any action based on it, is strictly
prohibited.  If you are not the intended recipient, please notify the sender immediately by
return e-mail and delete this message. 

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

View raw message