SlideShare a Scribd company logo
INTRO TO WEB AND
WEB SERVICES
Overview of HTTP, Servlets and SOAP Web Services
Presenter: Heartin Jacob Kanikathottu
(www.codingarchitect.com, www.javajee.com)
TOPICS
• Revision of basic web application concepts.
• Revision of HTTP, Servlets and Servers.
• Introduction to Web Services and Overview of SOAP Web Services.
• Overview of REST Web Services and Differences with SOAP Web Services.
• Java support for Web Services – JAX-WS and JAX-RS.
• Resources and References
REVISION OF BASIC WEB APPLICATION
CONCEPTS
• Internet Protocols
• TCP (Transmission Control Protocol), IP (Internet Protocol), UDP (User Datagram Protocol),
HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol) and SMTP (Simple Mail
Transfer Protocol).
• URI, URL and URN
• Uniform resource identifier (URI) is a string of characters used to identify a name of a
resource.
• Concrete forms of URI: uniform resource locator (URL) and uniform resource name (URN).
• Client side technologies: HTML, JavaScript and CSS
• Web applications vs. web services
• Human users vs. other systems as client.
REVISION OF HYPER TEXT TRANSFER
PROTOCOL (HTTP)
• HTTP is a synchronous request-response application network protocol.
• The seven HTTP methods are GET, POST, HEAD, OPTIONS, TRACE, PUT, DELETE.
• Idempotent request
• An idempotent request is meant to have the same result how many times it is executed.
• GET, PUT, DELETE are supposed to be idempotent, whereas POST is not.
• HTTP Status Codes
• Status of a request sent through the use of status codes, which are sent back along with the
response.
• There are five classes of status codes: Informational (1XX), Successful (2XX), Redirection
(3XX), Client Error (4XX), Server Error (5XX).
REVISION OF SERVLETS AND SERVERS
• Servlets are java components that can respond to an HTTP request.
• There are methods in Java Servlets corresponding to each of the HTTP methods.
• The seven HTTP methods map on to seven servlet methods of the same name with a “do”
in front (e.g., POST maps on to doPost()).
• The doXXX() methods receive two objects as parameters—the first representing the
HTTP request and the second the HTTP response.
• Java Web Servers
• Web container for servlets and JSPs. E.g. Tomcat
• Application server has EJB and Web Container, and more. E.g. Glassfish, Jboss.
Note: You can learn more about servlets and http, for better understanding this course @ http://javajee.com/java-ee-
web-components-part1-http-and-servlets.
SIMPLE SERVLET EXERCISE
• Note: May skip this exercise if you are really comfortable with Servlets and one of
tcpmon or wireshark, else follow below steps:
• Download tomcat (version 8 or anything that your eclipse support).
• Configure eclipse to use tomcat. Start, stop and restart to verify.
• Create a dynamic web project.
• Create a simple Servlet named HelloWorld.
• Execute the servlet by deploying into to tomcat from within eclipse.
• See the actual HTTP request and response using tcp mon or wireshark. You may refer to
config notes for these @ http://javajee.com/monitoring-and-analyzing-tools.
INTRO TO WEB SERVICE
• Web services are services exposed over a network and is designed to be
used automatically by other applications without human interaction.
• Web services communicate using standard, vendor-independent protocols such as
HTTP, XML, Javascript etc.
• Web Services vs. Web Applications
• web applications are applications with web pages primarily for use by humans
• web service is a server-based application component meant primarily for interaction with
other programs.
• Two types of Web Services: SOAP and REST.
OVERVIEW OF SOAP WEB SERVICES
• SOAP stands for Simple Object Access Protocol. AKA SOA Protocol.
• Contains primarily three components
• SOAP Protocol: SOAP based web services uses a special form of XML that follows a
protocol called SOAP to exchange messages.
• WSDL: Web Services Description Language is an XML-based language that is used for
describing the functionality offered by a Web service.
• UDDI: Universal Description, Discovery and Integration (UDDI) is a directory service,
and is optional.
• Message Exchange Pattern (MEP): Request Response (Input-Output), Input only,
Solicit Response (Output input), Notification or publish-subscribe (Output only).
Note: You can learn more about SOAP Web Services and Web Services in general @ http://javajee.com/web-services.
OVERVIEW OF REST AND DIFFERENCES
FROM SOAP
• Follow a resource oriented way:
• Every resource will be represented by a single URI and uses the standard set of http
operations like POST, GET, PUT, and DELETE, to do various operations on that
resource.
• Current state of representation is transferred using formats such as XML and JSON.
• SOAP is based on rules whereas REST is based on guidelines.
• There is no formal definitions for REST like the WSDL.
• There is WADL, but not so popular or widely accepted.
• REST support only request-response message exchange pattern.
JAVA SUPPORT FOR WEB SERVICES –
JAX-WS AND JAX-RS.
• Java API for XML Web services (JAX-WS) can be used for SOAP-based as well as
REST-style, but more suited for SOAP.
• JAX–WS require at least core java 5 because of the support of annotation and is part
of JDK from Java 6.
• Java API for XML – Restful web services (JAX–RS) is the standard specification for
REST web services.
• Jersy is the reference implementation for JAX-RS. Other popular implementations
include RESTEasy, Restlet and Spring REST.
Note: You can learn more about SOAP Web Services and Web Services in general @ http://javajee.com/web-services.
SIMPLE SOAP DEMO
• You may skip this if you don’t want to learn anything about SOAP, but if you do,
these exercises it will help you compare SOAP with REST better:
• Please do at least one of these two exercises:
• Create a simple SOAP service and deploy it in Apache Tomcat
• Create a simple SOAP service and deploy it in Glassfish Server
• Note: Notes and step by step lab for above can be found @ http://javajee.com/web-services.
RESOURCES & REFERENCES
• JavaJee.com –
• You can find the session materials, examples and much more @ Javajee.com. Additional
materials or references are provided @ Javajee.com on respective pages.
• Important related links include:
• http://javajee.com/java-ee-web-components-part1-http-and-servlets
• http://javajee.com/web-services
• http://javajee.com/rest-web-services-with-jax-rs (For future sessions)
• Java Web Services: Up and Running by Martin Kalin.

