Spring Java SOAP Generator
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 incorporate the latest changes from the Hub project, such as new methods, removed methods, or modifications to input/output fields, by stopping and restarting the service. If the deployed project is integrated with an OPZ provider, replace the existing OPZ file with an updated version before restarting the service.
📘 Supported Build tools
- Gradle (default)
- Maven
SOAP runtime
A SOAP project publishes its endpoints with Apache CXF or with the Jakarta (metro) runtime. The choice is the project's Publish SOAP endpoints with Apache CXF setting in the project information.
- New projects publish with CXF.
- Existing projects stay on metro, so a running service does not change runtime.
- Turn CXF off only for a project already running on the metro runtime. Import warnings for a WSDL are measured against CXF, so they understate what metro drops.
The WSDL facets the importer carries (for example lengths, patterns and ranges) are shown read-only on SOAP fields in the model manager.
Generating from the CLI
- Generate a service using an OL Hub project and the Spring 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-soap
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