File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Generating java from WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Generating java from WSDL" Watch "Generating java from WSDL" New topic

Generating java from WSDL

Manigandan Velraj

Joined: Nov 30, 2009
Posts: 14

I have a WSDL file and i want to generate java classes from it. i use wsimport to do that. I am able to generate all the java and class files using wsimport, but i need only beans (classes with only getters and setters to be generated)

Can you please help me in generating java classes for content with in <wsdl:types></wsdl:types>

The wsdl is available in

Aj Maven

Joined: Jul 04, 2011
Posts: 22

What IDE are you using ?
If you are using Eclipse IDE, then you can use web service wizard('Ctrl+N'/Web Service/Web Service Client).
You just have to provide the wsdl url and the output folder.

Manigandan Velraj

Joined: Nov 30, 2009
Posts: 14
That helps.. Thanks for the answer.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
If you generate artifacts using the web service wizard in Eclipse, make sure you get what you want.
I am not sure it generates JAXB bean classes. ...and it will still generate other artifacts.
If you do not mind using a terminal window, then use the JAXB schema compiler command "xjc".
It will generate JAXB bean classes from an XML schema or a WSDL and nothing more.
Best wishes!

My free books and tutorials:
I agree. Here's the link:
subject: Generating java from WSDL
It's not a secret anymore!