How to Create WSDL From Java
WSDL is a language based on XML that is used to describe how to access Web services. If you are attempting to create a Web service client, you should create a WSDL file to describe the messages its clients should send and receive. If you are working in a Java environment, you can convert Java classes to WSDL files by using Axis, which is the Apache core engine for Web services.
Instructions
-
-
1
Start the Web browser and navigate to the Apache Axis download page (see link in Resources). Locate the "1.6.x releases" section, look in the binary distribution tab and click on the "zip" link to start the download. Save the ZIP file on your desktop.
-
2
Right-click on the file you just downloading and select the "Extract All" option from the resulting menu. Select to extract the archive on your desktop and an "axis2-1.6.1" folder is created.
-
-
3
Click Start button and type "cmd" (without the quotes throughout article) and press "Enter" to start the Command Prompt tool.
-
4
Type "cd desktop\axis2-1.6.1\bin" and press "Enter" to change the folder to the "bin" folder. Copy the Java class file to the "bin" folder.
-
5
Type "Java2WSDL.bat -cn Java_class -of WSDL_file" in the command prompt. Replace "Java_class" with the exact name of the Java class and "WSDL_file" with the name of the output WSDL file. Press "Enter" to create the WSDL file from the Java class.
-
1
Tips & Warnings
You can convert WSDL files back to Java classes using the wsdl2java.bat file in the same folder.
References
Resources
- Photo Credit Kim Steele/Photodisc/Getty Images