SlideShare a Scribd company logo
Introduction to Web Services Sabyasachi Ghosh [email_address]
Agenda Refresher: Networking/OSI Model Socket Programming Remote Procedure Calls  Refresher: XML Overview of XML RPC Introduction to Web Services/SOA Introduction to SOAP Refresher: HTTP Restful Architectures and RESTful Web Services Q&A
Client-Server Technology CLIENT SERVER NETWORK Request Request Request Response Response
The OSI Model
Introduction to Sockets Socket is an endpoint of a bidirectional inter-process communication flow across an IP-based computer network. Sockets are provided by the operating system and is mapped by the OS to a communicating application process or thread. The transport layer comprises two types of protocols, TCP (Transport Control Protocol) and UDP (User Datagram Protocol).  The most widely used programming interfaces for these protocols are sockets.
Sockets Sockets are generalized form of inter-process communication (IPC)
RPC – Remote Procedure Calls Remote Procedure Call (RPC) is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space. RPC (Remote Procedure Call) goes back at least as far as 1976, when it was described in RFC 707. Ref: Wikipedia
RPC – How does it work ?  A client makes a call to the procedure in a remote machine (server) which has the business logic with appropriate parameters. The server receives the parameters and executes the procedure locally and then transmits the results back to the client.  The client receives the results.
RPC – More formally: The client calls the Client stub. The call is a local procedure call, with parameters pushed on to the stack in the normal way. The client stub packs the parameters into a message and makes a system call to send the message. Packing the parameters is called marshalling. The kernel sends the message from the client machine to the server machine. The kernel passes the incoming packets to the server stub. Finally, the server stub calls the server procedure. The reply traces the same in other direction. Ref: Wikipedia
XML: Introduction eXtensible Markup Language A simplified version of SGML [ Standard Generalized Markup Language ] Maintains the most useful parts of SGML Designed so that SGML can be delivered over the Web More flexible and adaptable than HTML Markup: Information added to a text to make its structure comprehensible
XML: Differences with HTML XML was designed to carry data, not displaying data XML is not a replacement for HTML. Different goals: XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. HTML is about displaying information, XML is about describing information.
XML: Example <?xml version=&quot;1.0&quot;?> < catalog >  < product   category = &quot;mobile phone&quot;> <mfg>Nokia</mfg><model>8890</model> <description> Intended for EGSM 900 and GSM 1900  networks … </description> <clock setting= &quot;nist&quot; alarm = &quot;yes&quot;/> </ product > < product  category = &quot;mobile phone&quot;>  <mfg>Ericsson</mfg><model>A3618</model> <description>...</description> </ product > </ catalog >
XML: More on it XML is a metalanguage, not a specific language. Defines the rules how to mark up a document - does not define the names used in markup. Includes capability to prescribe a XML Schema (XSD) to constrain the markup permitted in a class of documents. Intended for all natural languages, regardless of character set, orientation of script, etc.
XML RPC
JSON Object: collection of comma separated Attributes var object = { } Attributes: name-value pairs “ name”: “Duke” “ age”: 10 Array: List of comma separated objects [{“name”: “Duke”, “age”: 10}, {name:“Tux”, “age”: 20}] Data types (String, Number, boolean, array, object, null)
{ &quot;firstName&quot;: &quot;John&quot;, &quot;lastName&quot;: &quot;Smith&quot;, &quot;age&quot;: 25, &quot;address&quot;: { &quot;streetAddress&quot;: &quot;21 2nd Street&quot;, &quot;city&quot;: &quot;New York&quot;, &quot;state&quot;: &quot;NY&quot;, &quot;postalCode&quot;: &quot;10021&quot; }, &quot;phoneNumber&quot;: [ { &quot;type&quot;: &quot;home&quot;, &quot;number&quot;: &quot;212 555-1234&quot; }, { &quot;type&quot;: &quot;fax&quot;, &quot;number&quot;: &quot;646 555-4567&quot; }   ] }
What is a Web Service A web service is a piece of business logic, located somewhere on the Internet, that is accessible through standard-based Internet protocols such as HTTP or SMTP. Using a web service could be as simple as logging into a site or as complex as facilitating a multi-organization business negotiation.  Ex: Creating a Sales Order and initiating a workflow. Ref: Java Web Services, Chappel et al, O'Reilly
Web Services: Alternate definition A web service is just a web page meant for a computer to request and process. More precisely, a Web service is a Web page that’s meant to be consumed by an autonomous program as opposed to a Web browser or similar UI tool. Copyright 2005 John Cowan under GPL
Service Oriented Architecture As per Wikipedia, Service-oriented architecture (SOA) is a flexible set of design principles used during the phases of systems development and integration in computing. A system based on a SOA will package functionality as a suite of interoperable services that can be used within multiple separate systems from several business domains.
Service Oriented Architecture Requestor Providers Registry FIND , UDDI BIND , SOAP/WSDL PUBLISH,  UDDI
Components of SOA Participants: Provider Registry (broker) Requestor Interactions: Publishing Direct HTTP GET request Dynamic discovery Service location (finding) Binding
SOA: Publishing (dynamic) Provider Registry Here is my service !
SOA: Locating Service Requestor Registry Where is the service?  Find it here !
SOA: Binding Requestor Registry How can I access ? Here is how ! Provider What is the temperature today?  40 C
Characteristics of a Web Service XML-based Loosely coupled Coarse-grained Ability to be synchronous or asynchronous Supports Remote Procedure Calls Supports document exchange Ref: Java Web Services, Chappel et al, O'Reilly
Major Technologies for WS SOAP – Simple Object Access Protocol WSDL – Web Services Definition/Description Language UDDI –Universal Description, Discovery, and Integration Ref: Java Web Services, Chappel et al, O'Reilly
SOAP SOAP stands for Simple Object Access Protocol. It is based on XML. It is a wired protocol and was defined to be highly interoperable.  As of today there are extensive libraries support in virtually all languages to support SOAP based communication.
SOAP: Layers SOAP-ENV:Envelope SOAP-ENV:Header SOAP-ENV:Body
SOAP: Example POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: 299 <?xml version=&quot;1.0&quot;?> < soap:Envelope  xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;> < soap:Header > </ soap:Header > < soap:Body > <m:GetStockPrice xmlns:m=&quot;http://www.example.org/stock&quot;> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </ soap:Body > </ soap:Envelope >
Creating a SOAP message <student> <roll>120</roll> <firstName>Kiran</firstName> <lastName>Reddy</lastName> <grades> <english>A</english> <maths>B</maths> </grades> </student> <?xml version=&quot;1.0&quot;?> <soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;> <soap:Header> </soap:Header> <soap:Body> <student> <roll>120</roll> <firstName>Kiran</firstName> <lastName>Reddy</lastName> <grades> <english>A</english> <maths>B</maths> </grades> </student> </soap:Body> </soap:Envelope>
SOAP: Envelop The SOAP envelope declaration is simply the outermost XML tag that delineates the boundaries of the SOAP document.  The following envelope tag shows three required attributes, which specify the namespace and the schema to be used for this envelope: <SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsi=&quot;http://www.w3.org/1999/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/1999/XMLSchema&quot;> ... </SOAP-ENV:Envelope>
SOAP: Header & Body The SOAP header and body are syntactically similar. It is simply a place to put directives to the SOAP processor that receives the message. The sending and receiving parties need to agree on which elements go there and what they mean.
SOAP: Fault SOAP errors are handled using a specialized envelope known as a Fault Envelope.  If an error occurs while the server processes a SOAP message, it constructs a SOAP Fault and sends it back to the client.
RESTful Architecture
HTTP: Introduction The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990.
HTTP: How does it work? The HTTP protocol is a request/response protocol. A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a connection with a server.
HTTP: How does it work? The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity meta information, and possible entity-body content.
HTTP: Request/Response Client Request GET /vnav/labs/PHP/HTTP.php HTTP/1.1 Host: loadaveragezero.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ... Server Response HTTP/1.1 200 OK Server: Apache/1.3.41 (Unix) Content-type: application/xhtml+xml; charset=UTF-8 ...
What is REST? REST stands for Representational State Transfer.  Its basically a stateless communication protocol relying on lightweight protocols like HTTP. It is basically an architectural design methodology.
REST: The other verbs GET to retrieve information POST to add new information, showing its relation to old information PUT to update information DELETE to discard information
RESTful Application Cycle Resources are identified by URIs ↓ Clients communicate with resources via requests using astandard set of methods ↓ Requests and responses contain resource representations informats identified by media types ↓ Responses contain URIs that link to further resources
REST: Give Everything an ID ID is a URI http://example.com/widgets/foo http://example.com/customers/bar http://example.com/customers/bar/orders/2 http://example.com/orders/101230/customer
Q & A Thank You!

