Before starting this article, let's talk about the concepts of buttom-up (bottom-up) and top-down (top-down ).
This is two ways to develop WebService.
Bottom-up mode: first create a Java Bean or EJB, and then create a WSDL file and Web Service through the Web Services Template
Top-down mode: Create a wsdl file first. You can use the WSDL editor to create a web service and a corresponding Java class through Web Services.
The advantages of top-down are:
To prevent incompatibility between some specific data types in different languages, we recommend that you first define the WSDL interface, including input and output parameters, return values, and other data types. In this way, the server does not need to care about how the client is called or how the server is implemented.
The development procedure is as follows:
- Create a dynamic web project
- Create a new WSDL file under this project
- After step by step, you can draw the WSDL graphically
- Draw complete and save. Use WSDL to generate Web service.
Create a web service and select "Top down Java Bean web service ". Select the newly produced WSDL
- Adjust the server type slider to "develop service"
6. After the Java code is generated along the way to next, modify the Java code ending with impl.