- Start crating a Java module with the dedicated Web and Web Services facets. Besides setting up the relevant module structure and providing all the necessary libraries automatically, IntelliJ IDEA will create a sample package with a HelloWorld class, which you can use as an example or populate it as necessary to develop your application.
- Add the dedicated facets to an existing module.
-
Create a Java module from scratch.
On the first page of the wizard, select Java Module, not Web Module. (The Web module type is for developing web applications using programming languages other than Java, for example, PHP, or JavaScript, or markup languages.)
-
On the fourth, Technologies, page of the wizard, select the Web Services check box.
Tip
A Web Services facet requires a parent Web facet. The Web Application check box is selected automatically as soon as you select the Web Services check box.
-
In the WebServices area, select the desired WS engine implementation
in the Version drop-down list. The available options are:
- Glassfish/JAX-WS 2.X RI/Metro 1.X/JWSDP 2.0 for developing JAX-WS Web services.
- Apache Axis for developing Apache Axis Web services.
- RESTful Web Services for developing RESTful Web services.
-
The Libraries area shows all the files that are required for development but are currently missing in the module.
To configure the required libraries, do one of the following:
-
To have the missing files downloaded and arranged in a library,
select the Download Missing Files to check box
and specify the target location in the text box below.
Type the path manually or click the Browse button
and choose the desired location
in the Directory for Downloaded Libraries dialog box, that opens.
Then specify the name of the library to be created and its level: project,
module, or global.
Tip
The library constituted of the downloaded files will be available for using in other modules.
- To use one or several libraries, created from previously downloaded files, click the Use Libraries button and select the check boxes next to the desired WS engine implementation libraries in the Select Libraries dialog box, that opens.
-
To have specific files from various locations used,
click the Pick files from disk button and specify the desired files
in the Select Paths dialog box, that opens.
Tip
For multiple selection, keep CtrlControl pressed.
-
To have the missing files downloaded and arranged in a library,
select the Download Missing Files to check box
and specify the target location in the text box below.
Type the path manually or click the Browse button
- Open the Module Settings dialog box.
- In the Modules node, right-click the relevant module.
- To add a Web Application facet, choose from the context menu. In the drop-down list of available facets, select .
- Right-click the Web Facet node and select on its context menu.
- From the context menu, select .
- In the Choose WS Engine drop-down list, select the desired
Web service type. The available options are:
- Glassfish/JAX-WS 2.X RI/Metro 1.X/JWSDP 2.0 for developing JAX-WS Web services.
- Apache Axis for developing Apache Axis Web services.
- RESTful Web Services for developing RESTful Web services.
- If some additional libraries are required, the corresponding warning message is displayed. Click Fix. The necessary libraries will be downloaded and added automatically.

