soap2rest demonstrates a strangler-style migration where an existing SOAP contract is kept stable while the backend behavior is implemented by a REST application.
The module is split so each concern stays explicit:
- SOAP facade for legacy-compatible integration
- REST backend for persistence, validation, security, and async processing
- shared REST DTOs for cross-module contracts
- small shared utilities used by both sides
Detailed design notes live in ARCHITECTURE.md.
- SOAP endpoint translating service orders into REST calls
- Spring Boot REST backend with JPA, Liquibase, H2, Swagger, and API-key security
- synchronous gas, electric, meter, and smart metric flows
- asynchronous smart metric submission over JMS/Artemis with polling
- module-focused testing with WireMock, Cucumber, Mockito, and Testcontainers
- common
- shared utility code used by the REST and SOAP modules
- currently provides the
@ExecutionTimeaspect for lightweight timing logs
- rest-api
- shared DTOs such as
Metric,Metrics, and async result payloads
- shared DTOs such as
- rest-app
- runnable Spring Boot REST backend with controllers, services, DAO layer, security, Swagger, and tests
- soap
- SOAP endpoint and SOAP-to-REST translation layer
- owns the WSDL-generated model and SOAP-side integration tests
- Client sends a
DSRequestto the SOAP endpoint. soapresolves the target service and operation.soapcallsrest-appover HTTP.rest-appvalidates, persists, and returns JSON.soapmaps the REST result back intoDSResponse.
- Client sends a SOAP smart
PUTrequest with the async flag enabled. soapforwards that call torest-appwith?async=true.rest-appreturns202 Acceptedand a request id, storesACCEPTED, and pushes work to Artemis.- A JMS listener consumes the queued message and calls the normal smart business logic.
- Client later polls the result through a separate SOAP request, which
soaptranslates into a REST async-result lookup.
- SOAP app default port:
8078 - REST app default port:
8081 - SOAP WSDL:
http://localhost:8078/soap2rest/soap/v1/DeliverServiceWS.wsdl - REST Swagger UI:
http://localhost:8081/swagger-ui/index.html
From the repository root:
Run REST tests:
mvn -pl soap2rest/rest-app -am testRun SOAP tests:
mvn -pl soap2rest/soap -am testStart the REST backend first:
mvn -pl soap2rest/rest-app -am spring-boot:runStart the SOAP facade:
mvn -pl soap2rest/soap -am spring-boot:run- module design and boundaries: ARCHITECTURE.md
- REST implementation details: rest-app/README.md
- SOAP contract and request mapping: soap/README.md