I want to generate Web Service Classes from WSDL File. I want server side code not client side. wsimport creates client sides. which tool do you use to create server side code from WSDL File?
3 Answers
Use NetBeans or Eclipse. Both of them make it really easy to create a new web service from an existing WSDL.
Eclipse tutorial: http://www.eclipse.org/webtools/community/tutorials/TopDownAxis2WebService/td_tutorial.html
NetBeans tutorial:
http://weblogs.java.net/blog/2008/03/05/developing-webservices-wsdl-using-netbeans

- 5,845
- 4
- 31
- 57
-
2Just FYI: the NetBeans link is gone. – achAmháin Feb 27 '18 at 16:08
To complete Andreas_D response, I have used wsdl2java to generate Java Web Service client from WSDL document.
Download page wsdl2java (binary distribution is ready to use)
You can simply generate code with command line :
wsdl2java -d output_directory/ document.wsdl
The code will be saved in output_directory folder.

- 10,744
- 13
- 61
- 94
-
1I was pulling my hair out trying to get eclipse's built-in axis generator to work correctly. It would generate the code, but the code would be... flawed. It wouldn't compile, and it was certainly "old"... as in code that would've worked back in the day when we hadn't thought up annotations yet. Then I tried using Axis 2, and it just flat out would not work. What compounded the problem was that the wsdl I was using had an element that also had an attribute on it... Eclipse's default generator could not create working code from that. Long story short - this worked. Good code. No issues. – Edge D-Vort Jan 29 '18 at 16:11
-
3
-
1The only code that would be "server-side" would be the code that marshalls/unmarshalls the generated classes and then does server-side things with the data. Whether it's client-side or server-side, the same classes need to be generated. This answer explains how to generate the pojo's you'll need. – Edge D-Vort Feb 26 '18 at 16:13
Apache Axis could be your friend. It ships with a wsdl2java tool to autogenerate Java classes from a wsdl file for both client and server.
For testing and experimenting: use soapUi in addition.

- 113,398
- 19
- 180
- 268