IntelliJ IDEA 13.1.0 Web Help

This approach is applicable if you are going to develop a Web service of one of the following types:

  • GlassFish/JAXWS2.X RI/Netro 1.X/JWSDP2.0.
  • Apache Axis.

IntelliJ IDEA creates the relevant Web services module structure, downloads and adds all the necessary libraries automatically through two dedicated facets:

To enable Web Service development support through a dedicated facet, do one of the following
  • 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.

Note

When you create a new module from scratch, the Web facet is created automatically as soon as you create the Web Services facet. When you add facets to an existing module, you need to create the Web Application facet first. In either case, IntelliJ IDEA will download the predefined WS engine implementation version.

To create a module for a web service application
  1. 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.)

  2. 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.

  3. 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.
  4. 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 browseButton.png 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 Ctrl pressed.

To add the dedicated facets to an existing module
  1. Open the Module Settings dialog box.
  2. In the Modules node, right-click the relevant module.
  3. To add a Web Application facet, choose New from the context menu. In the drop-down list of available facets, select Web.
  4. Right-click the Web Facet node and select New on its context menu.
  5. From the New context menu, select Web Services.
  6. 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.
  7. If some additional libraries are required, the corresponding warning message is displayed. Click Fix. The necessary libraries will be downloaded and added automatically.

See Also

Concepts:

Procedures:

Reference:

Web Resources: