Java SOAP Api ( Students CRUD API)
a simple java soap api for students crup operations using jaka jax-ws library and maven build tool and Myslq database
- Java 11
- Maven (Apache Maven 3.9.5) : link to maven installation guide: https://www.baeldung.com/install-maven-on-windows-linux-mac
- Mysql (10.4.27-MariaDB)
- Jax-ws 4.0.2
- Jakarta.servlet-api 5.0.0
- Clone the project and import the database file "scolarite.sql" in your mysql server
- Open the project in your IDE
- Create a database in your mysql server with the name "scolarite" and table "etudiants"
- or import the database file in your mysql server
- Run the project from ServerWS.java
- Open the url http://127.0.0.1:8080/scolarite in your browser to see the wsdl file
- Now you can test the project in Postman or Chrome
- Open the Postman
- Import the wsdl file in the postman by adding the url: http://localhost:8080/ws/students.wsdl
- You will see the SOAP api in the postman
- Now you can test the project
- Open the Chrome file location in your computer
- Open the file location of the chrome.exe
- Open the cmd in this location
- Run the command: " chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
- Or you can run : " chrome.exe --user-data-dir="C://chrome-dev-disabled-security" --disable-web-security --disable-site-isolation-trials"
- Note: Dont Browse the internet with this chrome instance because it is not secure
java_soap_api
└── src
└── main
└── java
└── com
└── iam
├── CrosFilter.java
├── ServerWS.java
├── Student.java
├── ScolariteService.java
├── Filiere.java
├── MySqlConction.java
└── Main.java (for Test)
└── .vscode
└── settings.json
└── target
└── demo-1.0-SNAPSHOT.jar
└── maven-archiver
└── maven-status
└── test-classes
└── classes
└── generated-sources
└── pom.xml
└── README.md
└── scolarite.sql
- CrosFilter.java : a filter to allow cross origin requests
- ServerWS.java : the main class of the project
- Student.java : the student model
- ScolariteService.java : the service class of the project
- Filiere.java : Is a ENUM class that contains the filiere of the students
- MySqlConction.java : the class that contains the connection to the database
- Main.java : a class for testing the project
- settings.json : the vscode settings file