This application implements the GITB test service APIs in a
Spring Boot web application that is meant to support
GITB TDL test cases running in the Interoperability Test Bed.
The sample messaging service is used by the Test Bed to send and receive a text message. When told to send
a message
this service simply logs it. Regarding received messages, these are provided via HTTP GET call upon which time the
appropriate active test sessions get notified via callback. To manually complete a pending 'receive' call, make a GET
request to http://localhost:8080/input?message=MESSAGE&session=SESSION in which you set the 'MESSAGE' placeholder to the
text to send back, and the 'SESSION' placeholder to the test session ID to notify. Note that the 'session' parameter can
be altogether skipped to notify all pending test sessions.
Once running, the messaging endpoint's WDSL is available at http://localhost:8080/services/messaging?WSDL. See here for further information on messaging service implementations.
The sample processing service is used by the Test Bed to lowercase or uppercase a given text input.
Once running, the processing endpoint's WDSL is available at http://localhost:8080/services/process?WSDL. See here for further information on validation service implementations.
The sample validation service validates a text against an (also provided) expected value. The user of the service can also select whether he/she wants to have a mismatch reported as an error or a warning. Finally, an information message is also returned in case values match but when ignoring casing.
Once running, the validation endpoint's WDSL is available at http://localhost:8080/services/validation?WSDL. See here for further information on processing service implementations.
The following prerequisites are required:
- To build: JDK 17+, Maven 3.8+.
- To run: JRE 17+.
- Build using
mvn clean package
. - Once built you can run the application in two ways:
a. With maven:mvn spring-boot:run
.
b. Standalone:java -jar ./target/validator-VERSION.jar
.
This project uses Spring Boot's live reloading capabilities. When running the application from your IDE or through Maven, any change in classpath resources is automatically detected to restart the application.
Running this application as a Docker container is very simple as described in Spring Boot's Docker documentation. The first step is to Install Docker and ensure it is up and running. You can now build the Docker image through Maven:
- Build the JAR file with
mvn package
. - Build the Docker image with
mvn dockerfile:build
.
Assuming an image name of local/validator
, it can be ran using docker --name validator -p 8080:8080 -d local/validator
.