Web services are common way to communicate between applications regardless of languages or platform your application is developed. Therefore, understanding of Web services is a critical skill. In this session we will go through the basics foundation of what web services are and how you can create, utilize, and secure them.
Topics Include:
1. What is a web service?
2. Understanding of transfer protocols and message formats
3. Understanding different types of Web services
4. Creating basic web services
5. Available tools
6. Security
Presenter: Zeeshan Baig
2. 2
• Over 15 years of Experience with Oracle
Products
• Working at AST Middleware practice for
about 3 years
• Oracle ACE
• Blog: www.baigzeeshan.com
• Twitter: @baigsorcl
• LinkedIn: www.linkedin.com/in/baigzeeshan
About Me
3. 3
What is a Web Service?
Web Services Message Formats
Web Services Standards
How to Create Web Services
Testing Tools
Security
Q & A
Disclaimer: All Images used in presentation are property of respected owners and used for educational purpose only
Agenda
6. 6
In Simple words
“A Framework for a conversation
between 2 devices”
What is a Web Service?
7. 7
• Communicate using open protocols
• Uses specific Message Format
• Hides complexities between devices
What Web Services do?
8. 8
• Service Provider
– Provides Services to rest of the world
– Could provide data in different formats
• Requestor
– Requestor will be aware of type of web
service
– Don’t need to know complexities behind
Service
How it works?
10. 10
Yahoo Weather API
• https://developer.yahoo.com/weather/
Examples of Web Services - 1
11. 11
Flight Aware
• http://flightaware.com/commercial/flightxml/
Examples of Web Services - 2
12. 12
OANDA Currency Exchange
• https://www.oanda.com/rates/test-drive
Examples of Web Services - 3
13. 13
• Integrate with other systems
• Create Reusable components
• Publish functions and messages to
rest of the world
• Your Java based application can
send data to your .NET application
• EBS system data can be leverage by
Cloud based applications
Benefits of using Web Service
17. 17
• XML stands for Extensible Markup Language.
• XML was designed to describe data.
• XML is a software- and hardware-independent tool
for carrying information
• Learn more about XML at
– http://www.w3schools.com/xml/
XML Overview
18. 18
• Plain Text
John
Doe
Anna
Smith
Peter
Jones
• XML Document
<employees>
<employee>
<firstName>John</firstName>
<lastName>Doe</lastName>
</employee>
<employee>
<firstName>Anna</firstName>
<lastName>Smith</lastName>
</employee>
<employee>
<firstName>Peter</firstName>
<lastName>Jones</lastName>
</employee>
</employees>
XML Overview
19. 19
• Syntax rules of XML are very
simple and logical
• All XML Elements Must Have a
Closing Tag </>
• XML Tags are Case Sensitive
• XML Documents Must Have a
Root Element <employees>
• Data resides under elements
tags
• XML Document
<employees>
<employee>
<firstName>John</firstName>
<lastName>Doe</lastName>
</employee>
<employee>
<firstName>Anna</firstName>
<lastName>Smith</lastName>
</employee>
<employee>
<firstName>Peter</firstName>
<lastName>Jones</lastName>
</employee>
</employees>
XML Syntax
21. 21
• JSON: JavaScript Object Notation.
• Lightweight
• Transportation Independent
• JSON is an easier-to-use alternative to XML.
• JSON is "self-describing" and easy to understand.
• Learn more about JSON at
– http://www.w3schools.com/json
JSON Overview
22. 22
• Plain Text
John
Doe
Anna
Smith
Peter
Jones
• JSON Document
{
"employees":
[
{"firstName":"John",
"lastName":"Doe"},
{"firstName":"Anna",
"lastName":"Smith"},
{"firstName":"Peter",
"lastName":"Jones"}
]
}
JSON Overview
23. 23
• JSON syntax is derived from
JavaScript object notation
syntax:
• Data is in name/value pairs
• Data is separated by commas
• Curly braces hold objects
• Square brackets hold arrays
• JSON Document
{
"employees":
[
{"firstName":"John",
"lastName":"Doe" },
{"firstName":"Anna",
"lastName":"Smith"},
{"firstName":"Peter",
"lastName":"Jones"}
]
}
JSON Syntax
26. 26
• SOAP
– Simple Object Access Protocol
– Relies on XML message Format
– Requires WSDL Document
– Requires Contract
– Enterprise Standard
Types of Web Services
27. 27
• REST
– Representational State Transfer
– HTTP Bases verbs
– GET, PUT, POST, DELETE
– Simple familiar
– Programmer friendly
– No Contract
– Mobile
Types of Web Services
31. 31
• Any Development Tool to build Web
Services
– JDeveloper
– Eclipse
– Microsoft Visual Studio
• SOAP UI for testing
• REST Console (Chrome Extension)
• Web Browser
• Oracle HTTP Analyzer
• Oracle Enterprise Manager
Tools
32. 32
• Inbound and Outbound data from
Cloud based application to on
premise apps
• Resolve Compatibility issues for
example legacy java application to
use modern feature
• Payment gateways (Visa,
MasterCard)
• Schedule of data movement from
.NET application to SOA based
application
Real world Use Cases
33. 33
1. Create XML Schema
2. Create WSDL Document
3. Implement Logic
4. Deploy Web Service to server
5. Create Proxy client
6. Call it using Proxy client
Creating SOAP Based Web Services
40. 40
• Enable Encryption - lets the traffic go in a
non-human readable format (SSL)
• Enable Authentication – Allows to pass user
name and password with every request
• API Keys - String that's issued to a developer
by a web service provider that the
developer then includes in their web service
requests.
• Security Tokens - may be a physical device
that an authorized user of computer
services is given to ease authentication
Web Service Security
41. 41
• Know we are familiar with Web Services
• Web Services is a framework to communicate
between 2 devices
• We know XML and JSON message Formats
• SOAP and REST are main standards
• Difference between SOAP and REST
• Tools to develop and test Services
• Real world examples
Summary