More Related Content

What's hot (20)

PPTX
Restful web services ppt
OECLIB Odisha Electronics Control Library
 
PDF
Api Testing.pdf
JitendraYadav351971
 
PPTX
Introduction to ASP.NET
Rajkumarsoy
 
PDF
JavaScript Programming
Sehwan Noh
 
PPT
Postman.ppt
ParrotBAD
 
PDF
Resource-Oriented Architecture (ROA)
WSO2
 
PDF
Enterprise JavaBeans(EJB)
Armen Arzumanyan
 
PPTX
Threads in JAVA
Haldia Institute of Technology
 
PPTX
Introduction to Maven
Onkar Deshpande
 
PPTX
[Final] ReactJS presentation
洪 鹏发
 
PPTX
Spring Framework
tola99
 
PPTX
Introduction to spring boot
Santosh Kumar Kar
 
PPT
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
PPTX
Web services
Akshay Ballarpure
 
PPTX
What is an API?
Muhammad Zuhdi
 
PPTX
Asp.Net Core MVC with Entity Framework
Shravan A
 
PPTX
.net CLR
DevTalk
 
PPTX
Introduction to webservices
Gagandeep Singh
 
Api Testing.pdf
JitendraYadav351971
 
Introduction to ASP.NET
Rajkumarsoy
 
