Consume a service
Consume data services via executable service JAR files. As part of the project build, an executable JAR file is generated for each service defined in the project. The executable service JAR file will be published in the Gitlab project that stores the data model code. The JAR file can be consumed by any Java application.
Creating and Consuming a service execution JAR file
Create and locate a JAR file
See below steps how to create and locate an executable JAR file for consumption in Studio.
Create a data service. Find instructions here.
Sync workspace.
Navigate to Workflow Builds.
Wait for the build to complete successfully.
Expand the generated workflow build to view the workflow details and click on verify snapshot to open the associated Gitlab pipeline.
In Gitlab, click on Browse under the Job artifacts.
Click on artifacts.
Locate the execution jar file and download it.
Deploy JAR file
The executable JAR file can be used as a dependency to execute your service.
List the JAR file as a dependency in the Java application. For production use cases, the recommendation is to fetch the JAR file from a published repository (such as the public Maven repo).