IntelliJ IDEA 2019.2 Help

Exposing Code as Web Service

Suppose, you have a piece of code that implements a certain functionality and you want this functionality to be available on the Web through a specific protocol. In this case you need to transform existing code into a Web service and deploy. The action updates the Web service descriptors and generates additional deployment code if needed. This action is required every time any Web service method signature is changed or a new method is added or removed.

To expose a class

  1. Position the caret at the class name in the editor and press Alt+Enter or click the yellow bulb icon icons actions intentionBulb svg.

  2. From the suggestion list, choose Expose Class as Web Service.

  3. In the Expose Class As Web Service dialog 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.

    IntelliJ IDEA automatically adds the service description to the server-config.wsdd file.

Last modified: 17 October 2019