Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Getting Started with Web Services

732 views

Published on

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

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Getting Started with Web Services

  1. 1. ASTCORPORATION RECOGNIZED.SPECIALIZED. PREFERRED. Getting Started with Web Services Zeeshan Baig 05/8/2015
  2. 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. 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
  4. 4. 4 Quote
  5. 5. 5 What is a Web Service?
  6. 6. 6 In Simple words “A Framework for a conversation between 2 devices” What is a Web Service?
  7. 7. 7 • Communicate using open protocols • Uses specific Message Format • Hides complexities between devices What Web Services do?
  8. 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?
  9. 9. 9 Examples of Web Services
  10. 10. 10  Yahoo Weather API • https://developer.yahoo.com/weather/ Examples of Web Services - 1
  11. 11. 11  Flight Aware • http://flightaware.com/commercial/flightxml/ Examples of Web Services - 2
  12. 12. 12  OANDA Currency Exchange • https://www.oanda.com/rates/test-drive Examples of Web Services - 3
  13. 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
  14. 14. 14 Demo Public Web Services
  15. 15. 15 Message Formats
  16. 16. 16 • XML • JSON Message Formats
  17. 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. 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. 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
  20. 20. 20 XML Overview
  21. 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. 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. 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
  24. 24. 24 Web Services Standards
  25. 25. 25 •SOAP •REST Web Services Standards
  26. 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. 27 • REST – Representational State Transfer – HTTP Bases verbs – GET, PUT, POST, DELETE – Simple familiar – Programmer friendly – No Contract – Mobile Types of Web Services
  28. 28. 28 SOAP vs REST - 1
  29. 29. 29 SOAP vs REST - 2
  30. 30. 30 Tools
  31. 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. 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. 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
  34. 34. 34 Creating SOAP Based Service
  35. 35. 35 1. Create Implementation Logic 2. Add Jersey Libraries to Project 3. Add REST annotations 4. Deploy 5. Call Creating REST Web Services
  36. 36. 36 Creating REST based services
  37. 37. 37 Testing Tools
  38. 38. 38 Testing Web Services using SOAP UI
  39. 39. 39 Security
  40. 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. 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
  42. 42. 42 Question & Answer

×