More Related Content

What's hot

Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web Services
IMC Institute
 
Soap web service
Soap web serviceSoap web service
Soap web service
NITT, KAMK
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
IndicThreads
 
Overview of java web services
Overview of java web servicesOverview of java web services
Java web services
Java web servicesJava web services
Java web services
kumar gaurav
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overviewRaveendra Bhat
 
Overview of REST - Raihan Ullah
Overview of REST - Raihan UllahOverview of REST - Raihan Ullah
Overview of REST - Raihan Ullah
Cefalo
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservice
saba sumreen
 
Java web services soap rest training from hyderabad
Java web services soap rest training from hyderabadJava web services soap rest training from hyderabad
Java web services soap rest training from hyderabadFuturePoint Technologies
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAP
IMC Institute
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
Webservices divya
Webservices divyaWebservices divya
Webservices divya
rajamandava4
 
Webservices divya 1
Webservices divya 1Webservices divya 1
Webservices divya 1
rajamandava4
 
Java Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDIJava Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDI
IMC Institute
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
Mário Almeida
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
Mandakini Kumari
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
Masud Rahman
 
WebServices
WebServicesWebServices
WebServices
Sunil Komarapu
 
ITI004En-Introduction to XML (III)
ITI004En-Introduction to XML (III)ITI004En-Introduction to XML (III)
ITI004En-Introduction to XML (III)
Huibert Aalbers
 

What's hot (20)

Java Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web ServicesJava Web Services [1/5]: Introduction to Web Services
Java Web Services [1/5]: Introduction to Web Services
 
Soap web service
Soap web serviceSoap web service
Soap web service
 
Java web services using JAX-WS
Java web services using JAX-WSJava web services using JAX-WS
Java web services using JAX-WS
 
Overview of java web services
Overview of java web servicesOverview of java web services
Overview of java web services
 
Java web services
Java web servicesJava web services
Java web services
 
Web Services - A brief overview
Web Services -  A brief overviewWeb Services -  A brief overview
Web Services - A brief overview
 
Overview of REST - Raihan Ullah
Overview of REST - Raihan UllahOverview of REST - Raihan Ullah
Overview of REST - Raihan Ullah
 
Xml and webservice
Xml and webserviceXml and webservice
Xml and webservice
 
Java web services soap rest training from hyderabad
Java web services soap rest training from hyderabadJava web services soap rest training from hyderabad
Java web services soap rest training from hyderabad
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAP
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
Webservices divya
Webservices divyaWebservices divya
Webservices divya
 
Webservices divya 1
Webservices divya 1Webservices divya 1
Webservices divya 1
 
Java Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDIJava Web Services [3/5]: WSDL, WADL and UDDI
Java Web Services [3/5]: WSDL, WADL and UDDI
 
SOAP vs REST
SOAP vs RESTSOAP vs REST
SOAP vs REST
 
Web services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGigWeb services soap and rest by mandakini for TechGig
Web services soap and rest by mandakini for TechGig
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
 
WebServices
WebServicesWebServices
WebServices
 
Web service introduction
Web service introductionWeb service introduction
Web service introduction
 
ITI004En-Introduction to XML (III)
ITI004En-Introduction to XML (III)ITI004En-Introduction to XML (III)
ITI004En-Introduction to XML (III)
 

Similar to Intro To Web and Web Services (REST Series 01)

Java Web services
Java Web servicesJava Web services
Java Web servicesvpulec
 
