Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

A SOAP web service for reading information about a student (XML-based) and A REST web service for registering (creating) information about a student (JSON-based)

smmsadrnezh/student_webservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

This application consists of two components:

  • A SOAP web-service for reading information of a student (XML-based)
  • A REST web-service for registering (creating) information of a student (JSON-based)

How to run

Install the requirements:

python3 -m venv venv/
source venv/bin/activate
pip3 install -r student_webservice/requirements.txt

Run the program:

source venv/bin/activate
python3 main.py

How to use

Install the requirements:

sudo apt install curl tidy -y

Test registration API with a sample JSON data:

curl -s http://localhost:8000/ -d '{"register": {"std_id": 98443138, "name": "Masoud Sadrnezhaad", "major": "IT", "level": "MSc"}}'

Test get student information API with XML data:

curl -s http://localhost:8001/ -d "<?xml version='1.0' encoding='UTF-8'?><soap11env:Envelope xmlns:soap11env=\"http://schemas.xmlsoap.org/soap/envelope/\"><soap11env:Body>  <get_student>  <std_id>98443138</std_id>  </get_student></soap11env:Body></soap11env:Envelope>" | tidy -q -xml -indent -wrap 0

About

A SOAP web service for reading information about a student (XML-based) and A REST web service for registering (creating) information about a student (JSON-based)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages