Thomas LACAZE EFREI M2 DT
Requirements | Grade |
---|---|
Create REST Train Filtering service B | 6 |
Create SOAP Train Booking service A | 4 |
Interaction between two services | 4 |
Test with Web service Client (instead of using Eclipse's Web service Explorer) | 1 |
Work with complex data type (class, table, etc.) | 2 |
Work with database (in text file, xml, in mysql, etc.) | 2 |
Postman | 2 |
OpenAPI | 3 |
$ docker run \
-v /etc/localtime:/etc/localtime:ro \
--name train-rest \
-p 8081:8081 \
thomaslacaze/train-rest:latest
You can launch trains generation with Swagger to fill the database. Add call localhost:8081/trains
to see generated trains
- Golang
- Clone the repository
git clone https://github.com/LacazeThomas/Train-project.git
cd Train-project/WS-Train-Filtering
- Run the app
$ go build -o WS-Train-Filtering && ./WS-Train-Filtering
- Eclipse JEE
- Display server view in Eclipse JEE (Windows→Show View→Other→Servers).
- Add new server (Right click → New → Server).
- Select the Server type (Tomcat v9.0 Server).
- Specify the installation directory.
- Right click on java web Project → Properties → Java Build Path. Select Libraries and add JAR : org.Restlet.jar
- Right click on java web Project → Run as → Run Configurations... → Apache Tomcat → Tomcat v9.0 Server at localhost
- Go to environment → Add new env : DATABASE_PATH = "/PATH/soap.db" (replace /PATH/soap.db by the path of your futher the database).
- Download and extract Axis2 1.6.2.
- Fill Axis2 path into your Eclipse JEE : Preferences → Web services → Axis2 Preferences.
- Right click on the Project
WS-Train-Booking
, select Run as → Run on server. Select Choose Tomcat v9.0 -> Next - Verify that the
Configured
tab is displayed : WS-Train-Booking. And click on finish
I used Insomnia to test the API. Insomnia is a Postman like available for REST, SOAP, GraphQL, and GRPC.
An export is available in the repository /Postman
. Insomnia is OpenSource and available on MacOS, Window, Ubuntu here.
You need to run rest container for swagger UI http://localhost:8081/swagger/index.html