Introduction to Web Services

Slides:



Advertisements
Similar presentations
REST Vs. SOAP.
Advertisements

Web Service Testing RESTful Web Services Snejina Lazarova Dimo Mitev
What are Web Services? How to use them?
Introduction to Web Services and Web API’s Richard Holowczak Baruch College December, 2014.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
JSON Valery Ivanov.
With jQuery and AJAX Doncho Minkov Telerik Corporation Technical Trainer.
INNOV-3: Mashup Basics or > 2 Sheldon Borkin VP Technology Rick Kuzyk Sr Portfolio Specialist.
Web Services CS Web Services Internet-available services using XML messaging, for computer-computer interaction Not tied to any OS or language Self-describing:
RSS RSS is a method that uses XML to distribute web content on one web site, to many other web sites. RSS allows fast browsing for news and updates.
More APIs: Web Services CMPT 281. Announcements Project milestone Lab: – Web services examples.
CS 415 N-Tier Application Development By Umair Ashraf July 6,2013 National University of Computer and Emerging Sciences Lecture # 9 Introduction to Web.
With jQuery and AJAX Doncho Minkov Telerik Corporation Technical Trainer.
Chapter ONE Introduction to HTML.
TP2653 Adv Web Programming SOAP and WSDL. SOAP Simple Object Access Protocol – Lightweight XML-based messaging protocol – A protocol for accessing a Web.
Introduction SOAP History Technical Architecture SOAP in Industry Summary References.
SOAP Simple Object Access Protocol by Vinubalaji Gopal (Vinu)
Enterprise Application Integration – Web Collaboration and Standardisation Enterprise Application Integration – Web Collaboration and Standardisation.
CGI and AJAX CS-260 Dick Steflik.
Chapter 1: Introduction to Web
SOAP Tutorial Ching-Long Yeh 葉慶隆 Department of Computer Science and Engineering Tatung University
The New Zealand Institute for Plant & Food Research Limited Matthew Laurenson Web Services: Introduction & Design Considerations.
Lecture 13 – XML and JSON SFDV3011 – Advanced Web Development Reference: 1.
 The HTML/HTTP combination data format and exchange protocol is the foundation pillar of the World Wide Web.  Evolution of the Web (Fig. 6.12) 6.3 Unified.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Web Services XML-RPC, SOAP, REST Advanced Web-based Systems | Misbhauddin.
Web Services Description Language (WSDL) Jason Glenn CDA 5937 Process Coordination in Service and Computational Grids September 30, 2002.
HTML5. HTML5’s overall theme The browser as a rich application platform rich, cross-device user interfaces offline operation capability hardware access.
1 Data Communications and Network Programming: Course Introduction Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Kingdom of Saudi Arabia Ministry of Higher Education Al-Imam Muhammad Ibn Saud Islamic University College of Computer and Information Sciences Chapter.
 Contains services or interfaces that can be accessed over Internet.  Provides certain functionalities and attributes for other applications.  Application.
