Generating WSDL Document from Java Code
The available functionality of a Web service, the ports to access them, the acceptable format of requests, the format of generated responses, etc. are reflected in the Web service WSDL descriptor, which is normally generated on the server during the Web service deployment. A major part of Web service client development is implementing generation of requests to the service and parsing responses from it in compliance with the WSDL descriptor settings.
Suppose you have developed a Web service and want its client side development start before the Web service itself is deployed, that is, before the WSDL descriptor is generated on the server. With IntelliJ IDEA, you can have it generated before deployment.
To create a WSDL descriptor from Java code
- Select the desired class name in the editor.
- Choose on the main menu or choose from the context menu.
- In the Generate WSDL From Java dialog box that opens specify the following:
- The name and URL address of the Web service.
- The protocol and encoding style used when accessing the public operations of the Web service.
- The type information, including name, operations, parameters and data comprising the interface of the Web service.