IntelliJ IDEA 14.0.0 Web Help

Enabling Web Service Development Support Through a Dedicated Facet

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

To create a module for a web service application

  1. Do one of the following:
    • If you are going to create a new project: click Create New Project on the Welcome screen or select File | New Project.

      As a result, the New Project wizard opens.

    • If you are going to add a module to an existing project: open the project you want to add a module to, and select File | New Module.

      As a result, the New Module wizard opens.

  2. On the first page of the wizard, in the left-hand pane, select Java. In the right-hand part of the page, specify the JDK that you are going to use.
  3. Under Additional Libraries and Frameworks, select the Web Application check box.

    Select the version of the Servlet specification to be supported from the Versions list.

    If you want the deployment descriptor web.xml file to be created, select the Create web.xml check box.

  4. Select the WebServices check box.
  5. If you want sample server code to be generated, select the corresponding check box.
  6. Select the desired WS engine implementation from the Version list.
  7. You'll need a library that implements the selected WS engine. You can choose to use an existing library, create and use a new one, download the library files if they are not yet available on your computer, or postpone setting up the library until a later time.
    • Use library. Select the library to be used from the list (if the corresponding library is already defined in IntelliJ IDEA).

      Create. If the corresponding library files (.jar) are already available on your computer, you can arrange those files in a library and use that new library. To do that, click Create and select the necessary files in the dialog that opens. (Use the Ctrl key for multiple selections.)

      Optionally, click Configure to edit the selected library. (For an existing library the Edit Library dialog will open, for the library that you have just created - the Create Library dialog.)

    • Download. Select this option to download the WS engine implementation. (The downloaded files will be arranged in a library.)

      Optionally, click Configure to edit the library settings and contents. (The Downloading Options dialog will open.)

    • Set up library later. Select this option to postpone setting up the library until a later time.

    Configure. Click this button to edit the settings for the library selected next to Use library or the one that is about to be downloaded.

    Click Next.

  8. Specify the name and location settings. For more information, see Project Name and Location or Module Name and Location.

    Click Finish.

To add the dedicated facets to an existing module

  1. Open the Project tool window (e.g. View | Tool Windows | Project ).
  2. Right-click the module of interest and select Add Framework Support.
  3. In the left-hand pane of the Add Frameworks Support dialog that opens, select the Web Application check box.
  4. In the right-hand part of the dialog, select the version of the Servlet specification to be supported from the Versions list.

    If you want the deployment descriptor web.xml file to be created, select the Create web.xml check box.

  5. Select the WebServices check box.
  6. If you want sample server code to be generated, select the corresponding check box.
  7. Select the desired WS engine implementation from the Version list.
  8. You'll need a library that implements the selected WS engine. You can choose to use an existing library, create and use a new one, download the library files if they are not yet available on your computer, or postpone setting up the library until a later time.
    • Use library. Select the library to be used from the list (if the corresponding library is already defined in IntelliJ IDEA).

      Create. If the corresponding library files (.jar) are already available on your computer, you can arrange those files in a library and use that new library. To do that, click Create and select the necessary files in the dialog that opens. (Use the Ctrl key for multiple selections.)

      Optionally, click Configure to edit the selected library. (For an existing library the Edit Library dialog will open, for the library that you have just created - the Create Library dialog.)

    • Download. Select this option to download the WS engine implementation. (The downloaded files will be arranged in a library.)

      Optionally, click Configure to edit the library settings and contents. (The Downloading Options dialog will open.)

    • Set up library later. Select this option to postpone setting up the library until a later time.

    Configure. Click this button to edit the settings for the library selected next to Use library or the one that is about to be downloaded.

  9. Click OK in the Add Frameworks Support dialog.

See Also

Last modified: 12 November 2014
comments powered by Disqus