JavaScript Programming
Sehwan Noh
 
Postman.ppt
ParrotBAD
 
Resource-Oriented Architecture (ROA)
WSO2
 
Enterprise JavaBeans(EJB)
Armen Arzumanyan
 
Introduction to Maven
Onkar Deshpande
 
[Final] ReactJS presentation
洪 鹏发
 
Spring Framework
tola99
 
Introduction to spring boot
Santosh Kumar Kar
 
MVC Architecture in ASP.Net By Nyros Developer
Nyros Technologies
 
Web services
Akshay Ballarpure
 
What is an API?
Muhammad Zuhdi
 
Asp.Net Core MVC with Entity Framework
Shravan A
 
.net CLR
DevTalk
 
Introduction to webservices
Gagandeep Singh
 

Viewers also liked (20)

PPT
Web Service Presentation
guest0df6b0
 
PDF
Web Services Tutorial
Lorna Mitchell
 
PDF
Web service introduction
Sagara Gunathunga
 
PPTX
Web Services - Architecture and SOAP (part 1)
Martin Necasky
 
PDF
Web Services
Antonio Villegas
 
PDF
Web Services
Katrien Verbert
 
PDF
Introduction to SNMP
Mohammed Farrah
 
PDF
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
PPTX
Introduction to HTTP protocol
Aviran Mordo
 
PDF
Understanding the Web through HTTP
Olivia Brundage
 
PDF
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Mark West
 
PPT
Java web services
kumar gaurav
 
PDF
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
0xdaryl
 
PDF
JavaOne 2015 Keynote Presentation
ibmwebspheresoftware
 
PDF
Web protocols for java developers
Pavel Bucek
 
PPTX
Snmp protocol
EM Kautsar
 
PPTX
Les web services
dihiaselma
 
PPTX
SNMP
MuKunD VInaYaK
 
PPT
Wsdl
sanmukundan
 
PDF
WebSocket in Enterprise Applications 2015
Pavel Bucek
 
Web Service Presentation
guest0df6b0
 
Web Services Tutorial
Lorna Mitchell
 
Web service introduction
Sagara Gunathunga
 
Web Services - Architecture and SOAP (part 1)
Martin Necasky
 
Web Services
Antonio Villegas
 
Web Services
Katrien Verbert
 
Introduction to SNMP
Mohammed Farrah
 
Web Services (SOAP, WSDL, UDDI)
Peter R. Egli
 
Introduction to HTTP protocol
Aviran Mordo
 
Understanding the Web through HTTP
Olivia Brundage
 
JavaOne 2015 : How I Rediscovered My Coding Mojo by Building an IoT/Robotics ...
Mark West
 
Java web services
kumar gaurav
 
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
0xdaryl
 
JavaOne 2015 Keynote Presentation
ibmwebspheresoftware
 
Web protocols for java developers
Pavel Bucek
 
Snmp protocol
EM Kautsar
 
Les web services
dihiaselma
 
WebSocket in Enterprise Applications 2015
Pavel Bucek
 
Ad

Similar to Intro to web services (20)

DOCX
Rest vs soap
Naseers
 
PDF
Web services and Applications in Web Technology.pdf
VinayVitekari
 
PPT
Web services for developer
Rafiq Ahmed
 
PPT
complete web service1.ppt
Dr.Saranya K.G
 
PPTX
Service Oriented Architecture
Luqman Shareef
 
PPTX
Web Programming
VijayapriyaP1
 
PPT
SOAP, WSDL and UDDI
Shahid Shaik
 
PPT
WebServices SOAP WSDL and UDDI
Rajkattamuri
 
PPT
WebServices introduction in Mule
F K
 
PPTX
Web services soap
Rajkattamuri
 
PPTX
Web services soap
Khan625
 
PPT
WebServices
Rajkattamuri
 
PPTX
UNIT II-WEB SERVICES (WS) AND PRIMITIVE
VahidhabanuY
 
PPTX
Service Oriented Architecture Updated Luqman
guesteb791b
 
PPTX
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
 
PPT
webservicearchitecture-150614164814-lva1-app6892.ppt
Matrix823409
 
PDF
Brian.suda.thesis
Aravindharamanan S
 
PPT
Web Services
Gaurav Tyagi
 
PPT
Web Services
Gaurav Tyagi
 
PPTX
Web Services - A brief overview
Raveendra Bhat
 
Rest vs soap
Naseers
 
Web services and Applications in Web Technology.pdf
VinayVitekari
 
Web services for developer
Rafiq Ahmed
 
complete web service1.ppt
Dr.Saranya K.G
 
Service Oriented Architecture
Luqman Shareef
 
Web Programming
VijayapriyaP1
 
SOAP, WSDL and UDDI
Shahid Shaik
 
WebServices SOAP WSDL and UDDI
Rajkattamuri
 
WebServices introduction in Mule
F K
 
Web services soap
Rajkattamuri
 
Web services soap
Khan625
 
WebServices
Rajkattamuri
 
UNIT II-WEB SERVICES (WS) AND PRIMITIVE
VahidhabanuY
 
Service Oriented Architecture Updated Luqman
guesteb791b
 
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
 
webservicearchitecture-150614164814-lva1-app6892.ppt
Matrix823409
 
Brian.suda.thesis
Aravindharamanan S
 
Web Services
Gaurav Tyagi
 
Web Services
Gaurav Tyagi
 
Web Services - A brief overview
Raveendra Bhat
 
Ad

More from Neil Ghosh (10)

PPTX
GOLD AG Report in IEEE Hyderabad AGM 2013
Neil Ghosh
 
PPTX
Introduction to JavaFx and HTML5
Neil Ghosh
 
PPTX
GOLD at IEEE Hyderabad SAGM 2012
Neil Ghosh
 
PPT
Astronomy at Pecha Kuch Night Hyderabad Volume 9
Neil Ghosh
 
PDF
Astro quiz
Neil Ghosh
 
PPTX
IEEE GOLD STEP
Neil Ghosh
 
ODP
RestFull Webservices with JAX-RS
Neil Ghosh
 
PPT
Introduction to javaScript
Neil Ghosh
 
ODP
Creating REST Webservice With NetBeans
Neil Ghosh
 
PPT
Edited
Neil Ghosh
 
GOLD AG Report in IEEE Hyderabad AGM 2013
Neil Ghosh
 
Introduction to JavaFx and HTML5
Neil Ghosh
 
GOLD at IEEE Hyderabad SAGM 2012
Neil Ghosh
 
Astronomy at Pecha Kuch Night Hyderabad Volume 9
Neil Ghosh
 
Astro quiz
Neil Ghosh
 
IEEE GOLD STEP
Neil Ghosh
 
RestFull Webservices with JAX-RS
Neil Ghosh
 
Introduction to javaScript
Neil Ghosh
 
Creating REST Webservice With NetBeans
Neil Ghosh
 
Edited
Neil Ghosh
 

Recently uploaded (20)

PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Digital Circuits, important subject in CS
contactparinay1
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 

Intro to web services

  • 1. Introduction to Web Services Sabyasachi Ghosh [email_address]
  • 2. Agenda Refresher: Networking/OSI Model Socket Programming Remote Procedure Calls Refresher: XML Overview of XML RPC Introduction to Web Services/SOA Introduction to SOAP Refresher: HTTP Restful Architectures and RESTful Web Services Q&A
  • 3. Client-Server Technology CLIENT SERVER NETWORK Request Request Request Response Response
  • 5. Introduction to Sockets Socket is an endpoint of a bidirectional inter-process communication flow across an IP-based computer network. Sockets are provided by the operating system and is mapped by the OS to a communicating application process or thread. The transport layer comprises two types of protocols, TCP (Transport Control Protocol) and UDP (User Datagram Protocol). The most widely used programming interfaces for these protocols are sockets.
  • 6. Sockets Sockets are generalized form of inter-process communication (IPC)
  • 7. RPC – Remote Procedure Calls Remote Procedure Call (RPC) is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space. RPC (Remote Procedure Call) goes back at least as far as 1976, when it was described in RFC 707. Ref: Wikipedia
  • 8. RPC – How does it work ? A client makes a call to the procedure in a remote machine (server) which has the business logic with appropriate parameters. The server receives the parameters and executes the procedure locally and then transmits the results back to the client. The client receives the results.
  • 9. RPC – More formally: The client calls the Client stub. The call is a local procedure call, with parameters pushed on to the stack in the normal way. The client stub packs the parameters into a message and makes a system call to send the message. Packing the parameters is called marshalling. The kernel sends the message from the client machine to the server machine. The kernel passes the incoming packets to the server stub. Finally, the server stub calls the server procedure. The reply traces the same in other direction. Ref: Wikipedia
  • 10. XML: Introduction eXtensible Markup Language A simplified version of SGML [ Standard Generalized Markup Language ] Maintains the most useful parts of SGML Designed so that SGML can be delivered over the Web More flexible and adaptable than HTML Markup: Information added to a text to make its structure comprehensible
  • 11. XML: Differences with HTML XML was designed to carry data, not displaying data XML is not a replacement for HTML. Different goals: XML was designed to describe data and to focus on what data is. HTML was designed to display data and to focus on how data looks. HTML is about displaying information, XML is about describing information.
  • 12. XML: Example <?xml version=&quot;1.0&quot;?> < catalog > < product category = &quot;mobile phone&quot;> <mfg>Nokia</mfg><model>8890</model> <description> Intended for EGSM 900 and GSM 1900 networks … </description> <clock setting= &quot;nist&quot; alarm = &quot;yes&quot;/> </ product > < product category = &quot;mobile phone&quot;> <mfg>Ericsson</mfg><model>A3618</model> <description>...</description> </ product > </ catalog >
  • 13. XML: More on it XML is a metalanguage, not a specific language. Defines the rules how to mark up a document - does not define the names used in markup. Includes capability to prescribe a XML Schema (XSD) to constrain the markup permitted in a class of documents. Intended for all natural languages, regardless of character set, orientation of script, etc.
  • 15. JSON Object: collection of comma separated Attributes var object = { } Attributes: name-value pairs “ name”: “Duke” “ age”: 10 Array: List of comma separated objects [{“name”: “Duke”, “age”: 10}, {name:“Tux”, “age”: 20}] Data types (String, Number, boolean, array, object, null)
  • 16. { &quot;firstName&quot;: &quot;John&quot;, &quot;lastName&quot;: &quot;Smith&quot;, &quot;age&quot;: 25, &quot;address&quot;: { &quot;streetAddress&quot;: &quot;21 2nd Street&quot;, &quot;city&quot;: &quot;New York&quot;, &quot;state&quot;: &quot;NY&quot;, &quot;postalCode&quot;: &quot;10021&quot; }, &quot;phoneNumber&quot;: [ { &quot;type&quot;: &quot;home&quot;, &quot;number&quot;: &quot;212 555-1234&quot; }, { &quot;type&quot;: &quot;fax&quot;, &quot;number&quot;: &quot;646 555-4567&quot; } ] }
  • 17. What is a Web Service A web service is a piece of business logic, located somewhere on the Internet, that is accessible through standard-based Internet protocols such as HTTP or SMTP. Using a web service could be as simple as logging into a site or as complex as facilitating a multi-organization business negotiation. Ex: Creating a Sales Order and initiating a workflow. Ref: Java Web Services, Chappel et al, O'Reilly
  • 18. Web Services: Alternate definition A web service is just a web page meant for a computer to request and process. More precisely, a Web service is a Web page that’s meant to be consumed by an autonomous program as opposed to a Web browser or similar UI tool. Copyright 2005 John Cowan under GPL
  • 19. Service Oriented Architecture As per Wikipedia, Service-oriented architecture (SOA) is a flexible set of design principles used during the phases of systems development and integration in computing. A system based on a SOA will package functionality as a suite of interoperable services that can be used within multiple separate systems from several business domains.
  • 20. Service Oriented Architecture Requestor Providers Registry FIND , UDDI BIND , SOAP/WSDL PUBLISH, UDDI
  • 21. Components of SOA Participants: Provider Registry (broker) Requestor Interactions: Publishing Direct HTTP GET request Dynamic discovery Service location (finding) Binding
  • 22. SOA: Publishing (dynamic) Provider Registry Here is my service !
  • 23. SOA: Locating Service Requestor Registry Where is the service? Find it here !
  • 24. SOA: Binding Requestor Registry How can I access ? Here is how ! Provider What is the temperature today? 40 C
  • 25. Characteristics of a Web Service XML-based Loosely coupled Coarse-grained Ability to be synchronous or asynchronous Supports Remote Procedure Calls Supports document exchange Ref: Java Web Services, Chappel et al, O'Reilly
  • 26. Major Technologies for WS SOAP – Simple Object Access Protocol WSDL – Web Services Definition/Description Language UDDI –Universal Description, Discovery, and Integration Ref: Java Web Services, Chappel et al, O'Reilly
  • 27. SOAP SOAP stands for Simple Object Access Protocol. It is based on XML. It is a wired protocol and was defined to be highly interoperable. As of today there are extensive libraries support in virtually all languages to support SOAP based communication.
  • 28. SOAP: Layers SOAP-ENV:Envelope SOAP-ENV:Header SOAP-ENV:Body
  • 29. SOAP: Example POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: 299 <?xml version=&quot;1.0&quot;?> < soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;> < soap:Header > </ soap:Header > < soap:Body > <m:GetStockPrice xmlns:m=&quot;http://www.example.org/stock&quot;> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </ soap:Body > </ soap:Envelope >
  • 30. Creating a SOAP message <student> <roll>120</roll> <firstName>Kiran</firstName> <lastName>Reddy</lastName> <grades> <english>A</english> <maths>B</maths> </grades> </student> <?xml version=&quot;1.0&quot;?> <soap:Envelope xmlns:soap=&quot;http://www.w3.org/2003/05/soap-envelope&quot;> <soap:Header> </soap:Header> <soap:Body> <student> <roll>120</roll> <firstName>Kiran</firstName> <lastName>Reddy</lastName> <grades> <english>A</english> <maths>B</maths> </grades> </student> </soap:Body> </soap:Envelope>
  • 31. SOAP: Envelop The SOAP envelope declaration is simply the outermost XML tag that delineates the boundaries of the SOAP document. The following envelope tag shows three required attributes, which specify the namespace and the schema to be used for this envelope: <SOAP-ENV:Envelope xmlns:SOAP-ENV=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsi=&quot;http://www.w3.org/1999/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/1999/XMLSchema&quot;> ... </SOAP-ENV:Envelope>
  • 32. SOAP: Header & Body The SOAP header and body are syntactically similar. It is simply a place to put directives to the SOAP processor that receives the message. The sending and receiving parties need to agree on which elements go there and what they mean.
  • 33. SOAP: Fault SOAP errors are handled using a specialized envelope known as a Fault Envelope. If an error occurs while the server processes a SOAP message, it constructs a SOAP Fault and sends it back to the client.
  • 35. HTTP: Introduction The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990.
  • 36. HTTP: How does it work? The HTTP protocol is a request/response protocol. A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content over a connection with a server.
  • 37. HTTP: How does it work? The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity meta information, and possible entity-body content.
  • 38. HTTP: Request/Response Client Request GET /vnav/labs/PHP/HTTP.php HTTP/1.1 Host: loadaveragezero.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ... Server Response HTTP/1.1 200 OK Server: Apache/1.3.41 (Unix) Content-type: application/xhtml+xml; charset=UTF-8 ...
  • 39. What is REST? REST stands for Representational State Transfer. Its basically a stateless communication protocol relying on lightweight protocols like HTTP. It is basically an architectural design methodology.
  • 40. REST: The other verbs GET to retrieve information POST to add new information, showing its relation to old information PUT to update information DELETE to discard information
  • 41. RESTful Application Cycle Resources are identified by URIs ↓ Clients communicate with resources via requests using astandard set of methods ↓ Requests and responses contain resource representations informats identified by media types ↓ Responses contain URIs that link to further resources
  • 42. REST: Give Everything an ID ID is a URI http://example.com/widgets/foo http://example.com/customers/bar http://example.com/customers/bar/orders/2 http://example.com/orders/101230/customer
  • 43. Q & A Thank You!