WEB TECHNOLOGY Unit-5.pptx
WEB TECHNOLOGY Unit-5.pptxWEB TECHNOLOGY Unit-5.pptx
WEB TECHNOLOGY Unit-5.pptx
karthiksmart21
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web Services
IMC Institute
 
SpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web ServicesSpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web Services
SpringPeople
 
Jeetrainers.com coursejspservlets00
Jeetrainers.com coursejspservlets00Jeetrainers.com coursejspservlets00
Jeetrainers.com coursejspservlets00Rajesh Moorjani
 
WIT UNIT-5.pdf
WIT UNIT-5.pdfWIT UNIT-5.pdf
WIT UNIT-5.pdf
jashmithakakavakam
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
Soa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web servicesSoa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web services
Vaibhav Khanna
 
Rest web service
Rest web serviceRest web service
Rest web service
Hamid Ghorbani
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
Vibhawa Nirmal
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
Dong Ngoc
 
week_05h
week_05hweek_05h
week_05h
PratikMori2
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1vikram singh
 

Similar to Intro To Web and Web Services (REST Series 01) (20)

Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Soap and Rest
Soap and RestSoap and Rest
Soap and Rest
 
Ntg web services
Ntg   web servicesNtg   web services
Ntg web services
 
Java Web services
Java Web servicesJava Web services
Java Web services
 
WEB TECHNOLOGY Unit-5.pptx
WEB TECHNOLOGY Unit-5.pptxWEB TECHNOLOGY Unit-5.pptx
WEB TECHNOLOGY Unit-5.pptx
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
Java part 3
Java part  3Java part  3
Java part 3
 
Java Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web ServicesJava Web Services [4/5]: Java API for XML Web Services
Java Web Services [4/5]: Java API for XML Web Services
 
SpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web ServicesSpringPeople Introduction to JAVA Web Services
SpringPeople Introduction to JAVA Web Services
 
Coursejspservlets00
Coursejspservlets00Coursejspservlets00
Coursejspservlets00
 
Jeetrainers.com coursejspservlets00
Jeetrainers.com coursejspservlets00Jeetrainers.com coursejspservlets00
Jeetrainers.com coursejspservlets00
 
WIT UNIT-5.pdf
WIT UNIT-5.pdfWIT UNIT-5.pdf
WIT UNIT-5.pdf
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
 
Soa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web servicesSoa 12 jax ws-xml Java API for web services
Soa 12 jax ws-xml Java API for web services
 
Rest web service
Rest web serviceRest web service
Rest web service
 
Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface) Introduction to APIs (Application Programming Interface)
Introduction to APIs (Application Programming Interface)
 
Soap and restful webservice
Soap and restful webserviceSoap and restful webservice
Soap and restful webservice
 
week_05h
week_05hweek_05h
week_05h
 
Web Tech Java Servlet Update1
Web Tech   Java Servlet Update1Web Tech   Java Servlet Update1
Web Tech Java Servlet Update1
 
Web services soap rest training
Web services soap rest trainingWeb services soap rest training
Web services soap rest training
 

Recently uploaded

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 

Recently uploaded (20)

Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 

