SlideShare a Scribd company logo
Distributed Systems
Lecture -6-
Created by :
Eng. Ghadeer Al Hasan
Restful Web Services
Intro 1
• REST is the acronymfor REpresentational State Transfer.
• REST is an architectural style for developing applications that can be accessed over the network.
• Restful Web Services is a statelessclient-server architecture where web services are resources and can
be identified by their URIs.
• REST Client applications can use HTTP GET/POSTmethods to invoke Restful web services.
• REST doesn’t specify any specificprotocol to use, but in almost all casesit’s used over HTTP/HTTPS.
• We can use XML, JSON, text or any other type of data for request and response.
Java RESTful Web Services API 2
• Java API for RESTful Web Services (JAX-RS) is the Java API for creating RESTweb services.
• JAX-RS uses annotations to simplifythe development and deployment of web services.
• JAX-RSis part of JDK, so you don’t needto include anything to use it’s annotations
Restful Web Services Annotations 3
Some of the importantJAX-RS annotations are:
• @Path: used to specify the relative path of classand methods. We can get the URI of a webservice
by scanning the Pathannotationvalue.
• @GET , @PUT , @POST , @DELETEand @HEAD: usedto specify the HTTPrequest type for a
method.
• @Produces , @Consumes : usedto specify therequest and responsetypes.
• @PathParam: used to bindthe method parameter to pathvalue by parsing it.
UserWS Example
Requirement 5
- Install “Wamp Server” on your machine
- Create Database “RestWS”
- Create Tables…
Create Tables 6
create table Accounts (
accountId bigint not null primary key AUTO_INCREMENT,
username varchar(100) not null,
password varchar(100) not null);
)
create table Users(
userId bigint not null primary key AUTO_INCREMENT,
firstName varchar(200) not null,
lastName varchar(200) not null,
BirthDate varchar(30) not null,
gender bit not null, accountId bigint not null,
foreign key (accountId) references Accounts(accountId)
);
AccountsFacadeREST Class 7
AccountsFacadeREST Class 8
UsersFacadeREST Class 9
UsersFacadeREST Class… 10
Test Services 11
Test Services 12
References 13
- YouTube link
https://www.youtube.com/playlist?list=PLtDIUAtyP4lhV7CsYfLuIx26UeG4J-ujZ
- GitHub
https://github.com/Ghadeerof
End Lecture

More Related Content

PPTX
Restful webservice
PPTX
Rest and Rails
PPT
Rest in Rails
PPT
WebCrawler
PPTX
Hadoop introduction
PDF
Lab swe-2013intro jax-rs
PPT
Webcrawler
PPT
Working of a Web Crawler
Restful webservice
Rest and Rails
Rest in Rails
WebCrawler
Hadoop introduction
Lab swe-2013intro jax-rs
Webcrawler
Working of a Web Crawler

What's hot (10)

DOC
Web crawler synopsis
PPTX
Cloud Portam Overview
PPTX
SemaGrow demonstrator: “Web Crawler + AgroTagger”
PDF
Rest web services
PPTX
quick intro to elastic search
PPTX
An Introduction to Elastic Search.
PPT
The Rest Architectural Style
PPT
Web crawler
PPTX
Elasticsearch as a search alternative to a relational database
PDF
Elasticsearch Introduction to Data model, Search & Aggregations
Web crawler synopsis
Cloud Portam Overview
SemaGrow demonstrator: “Web Crawler + AgroTagger”
Rest web services
quick intro to elastic search
An Introduction to Elastic Search.
The Rest Architectural Style
Web crawler
Elasticsearch as a search alternative to a relational database
Elasticsearch Introduction to Data model, Search & Aggregations
Ad

Similar to #6 (RESTtful Web Wervices) (20)

PPTX
Building Restful Web Services with Java
PPTX
Ppt on web development and this has all details
PPTX
RESTful application with JAX-RS and how to expose and test them
PPTX
JAX-RS 2.0 and OData
PPTX
JAX-RS. Developing RESTful APIs with Java
PDF
JAX-RS JavaOne Hyderabad, India 2011
PPT
Developing RESTful WebServices using Jersey
PDF
RESTful Web services using JAX-RS
PPT
ROA.ppt
PPTX
6 Months Industrial Training in Spring Framework
PDF
Secc tutorials development and deployment of rest web services in java_v2.0
PDF
JavaEE and RESTful development - WSO2 Colombo Meetup
PDF
Spark IT 2011 - Developing RESTful Web services with JAX-RS
ODP
RESTing with JAX-RS
PPTX
Rest webservice ppt
PDF
Rest web service
PDF
Restful web services_tutorial
PDF
RESTful Java With JAX RS 1st Edition Bill Burke
PDF
E-Services TP2 ISI by Ettaieb Abdessattar
PPTX
Creating restful api using mule esb
Building Restful Web Services with Java
Ppt on web development and this has all details
RESTful application with JAX-RS and how to expose and test them
JAX-RS 2.0 and OData
JAX-RS. Developing RESTful APIs with Java
JAX-RS JavaOne Hyderabad, India 2011
Developing RESTful WebServices using Jersey
RESTful Web services using JAX-RS
ROA.ppt
6 Months Industrial Training in Spring Framework
Secc tutorials development and deployment of rest web services in java_v2.0
JavaEE and RESTful development - WSO2 Colombo Meetup
Spark IT 2011 - Developing RESTful Web services with JAX-RS
RESTing with JAX-RS
Rest webservice ppt
Rest web service
Restful web services_tutorial
RESTful Java With JAX RS 1st Edition Bill Burke
E-Services TP2 ISI by Ettaieb Abdessattar
Creating restful api using mule esb
Ad

