Enable Web service client development support
To develop a Web service client in IntelliJ IDEA, the corresponding module must be relevantly configured and supplied with all the required libraries. This section describes the most common ways to meet these requirements.
This approach is applicable if you are going to develop the client side for a Web service of one of the following types:
GlassFish/JAXWS2.X RI/Netro 1.X/JWSDP2.0.
RESTful Web Service.
Create a project for a Web service client application
Click New Project on the Welcome screen or select .
From the Generators list, select Jakarta EE.
Name the new project, select a build tool, a language you want to use, and select the Web application project template.
Select the Create Git repository option to place the new project under version control.
From the JDK list, select the JDK that you want to use in your project.
If the JDK is installed on your computer, but not defined in the IDE, select Add JDK and specify the path to the JDK home directory.
If you don't have the necessary JDK on your computer, select Download JDK.
On the next step of the wizard, select the Java Enterprise version to be supported.
From the Dependencies list, select XML Web Services.
Enable Web service client support for an existing project
If you already have a Java Enterprise web application, you can add the Web service client framework support.
Open the build file in the editor (pom.xml or build.gradle depending on the build tool that you use in your project).
Add the following dependency, but make sure to change the version according to your project's requirements:
Java EE<dependency> <groupId>javax.xml.ws</groupId> <artifactId>jaxws-api>/artifactId> <version>2.3.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>javax.jws</groupId> <artifactId>javax.jws-api</artifactId> <version>1.1</version> <scope>provided</scope> </dependency>
Jakarta EE<dependency> <groupId>jakarta.xml.ws</groupId> <artifactId>jakarta.xml.ws-api</artifactId> <version>3.0.1</version> <scope>provided</scope> </dependency>
Java EEcompileOnly('javax.xml.ws:jaxws-api:2.3.1') compileOnly('javax.jws:javax.jws-api:1.1')
Press Ctrl+Shift+O to import the changes.
Enable support for extra WS engines or specific implementation versions
Besides most common WS engines, support of which is enabled through dedicated facets, with IntelliJ IDEA you can enable extra WS engines.
You can use any desired WS engine implementation version that you like.
Download the desired WS engine implementation.
In the Settings/Preferences dialog (Ctrl+Alt+S), click Tools | Web Services in the left pane and specify the path to external web service engines, server name and port, and so on (for details, see Web Services).