SlideShare une entreprise Scribd logo
1  sur  11
REST Web Service
By: Sari Meriem
1
UNIVERSITY of MOHAMED CHERIF MESAADIA
SOUK-AHRAS
Departement of Math & Computer Science
Presentation About:
Reminder
2Meriem Sari Service Web 2eme AM GL
 Stands for: Representational State Transfer.
 Is an architectural style.
 Introduced first in 2000 then standardized in 2008.
 Everything in REST is considered as a resource.
 Every resource is identified by an URI.
Reminder
3
 Resources are handled using POST, GET, PUT, DELETE operations
which are similar to Create, Read, update and Delete(CRUD)
operations.
 It uses uniform interfaces.
 A RESTful Web service is a Web service implemented using HTTP
and the principles of REST.
Meriem Sari Service Web 2eme AM GL
Requirements
4
 Eclipse luna.
 jersey-archive-1.18.
Meriem Sari Service Web 2eme AM GL
Example
5Meriem Sari Service Web 2eme AM GL
Example
6
Copy all jar files from the Jersey zip into WEB-INF/lib folder.
Select build path in your project and add the same jars in your build
path.
Create package called com.javatutorialscorner.rest.ws.
Create following class inside package com.javatutorialscorner.rest.ws
RestHelloWorld .java
Meriem Sari Service Web 2eme AM GL
Example
7Meriem Sari Service Web 2eme AM GL
Example
8
 We get the following
structure for our
program
Meriem Sari Service Web 2eme AM GL
Example
9
 We configure the « web.xml » file to have the following code
Meriem Sari Service Web 2eme AM GL
Example
10
 We create the client class under the same package containing the
following code:
Meriem Sari Service Web 2eme AM GL
Example
11
 We run our client side and we get the following results either in
consol or in our web browser:
Meriem Sari Service Web 2eme AM GL

Contenu connexe

En vedette

Developpement mobile vs open source
Developpement mobile vs open sourceDeveloppement mobile vs open source
Developpement mobile vs open source
Korteby Farouk
 
Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0
Pascal Roques
 
SysML adoption in France
SysML adoption in FranceSysML adoption in France
SysML adoption in France
Pascal Roques
 
mis
mismis
mis
ISIG
 
Environnement de développement de bases de données
Environnement de développement de bases de donnéesEnvironnement de développement de bases de données
Environnement de développement de bases de données
ISIG
 
01072013 e governance
01072013 e governance01072013 e governance
01072013 e governance
bharati k
 

En vedette (20)

Merieme HAROUCHE : Le Relex Smile Correction de la myopie au laser Femtoseconde
Merieme HAROUCHE : Le Relex Smile Correction de la myopie au laser FemtosecondeMerieme HAROUCHE : Le Relex Smile Correction de la myopie au laser Femtoseconde
Merieme HAROUCHE : Le Relex Smile Correction de la myopie au laser Femtoseconde
 
Re l ex smile, the future of refractive surgery - medifocus sept 2013
Re l ex smile, the future of refractive surgery - medifocus sept 2013Re l ex smile, the future of refractive surgery - medifocus sept 2013
Re l ex smile, the future of refractive surgery - medifocus sept 2013
 
Relex Smile laser surgery
Relex Smile laser surgeryRelex Smile laser surgery
Relex Smile laser surgery
 
Merieme HAROUCHE : Le Relex Smile Correction de la myopie au laser Femtosec...
Merieme HAROUCHE : Le Relex Smile Correction de la myopie  au laser Femtosec...Merieme HAROUCHE : Le Relex Smile Correction de la myopie  au laser Femtosec...
Merieme HAROUCHE : Le Relex Smile Correction de la myopie au laser Femtosec...
 
Java vs .Net
Java vs .NetJava vs .Net
Java vs .Net
 
Developpement mobile vs open source
Developpement mobile vs open sourceDeveloppement mobile vs open source
Developpement mobile vs open source
 
Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0Prfc rhapsody simulation_1.0
Prfc rhapsody simulation_1.0
 
SysML adoption in France
SysML adoption in FranceSysML adoption in France
SysML adoption in France
 
mis
mismis
mis
 
UMLX and QVT and ATL
UMLX and QVT and ATLUMLX and QVT and ATL
UMLX and QVT and ATL
 
Frame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enoughFrame latency evaluation: when simulation and analysis alone are not enough
Frame latency evaluation: when simulation and analysis alone are not enough
 
النشاط العلمي - الكهرباء
النشاط العلمي  -   الكهرباءالنشاط العلمي  -   الكهرباء
النشاط العلمي - الكهرباء
 
OCCIware
OCCIwareOCCIware
OCCIware
 
Environnement de développement de bases de données
Environnement de développement de bases de donnéesEnvironnement de développement de bases de données
Environnement de développement de bases de données
 
The OCLforUML Profile
The OCLforUML ProfileThe OCLforUML Profile
The OCLforUML Profile
 
Mix
MixMix
Mix
 