More from Ghadeer AlHasan (20)

PPTX
[C++ Tutorial ] #9 Classes
PPTX
[C++ Tutorial] #8 Files
PPTX
[C++ Tutorial] #7- Linked List
PPTX
[Java] #8 String and Inner Class
PPTX
[C++ Tutorial] #6- Pointers
PPTX
[Java] #7 - Input & Output Stream
PPTX
[C++] #5 - Structures
PPTX
#6- Arrays and Collections Framework
PPTX
5- Overriding and Abstraction In Java
PPTX
4- Inheritance, Aggregation, Encapsulation and Overloading
PPTX
3- Operators in Java
PPTX
2- Introduction to java II
PPTX
1- Introduction to java
PPTX
0- Overview
PPTX
4- Arrays
PPTX
3- Functions
PPTX
2- Control Structures
PPTX
1- Languages Basics
PPTX
#8 (Java Message Service)
PPTX
#7 (Java Message Service)
[C++ Tutorial ] #9 Classes
[C++ Tutorial] #8 Files
[C++ Tutorial] #7- Linked List
[Java] #8 String and Inner Class
[C++ Tutorial] #6- Pointers
[Java] #7 - Input & Output Stream
[C++] #5 - Structures
#6- Arrays and Collections Framework
5- Overriding and Abstraction In Java
4- Inheritance, Aggregation, Encapsulation and Overloading
3- Operators in Java
2- Introduction to java II
1- Introduction to java
0- Overview
4- Arrays
3- Functions
2- Control Structures
1- Languages Basics
#8 (Java Message Service)
#7 (Java Message Service)

Recently uploaded (20)

PDF
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
PDF
Visual Aids for Exploratory Data Analysis.pdf
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PDF
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PPT
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
PDF
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
PDF
Categorization of Factors Affecting Classification Algorithms Selection
PDF
Design Guidelines and solutions for Plastics parts
PPTX
Fundamentals of Mechanical Engineering.pptx
PPTX
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PPTX
Management Information system : MIS-e-Business Systems.pptx
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPT
Occupational Health and Safety Management System
PPTX
communication and presentation skills 01
EXPLORING LEARNING ENGAGEMENT FACTORS INFLUENCING BEHAVIORAL, COGNITIVE, AND ...
Visual Aids for Exploratory Data Analysis.pdf
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PREDICTION OF DIABETES FROM ELECTRONIC HEALTH RECORDS
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
August 2025 - Top 10 Read Articles in Network Security & Its Applications
INTRODUCTION -Data Warehousing and Mining-M.Tech- VTU.ppt
Artificial Superintelligence (ASI) Alliance Vision Paper.pdf
Categorization of Factors Affecting Classification Algorithms Selection
Design Guidelines and solutions for Plastics parts
Fundamentals of Mechanical Engineering.pptx
6ME3A-Unit-II-Sensors and Actuators_Handouts.pptx
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Exploratory_Data_Analysis_Fundamentals.pdf
Management Information system : MIS-e-Business Systems.pptx
Fundamentals of safety and accident prevention -final (1).pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Occupational Health and Safety Management System
communication and presentation skills 01

#6 (RESTtful Web Wervices)

  • 1. Distributed Systems Lecture -6- Created by : Eng. Ghadeer Al Hasan Restful Web Services
  • 2. Intro 1 • REST is the acronymfor REpresentational State Transfer. • REST is an architectural style for developing applications that can be accessed over the network. • Restful Web Services is a statelessclient-server architecture where web services are resources and can be identified by their URIs. • REST Client applications can use HTTP GET/POSTmethods to invoke Restful web services. • REST doesn’t specify any specificprotocol to use, but in almost all casesit’s used over HTTP/HTTPS. • We can use XML, JSON, text or any other type of data for request and response.
  • 3. Java RESTful Web Services API 2 • Java API for RESTful Web Services (JAX-RS) is the Java API for creating RESTweb services. • JAX-RS uses annotations to simplifythe development and deployment of web services. • JAX-RSis part of JDK, so you don’t needto include anything to use it’s annotations
  • 4. Restful Web Services Annotations 3 Some of the importantJAX-RS annotations are: • @Path: used to specify the relative path of classand methods. We can get the URI of a webservice by scanning the Pathannotationvalue. • @GET , @PUT , @POST , @DELETEand @HEAD: usedto specify the HTTPrequest type for a method. • @Produces , @Consumes : usedto specify therequest and responsetypes. • @PathParam: used to bindthe method parameter to pathvalue by parsing it.
  • 6. Requirement 5 - Install “Wamp Server” on your machine - Create Database “RestWS” - Create Tables…
  • 7. Create Tables 6 create table Accounts ( accountId bigint not null primary key AUTO_INCREMENT, username varchar(100) not null, password varchar(100) not null); ) create table Users( userId bigint not null primary key AUTO_INCREMENT, firstName varchar(200) not null, lastName varchar(200) not null, BirthDate varchar(30) not null, gender bit not null, accountId bigint not null, foreign key (accountId) references Accounts(accountId) );
  • 14. References 13 - YouTube link https://www.youtube.com/playlist?list=PLtDIUAtyP4lhV7CsYfLuIx26UeG4J-ujZ - GitHub https://github.com/Ghadeerof