RESTful Web Service 2014 년 12 월 한연희
1 Web Services Web and Database Management System.
Simple Object Access Protocol. Web Services: SOAP2 Why Simple Object Access Protocol Light weight replacement for complicated distributed object technology.
Google Data Protocol Guy Mark Lifshitz. Motivation Google’s Mission: – Organize the world’s information – Make information universally accessible – Provide.
1 Alternative view on Internet Computing Web 1.0 –Web 1.0 is first generation, Web Information based. Driven by Information provider. Web 2.0 Ajax enabled.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Introduction to Web Services. SOAP SOAP originally stood for "Simple Object Access Protocol". Web Services expose useful functionality to Web users through.
CSCE 315 – Programming Studio Spring Goal: Reuse and Sharing Many times we would like to reuse the same process or data for different purpose Want.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
RESTful Web Services What is RESTful?
RESTful Web Services A MIDAS MISSION PRESENTATION APRIL 29, 2015.
Web Technologies Lecture 10 Web services. From W3C – A software system designed to support interoperable machine-to-machine interaction over a network.
1/30/20161 Introduction to Web Services Bina Ramamurthy
Netprog: Soap & XML-RPC1 XML-RPC and SOAP. Netprog: Soap & XML-RPC2 XML Extensible Markup Language Markup Language. –HTML is also a markup language (but.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Web Design Terminology Unit 2 STEM. 1. Accessibility – a web page or site that address the users limitations or disabilities 2. Active server page (ASP)
SOAP, Web Service, WSDL Week 14 Web site:
1 Data Communications and Network Programming: Course Introduction Asst. Prof. Chaiporn Jaikaeo, Ph.D.
The Internet Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
Embt.co/sprint-rest-json-services Blog Notes: Building RESTful servers. In C++ Builder Developer Skill Sprint Tips, Tricks and Techniques The Ultimate.
Web Development. Agenda Web History Network Architecture Types of Server The languages of the web Protocols API 2.
The Fat-Free Alternative to XML
4.01 How Web Pages Work.
API (Application Program Interface)
The Fat-Free Alternative to XML
REST: Web Services Abel Sanchez.
JSON.
GF and RS, Dept. of CS, Mangalore University
Introduction Web Environments
WEB API.
$, $$, $$$ API testing Edition
Middleware, Services, etc.
Introduction to World Wide Web
The Fat-Free Alternative to XML
4.01 How Web Pages Work.
NEECOM – May 22, 2019 Todd L Gould, CEO
Presentation transcript:

Introduction to Web Services Asst. Prof. Chaiporn Jaikaeo, Ph.D. chaiporn.j@ku.ac.th http://www.cpe.ku.ac.th/~cpj Computer Engineering Department Kasetsart University, Bangkok, Thailand

Traditional World-Wide-Web Designed for human-to-app interactions Information sharing (Non-automated) E-commerce Built on top of HTTP – for data transfer HTML – for representing document

What's Next? Try taking humans out of the loop Systematic application-to-application interaction over the web Automated e-commerce Resource sharing Distributed computing Web services (another) effort to build distributed computing platform for the web

Web Services vs. Web Apps Web application Provides service directly to user Web service or (Web API) Provides service to other programs browser web server HTTP web server (service provider) app (service user) HTTP

Web Service Protocols Simple Object Access Protocol (SOAP) Service requests and responses are always done via XML messages, called SOAP envelope Formally supported by World Wide Web Consortium (W3C) Representational State Transfer (REST) Service requests are done via generic HTTP commands: GET, POST, PUT, DELETE Simpler set of operations

Other Web Service Protocols Web feeds RSS Atom Remote procedure call JSON-RPC XML-RPC JavaScript

Sample SOAP Message E.g., message requesting IBM stock price POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: 299 <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> </soap:Header> <soap:Body> <m:GetStockPrice xmlns:m="http://www.example.org/stock"> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope> HTTP Header SOAP Envelope Desired operation (Verb) Object of interest (Noun)

Sample REST Request E.g., message requesting IBM stock price The above corresponds to the URL GET /stock/ibm HTTP/1.1 Host: www.example.org HTTP Header Desired operation (Verb) Object of interest (Noun) http://www.example.org/stock/ibm

Data Interchange Formats XML – eXtensible Markup Language E.g., RSS, Atom Large collection of libraries for processing XML <?xml version="1.0" encoding="ISO-8859-1"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/"> <title>Slashdot</title> <link>http://slashdot.org/</link> <description>News for nerds, stuff that matters</description> <dc:subject>Technology</dc:subject> <items> <rdf:Seq> <rdf:li rdf:resource="http://it.slashdot.org/story/11/02/14/0337211/Recent-HP-Laptops-Shipped-CPU-Choking-Wi-Fi-Driver?from=rss" /> </ref:Seq> </items> </rdf:RDF>

Data Interchange Formats JSON – JavaScript Object Notation Can be directly evaluated in JavaScript Typically smaller than XML Libraries for other languages are also available { "Person": "firstName": "John", "lastName": "Smith", "age": 25, "Address": "streetAddress":"21 2nd Street", "city":"New York", "state":"NY", "postalCode":"10021" }, "PhoneNumbers": "home":"212 555-1234", "fax":"646 555-4567" } <Person> <firstName>John</firstName> <lastName>Smith</lastName> <age>25</age> <Address> <streetAddress>21 2nd Street</streetAddress> <city>New York</city> <state>NY</state> <postalCode>10021</postalCode> </Address> <PhoneNumbers> <home>212 555-1234</home> <fax>646 555-4567</fax> </PhoneNumbers> </Person> XML JSON

Example –Wikipedia RESTful API reference Example http://en.wikipedia.org/w/api.php Example http://en.wikipedia.org/w/api.php?format=json&action=query&titles=Kasetsart%20University&prop=revisions&rvprop=content

Example – HostIP.info RESTful Determines geographical location of the specified IP address API documentation http://www.hostip.info/use.html Example http://api.hostip.info/get_json.php?ip=158.108.2.71

Coding Example E.g., accessing HostIP.info from Python import sys import json from urllib import urlencode from urllib2 import urlopen response = urlopen('http://api.hostip.info/get_json.php?' + urlencode({ 'ip' : sys.argv[1], })) data = json.loads(response.read()) print 'IP Address: %s' % data['ip'] print 'City: %s' % data['city'] print 'Country: %s' % data['country_name']

Mashups A mashup is a webpage or application that offers new services by combining data or functionality from two or more sources Main characteristics of mashups Combination Visualization Aggregation They aim to make existing data more useful Example: Wikipediavision Google Maps + Wikipedia http://www.lkozma.net/wpv/index.html

More Resources Search engine for web APIs and mashups http://www.programmableweb.com