Spring Java SOAP Generator

Generating a SOAP web service

Overview

This generator enables the deployment of your OpenLegacy Hub project as a SOAP Web Service within a Java runtime environment. The output is a low-code Spring Boot Java project that accurately reflects the contract of the generated Hub project.

Once deployed and running, you can easily incorporate the latest changes from the Hub project—such as new methods, removed methods, or modifications to input/output fields—by simply stopping and restarting the service. If the deployed project is integrated with an OPZ provider, ensure that the existing OPZ file is replaced with an updated version before restarting the service.

📘

Supported Build tools

  • Gradle (default)
  • Maven

Generating from the CLI

  • Generate a service using an OL Hub project and the Sprint Java SOAP generator; see the ol generate command reference topic to learn more about service generation.
> ol generate --project "your_project_name" --generator spring-java-soap
$ ol generate --project "your_project_name" --generator spring-java-rest --build-tool = gradle

The generated service folder is created. The folder is carrying the project name.


Build and Run a generated Project

# Building the API project 
gradle build
# Running the API as a Spring Boot project
gradle bootrun
# Building the API project into the .m2 and the target directory
mvn clean install -DskipTests
# Building the API project in the target directory
mvn clean package -DskipTests
# Running the API as a Spring Boot project
mvn clean spring-boot:run