ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
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"/>
</path>

<taskdef resource="axis-tasks.properties" classpathref="lib.axis" />

...



-----Original Message-----
From: Lalith Weerasinghe [mailto:LWeerasinghe@virtusa.com]
Sent: 30 June 2004 17:22
To: user@ant.apache.org
Cc: Lalith Weerasinghe
Subject: how to automate the java2wsdl using ant?


Hi,
 
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 

-l"http://localhost:8080/rti/services/SimpleWebService"
-n"http://rti.ascential.com/SimpleWebService/"
-p"com.ascentialsoftware.ws.rpc.common"
"http://rti.ascential.com/SimpleWebService/"
com.ascentialsoftware.ws.rpc.common.SimpleWebService

 
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=
"com.ascentialsoftware.ws.rpc.common.ATFWSPackCustomerService " 
     style= "rpc " 
     namespace= "urn:http://rti.ascential.com/SimpleWebService/" 
     location= "http://localhost:8080/rti/services/SimpleWebService
<http://localhost:8080/rti/services/SimpleWebService> " 
     output=
"C:/devspace17062004/development/qa/inputs/rti/WSPackNLSTestsTC/WrittenR
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= "urn:com.ascentialsoftware.ws.rpc.common"
package= "com.ascentialsoftware.ws.rpc.common"/> 
    </axis-java2wsdl> 
    </target>
 
 
Then i'm getting an error like this....
 
C:\devspace17062004\development\qa\inputs\rti\WSPackNLSTestsTC\WrittenRp
cWS>ant generate-wsdl
Buildfile: build.xml
 
compile:
 
generate-wsdl:
 
BUILD FAILED
file:C:/devspace17062004/development/qa/inputs/rti/WSPackNLSTestsTC/Writ
tenRpcWS/build.xml:202: Could not create task or  type of type:
axis-java2wsdl.
 
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 apache.org
 - 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
classpath
 
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 
ASCENTIAL-WSQA 
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 
E-mail: lweerasinghe@virtusa.com 
Website: www.virtusa.com 

 


--------------------------------------------------------------------------------------------------
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message