Intro To Web and Web Services (REST Series 01)

  • 1. INTRO TO WEB AND WEB SERVICES Overview of HTTP, Servlets and SOAP Web Services Presenter: Heartin Jacob Kanikathottu (www.codingarchitect.com, www.javajee.com)
  • 2. TOPICS • Revision of basic web application concepts. • Revision of HTTP, Servlets and Servers. • Introduction to Web Services and Overview of SOAP Web Services. • Overview of REST Web Services and Differences with SOAP Web Services. • Java support for Web Services – JAX-WS and JAX-RS. • Resources and References
  • 3. REVISION OF BASIC WEB APPLICATION CONCEPTS • Internet Protocols • TCP (Transmission Control Protocol), IP (Internet Protocol), UDP (User Datagram Protocol), HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol) and SMTP (Simple Mail Transfer Protocol). • URI, URL and URN • Uniform resource identifier (URI) is a string of characters used to identify a name of a resource. • Concrete forms of URI: uniform resource locator (URL) and uniform resource name (URN). • Client side technologies: HTML, JavaScript and CSS • Web applications vs. web services • Human users vs. other systems as client.
  • 4. REVISION OF HYPER TEXT TRANSFER PROTOCOL (HTTP) • HTTP is a synchronous request-response application network protocol. • The seven HTTP methods are GET, POST, HEAD, OPTIONS, TRACE, PUT, DELETE. • Idempotent request • An idempotent request is meant to have the same result how many times it is executed. • GET, PUT, DELETE are supposed to be idempotent, whereas POST is not. • HTTP Status Codes • Status of a request sent through the use of status codes, which are sent back along with the response. • There are five classes of status codes: Informational (1XX), Successful (2XX), Redirection (3XX), Client Error (4XX), Server Error (5XX).
  • 5. REVISION OF SERVLETS AND SERVERS • Servlets are java components that can respond to an HTTP request. • There are methods in Java Servlets corresponding to each of the HTTP methods. • The seven HTTP methods map on to seven servlet methods of the same name with a “do” in front (e.g., POST maps on to doPost()). • The doXXX() methods receive two objects as parameters—the first representing the HTTP request and the second the HTTP response. • Java Web Servers • Web container for servlets and JSPs. E.g. Tomcat • Application server has EJB and Web Container, and more. E.g. Glassfish, Jboss. Note: You can learn more about servlets and http, for better understanding this course @ http://javajee.com/java-ee- web-components-part1-http-and-servlets.
  • 6. SIMPLE SERVLET EXERCISE • Note: May skip this exercise if you are really comfortable with Servlets and one of tcpmon or wireshark, else follow below steps: • Download tomcat (version 8 or anything that your eclipse support). • Configure eclipse to use tomcat. Start, stop and restart to verify. • Create a dynamic web project. • Create a simple Servlet named HelloWorld. • Execute the servlet by deploying into to tomcat from within eclipse. • See the actual HTTP request and response using tcp mon or wireshark. You may refer to config notes for these @ http://javajee.com/monitoring-and-analyzing-tools.
  • 7. INTRO TO WEB SERVICE • Web services are services exposed over a network and is designed to be used automatically by other applications without human interaction. • Web services communicate using standard, vendor-independent protocols such as HTTP, XML, Javascript etc. • Web Services vs. Web Applications • web applications are applications with web pages primarily for use by humans • web service is a server-based application component meant primarily for interaction with other programs. • Two types of Web Services: SOAP and REST.
  • 8. OVERVIEW OF SOAP WEB SERVICES • SOAP stands for Simple Object Access Protocol. AKA SOA Protocol. • Contains primarily three components • SOAP Protocol: SOAP based web services uses a special form of XML that follows a protocol called SOAP to exchange messages. • WSDL: Web Services Description Language is an XML-based language that is used for describing the functionality offered by a Web service. • UDDI: Universal Description, Discovery and Integration (UDDI) is a directory service, and is optional. • Message Exchange Pattern (MEP): Request Response (Input-Output), Input only, Solicit Response (Output input), Notification or publish-subscribe (Output only). Note: You can learn more about SOAP Web Services and Web Services in general @ http://javajee.com/web-services.
  • 9. OVERVIEW OF REST AND DIFFERENCES FROM SOAP • Follow a resource oriented way: • Every resource will be represented by a single URI and uses the standard set of http operations like POST, GET, PUT, and DELETE, to do various operations on that resource. • Current state of representation is transferred using formats such as XML and JSON. • SOAP is based on rules whereas REST is based on guidelines. • There is no formal definitions for REST like the WSDL. • There is WADL, but not so popular or widely accepted. • REST support only request-response message exchange pattern.
  • 10. JAVA SUPPORT FOR WEB SERVICES – JAX-WS AND JAX-RS. • Java API for XML Web services (JAX-WS) can be used for SOAP-based as well as REST-style, but more suited for SOAP. • JAX–WS require at least core java 5 because of the support of annotation and is part of JDK from Java 6. • Java API for XML – Restful web services (JAX–RS) is the standard specification for REST web services. • Jersy is the reference implementation for JAX-RS. Other popular implementations include RESTEasy, Restlet and Spring REST. Note: You can learn more about SOAP Web Services and Web Services in general @ http://javajee.com/web-services.
  • 11. SIMPLE SOAP DEMO • You may skip this if you don’t want to learn anything about SOAP, but if you do, these exercises it will help you compare SOAP with REST better: • Please do at least one of these two exercises: • Create a simple SOAP service and deploy it in Apache Tomcat • Create a simple SOAP service and deploy it in Glassfish Server • Note: Notes and step by step lab for above can be found @ http://javajee.com/web-services.
  • 12. RESOURCES & REFERENCES • JavaJee.com – • You can find the session materials, examples and much more @ Javajee.com. Additional materials or references are provided @ Javajee.com on respective pages. • Important related links include: • http://javajee.com/java-ee-web-components-part1-http-and-servlets • http://javajee.com/web-services • http://javajee.com/rest-web-services-with-jax-rs (For future sessions) • Java Web Services: Up and Running by Martin Kalin.

Editor's Notes

  1. This is the first session for REST web services course. You may skip this session if you already know HTTP and Servlets, and also if you don’t want to learn anything about SOAP. However, learning about HTTP and Servlets are essential for working with REST web services. Also, a basic idea of SOAP will always be good to understand the benefits of REST better and also to take a decision on whether you need to learn SOAP more in depth.
  2. Reference: http://javajee.com/introduction-to-important-concepts-in-internet-and-web-technologies