Collaboration and Governance of Open Source Projects
Collaboration and Governance of Open Source ProjectsCollaboration and Governance of Open Source Projects
Collaboration and Governance of Open Source Projects
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code Generation
 
01072013 e governance
01072013 e governance01072013 e governance
01072013 e governance
 
Cvl
CvlCvl
Cvl
 

Similaire à Rest ws

Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
Rob Davarnia
 
Architecting non-trivial browser applications (Jazoon 2012)
Architecting non-trivial browser applications (Jazoon 2012)Architecting non-trivial browser applications (Jazoon 2012)
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
Web2 0 Incredibles
Web2 0 IncrediblesWeb2 0 Incredibles
Web2 0 Incredibles
anjeshdubey
 

Similaire à Rest ws (20)

Building Applications With the MEAN Stack
Building Applications With the MEAN StackBuilding Applications With the MEAN Stack
Building Applications With the MEAN Stack
 
ExpressJS and REST API.pptx
ExpressJS and REST API.pptxExpressJS and REST API.pptx
ExpressJS and REST API.pptx
 
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопсКирилл Толкачев. Микросервисы: огонь, вода и девопс
Кирилл Толкачев. Микросервисы: огонь, вода и девопс
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
E-Services TP2 ISI by Ettaieb Abdessattar
E-Services TP2 ISI by Ettaieb AbdessattarE-Services TP2 ISI by Ettaieb Abdessattar
E-Services TP2 ISI by Ettaieb Abdessattar
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Developing microservices with Java and applying Spring security framework and...
Developing microservices with Java and applying Spring security framework and...Developing microservices with Java and applying Spring security framework and...
Developing microservices with Java and applying Spring security framework and...
 
6 10-presentation
6 10-presentation6 10-presentation
6 10-presentation
 
Architecting non-trivial browser applications (Jazoon 2012)
Architecting non-trivial browser applications (Jazoon 2012)Architecting non-trivial browser applications (Jazoon 2012)
Architecting non-trivial browser applications (Jazoon 2012)
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
ExpressJS-Introduction.pdf
ExpressJS-Introduction.pdfExpressJS-Introduction.pdf
ExpressJS-Introduction.pdf
 
Component based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between RoutesComponent based User Interface Rendering with State Caching Between Routes
Component based User Interface Rendering with State Caching Between Routes
 
Lec6 ecom fall16
Lec6 ecom fall16Lec6 ecom fall16
Lec6 ecom fall16
 
Vývojařská Plzeň - React
Vývojařská Plzeň - ReactVývojařská Plzeň - React
Vývojařská Plzeň - React
 
Building reusable components as micro frontends with glimmer js and webcompo...
Building reusable components as micro frontends  with glimmer js and webcompo...Building reusable components as micro frontends  with glimmer js and webcompo...
Building reusable components as micro frontends with glimmer js and webcompo...
 
Web2 0 Incredibles
Web2 0 IncrediblesWeb2 0 Incredibles
Web2 0 Incredibles
 
Treinamento 1
Treinamento 1Treinamento 1
Treinamento 1
 
Exploring MERN Stack and Tech Stacks: A Comparative Analysis
Exploring MERN Stack and Tech Stacks: A Comparative AnalysisExploring MERN Stack and Tech Stacks: A Comparative Analysis
Exploring MERN Stack and Tech Stacks: A Comparative Analysis
 

Dernier

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Dernier (20)

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 

Rest ws

  • 1. REST Web Service By: Sari Meriem 1 UNIVERSITY of MOHAMED CHERIF MESAADIA SOUK-AHRAS Departement of Math & Computer Science Presentation About:
  • 2. Reminder 2Meriem Sari Service Web 2eme AM GL  Stands for: Representational State Transfer.  Is an architectural style.  Introduced first in 2000 then standardized in 2008.  Everything in REST is considered as a resource.  Every resource is identified by an URI.
  • 3. Reminder 3  Resources are handled using POST, GET, PUT, DELETE operations which are similar to Create, Read, update and Delete(CRUD) operations.  It uses uniform interfaces.  A RESTful Web service is a Web service implemented using HTTP and the principles of REST. Meriem Sari Service Web 2eme AM GL
  • 4. Requirements 4  Eclipse luna.  jersey-archive-1.18. Meriem Sari Service Web 2eme AM GL
  • 6. Example 6 Copy all jar files from the Jersey zip into WEB-INF/lib folder. Select build path in your project and add the same jars in your build path. Create package called com.javatutorialscorner.rest.ws. Create following class inside package com.javatutorialscorner.rest.ws RestHelloWorld .java Meriem Sari Service Web 2eme AM GL
  • 8. Example 8  We get the following structure for our program Meriem Sari Service Web 2eme AM GL
  • 9. Example 9  We configure the « web.xml » file to have the following code Meriem Sari Service Web 2eme AM GL
  • 10. Example 10  We create the client class under the same package containing the following code: Meriem Sari Service Web 2eme AM GL
  • 11. Example 11  We run our client side and we get the following results either in consol or in our web browser: Meriem Sari Service Web 2eme AM GL