A friendly place for Java greenhorns!
Java
Ranch
»
JavaRanch Saloon
Search
|
FAQ
|
Recent Topics
|
Hot Topics
Register
/
Login
Java
Ranch
»
Forums
»
Java
»
Web Services
Author
How to generate WSDL file for a java class
Ravi Kiran V
Ranch Hand
Joined: Apr 18, 2009
Messages: 1203
posted
Feb 04, 2010 21:37:29
Hi
I have a simple
java
class developed with JAX WS Annotations ,i have exposed it as a webservice using @Webservice and @webmethods .
Now i deploy this in a Sun One Application server it automatically generates a WSDL file .
But i dont want it that way , is there any way so that i can generate the WSDL file using any tool and later deploy that in any Server .
Please share your ideas
Thank you.
I tried to change the world, but I couldn’t find the source code
Vinod K Singh
Ranch Hand
Joined: Sep 30, 2008
Messages: 196
posted
Feb 04, 2010 21:52:46
Have a look at
Wsgen
tool.
My Blog
Ravi Kiran V
Ranch Hand
Joined: Apr 18, 2009
Messages: 1203
posted
Feb 04, 2010 22:40:10
Hi ,
Thanks for the response vinodh .
The tool is nice to genearte the WSDL files for the given java class
But somehow i am doing some mistake and cant figure it out .
It is displaying as Missing SEI .
can you please help me .
Filename
Webservice.jpeg
Download
Description
Filesize
27 Kbytes
Downloaded:
6 time(s)
This message was edited 2 times. Last update was at
Feb 04, 2010 22:50:10
by Ravi Kiran V
I tried to change the world, but I couldn’t find the source code
Vinod K Singh
Ranch Hand
Joined: Sep 30, 2008
Messages: 196
posted
Feb 05, 2010 04:33:30
You can try with relevant wsgen commans options mentioned in JAX-WS documentation. Alternatively this can be done using Ant script as well, one example is given below-
<wsgen sei="pkg.MyServiceImpl" resourcedestdir="${gen.wsdl.dir}" sourcedestdir="${gensrc.dir}" destdir="${dest.dir}" genwsdl="true" verbose="${verbose}" keep="true"> <classpath> <pathelement location="${classes.dir}" /> </classpath> </wsgen>
My Blog
Java
Ranch
»
Forums
»
Java
»
Web Services
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter