www.lifein01.com - for more info
Web services are self contained, self describing, modular applications that can be published, located, and invoked across the web. Web services perform functions, which can be anything from simple requests to complicated business processes.”
2. What is a web service?
• According to IBM
• “Web services are self contained, self describing, modular applications that
can be published, located, and invoked across the web. Web services perform
functions, which can be anything from simple requests to complicated
business processes.”
3. Motivation for web services
• In the early days of web, we had only non-interactive web sites, later interactive,
and back end driven web sites.
• Businesses started using web sites to get a global presence. Back end driven web
sites gave the concept of web based applications.
• Web services are another form of web applications, Web services are nothing but
applications with programmatic interface using certain standards and Internet -
friendly protocols. Web services development, standards are the base and
everything, to make them work.
4. Features of Web services
• Migration Of Existing web Application
• Standards are the Base
• Communicate using messages
• Robust , Effective, Flexible Security
• Services Description
• Web Service Discovery
5. Open Standard Technologies
• XML –(Extensible Markup Language) - tagging data such that it can be
exchanged between applications and platforms
• SOAP –(Simple Object Access Protocol) - messaging protocol for
transporting information and instructions between applications (uses
XML)
• WSDL –(Web Service Definition Language) a standard method of
describing web services and their specific capabilities (XML)
• UDDI –(Universal Description, Discovery, and Integration) defines
XML-based rules for building directories in which companies advertise
themselves and their web services
6. Advantages
• Open, text-based standards
• Modular approach
• Inexpensive to implement (relatively)
• Reduce the cost of enterprise application integration
• Incremental implementation
7. XML - Extensible markup language
• Developed from Standard
Generalized Markup Method (SGML)
• XML widely supported by W3C
• Essential characteristic is the
separation of content from
presentation
• XML describes only data
• Any application that understands
XML can exchange data
8. XML - Extensible markup language
• XML parser checks syntax
• If syntax is good the document is
well-formed
• XML document can optionally
reference a Document Type Definition
(DTD), also called a Schema
• If an XML document adheres to the
structure of the schema it is valid
9. SOAP
• SOAP enables between
distributed systems
• SOAP message has three
parts
• envelope – wraps entire
message and contains
header and body
• header – optional element
with additional info such as
security or routing
• body – application-specific
data being commuicated
10. WSDL
• Web services are self-describing
• Description is written in WSDL, an XML-
based language through which a web
service conveys to applications the
methods that the service provides and
how those methods are accessed
• WSDL is meant to be read by
applications (not humans)
11. UDDI
• UDDI defines an XML-based format that describes electronic
capabilities and business processes
• Entries are stored in a UDDI registry
• UDDI Business Registry (UBR)
• "white pages" – contact info, description
• "yellow pages" – classification info, details
• "green pages" – technical data
12. What is REST ?
• REST (Representational State Transfer) is an architectural style for
developing web services.
• REST is popular due to its simplicity and the fact that it builds upon
existing systems and features of the internet's HTTP in order to
achieve its objectives, as opposed to creating new standards,
frameworks and technologies.
13. Two Fundamental Aspects of the REST Design
Pattern
• Resources
Every distinguishable entity is a resource. A resource may be a Web
site, an HTML page, an XML document, a Web service, a physical
device, etc.
• URLs Identify Resources
Every resource is uniquely identified by a URL.
14. Two Fundamental Aspects of the REST Design
Pattern
• Resources
Every distinguishable entity is a resource. A resource may be a Web
site, an HTML page, an XML document, a Web service, a physical
device, etc.
• URLs Identify Resources
Every resource is uniquely identified by a URL.
15. RESTful API
• A RESTful API is an application program interface (API) that uses HTTP
requests to GET, PUT, POST and DELETE data.
• A RESTful API -- also referred to as a RESTful web service -- is based on
representational state transfer (REST) technology, an architectural
style and approach to communications often used in web services
development.
16. REST and SOAP
• RESTful APIs do not require XML-
based web services
• Answer to the same question: –
How to access Web services
• REST:REST came after SOAP
• REST: Truly simple accessing method
• SOAP: sometimes easier
• SOAP: more heavy weight
18. JSON
• JavaScript Object Notation
• Used to format data
• Commonly used in Web as a vehicle to describe data being sent
between systems
19. JSON example
• “JSON” stands for “JavaScript Object Notation”
• Despite the name, JSON is a (mostly) language-independent way of specifying objects as name-
value pairs
• Example (http://secretgeek.net/json_3mins.asp):
• {"skillz": {
"web":[
{ "name": "html",
"years": 5
},
{ "name": "css",
"years": 3
}]
"database":[
{ "name": "sql",
"years": 7
}]
}}
20. JSON vs XML
• Similarities:
• Both are human readable
• Both have very simple syntax
• Both are hierarchical
• Both are language independent
• Both can be used by Ajax
• Both supported in APIs of many programming languages
• Differences:
• Syntax is different
• JSON is less verbose
• JSON can be parsed by JavaScript’s eval method
• JSON includes arrays
• Names in JSON must not be JavaScript reserved words
• XML can be validated