1 Web Services – Part I CS 236607, Spring 2008/9.

Slides:



Advertisements
Similar presentations
웹 서비스 개요.
Advertisements

18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Web Service Architecture
Siebel Web Services Siebel Web Services March, From
Overview of Web Services
Web Services.
31242/32549 Advanced Internet Programming Advanced Java Programming
Web Services Copyright © Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
1 Understanding Web Services Presented By: Woodas Lai.
Topics Acronyms in Action SOAP 6 November 2008 CIS 340.
Information Management NTU Web Services. Information Management NTU What Are Web Services? Semantically encapsulate discrete functionality Loosely coupled,
Web Services Darshan R. Kapadia Gregor von Laszewski 1http://grid.rit.edu.
Web Services Nasrullah. Motivation about web service There are number of programms over the internet that need to communicate with other programms over.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
A New Computing Paradigm. Overview of Web Services Over 66 percent of respondents to a 2001 InfoWorld magazine poll agreed that "Web services are likely.
Slide 1 EE557: Server-Side Development Lecturer: David Molloy Room: XG19 Mondays 10am-1pm Notes:
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
2006 IEEE International Conference on Web Services ICWS 2006 Overview.
Web Services CS Web Services Internet-available services using XML messaging, for computer-computer interaction Not tied to any OS or language Self-describing:
Web Service What exactly are Web Services? To put it quite simply, they are yet another distributed computing technology (like CORBA, RMI, EJB, etc.).
Web services A Web service is an interface that describes a collection of operations that are network-accessible through standardized XML messaging. A.
Processing of structured documents Spring 2003, Part 6 Helena Ahonen-Myka.
Service-Oriented Programming
WEB SERVICES Web Development Technology. 2 Contents How it’s work? –Definition –Simple Web Service Invocation –Web Service Description –SOAP –UDDI.
Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Web Services Architecture1 - Deepti Agarwal. Web Services Architecture2 The Definition.. A Web service is a software system identified by a URI, whose.
Outline  Enterprise System Integration: Key for Business Success  Key Challenges to Enterprise System Integration  Service-Oriented Architecture (SOA)
Web Services (SOAP, WSDL, and UDDI)
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
Dodick Zulaimi Sudirman Lecture 14 Introduction to Web Service Pengantar Teknologi Internet Introduction to Internet Technology.
Web Services (SOAP, WSDL, UDDI) SNU OOPSLA Lab. October 2005.
Web Services Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Web Services based e-Commerce System Sandy Liu Jodrey School of Computer Science Acadia University July, 2002.
Web Services Based on SOA: Concepts, Technology, Design by Thomas Erl MIS 181.9: Service Oriented Architecture 2 nd Semester,
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Web Services. ASP.NET Web Services  Goals of ASP.NET Web services:  To enable cross-platform, cross- business computing  Great for “service” based.
Chapter 10 Intro to SOAP and WSDL. Objectives By study in the chapter, you will be able to: Describe what is SOAP Exam the rules for creating a SOAP document.
Web Services Presented By : Noam Ben Haim. Agenda Introduction What is a web service Basic Architecture Extended Architecture WS Stacks.
Copyright © 2013 Curt Hill SOAP Protocol for exchanging data and Enabling Web Services.
1 Web Services Web and Database Management System.
XML and Web Services (II/2546)
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
Kemal Baykal Rasim Ismayilov
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
Introduction to Web Services. Agenda Motivation History Web service model Web service components A walkthrough examples.
1 G52IWS: Web Services Chris Greenhalgh. 2 Contents The World Wide Web Web Services example scenario Motivations Basic Operational Model Supporting standards.
Web Services An Introduction Copyright © Curt Hill.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
1 Service Oriented Architecture SOA. 2 Service Oriented Architecture (SOA) Definition  SOA is an architecture paradigm that is gaining recently a significant.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
Web Services Blake Schernekau March 27 th, Learning Objectives Understand Web Services Understand Web Services Figure out SOAP and what it is used.
Web Services. XML Namespaces, Schemas XML processing. Week 2.
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
A service Oriented Architecture & Web Service Technology.
Java Web Services Orca Knowledge Center – Web Service key concepts.
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
Unit – 5 JAVA Web Services
Introduction to Web Services and SOA
Web services, WSDL, SOAP and UDDI
Introduction to Web Services and SOA
Presentation transcript:

1 Web Services – Part I CS , Spring 2008/9

2 What is a Web Service? Web Service: 1. "Web services are loosely coupled software components delivered over Internet standard technologies." 2. “Software that makes services available on a network using technologies such as XML and HTTP” Service-Oriented Architecture (SOA):  “Development of applications from distributed collections of smaller loosely coupled service providers” Web services support service-oriented architectures, using in particular XML and HTTP.

3 What is a Web Service? (Cont.) Self-contained, modular Web application that can be published, located and invoked across the Web A Web service can perform functions of varying complexities. Once deployed, other applications (and other Web services) can discover and invoke the deployed service

4 Why a New Framework? CORBA, DCOM, Java/RMI,... already exist XML+HTTP: platform neutral, widely accepted and utilized

Example Scenario – Online Trade Book Store The Hobbit (5) Price: Copies in Stock: 1 The Hobbit (5) Price: Copies in Stock: 0 Book Store The Hobbit (5) Price: Copies in Stock: 5 Buy The Hobbit (5) How Much? Buy it The Hobbit (5) Price: Copies in Stock: 4 The Hobbit (5) Price: Copies in Stock: 1 The Hobbit (5) Price: Copies in Stock: 0

6 Why is it Difficult to Use Ordinary Web Sites as Services? Consider an application that should return the price of the book “The Hobbit”  The application needs to fill the required form and launch a “browser-like” request  The application needs to parse the page, based on its specific HTML structure, and retrieve the price  Once the Web site changes its user interface, your program is useless  How can we find new online stores?

What is the price here? How can we find this URL?

8 Calling Remote Functions Could Help It would help if we could call functions, such as:  Amazon.getPrice(“The Hobbit")  Amazon.buyBook(“The Hobbit", myId) getPrice(…) The Internet

9 Difficulties in Using Remote Functions For each remote function, we need to phrase a call in the specific language that is used for its implementation For each remote function, we need to contact the provider in order to find out what exactly the signature (i.e., parameters, return value, inc. the type) is On the server side, each remote function needs to listen to a server socket bound to a specific port  Not in line with protection by firewalls

10 A Solution Use an agreed interface and a syntax that all applications are familiar with (e.g., XML)  For example, SOAP Use HTTP to transfer data through port 80 Use a standard for publishing methods, their signatures and their usage  For example, WSDL Use standard directory structures for publishing available services  For example, UDDI

11 Available Web Services Examples Google search ( Weather reports Stock prices Currency exchanges Sending SMS messages, faxes Prices of books in Barnes and Nobles Dictionaries And more…

12 Essential Technologies A range of protocols has been suggested in the last years. We will discuss what are commonly believed to be the essential technologies:  SOAP – exchanging XML messages on a network  WSDL – describing interfaces of Web services  UDDI – managing registries of Web services SERVICE REGISTRY SERVICE USER (Client) SERVICE PROVIDER publish messages find

13 SOAP Used to be “Simple Object Access Protocol” but no longer an acronym...

14 What is SOAP? SOAP is a protocol for invoking Web Services SOAP is XML based In SOAP, applications may exchange information over HTTP  HTTP is just one possible communication pattern supported by SOAP (e.g. SMTP)

15 SOAP Envelope... Envelope Headers:  Encryption information  Access control  Routing ...

< soapenv:Envelope xmlns:soapenv=" xmlns:xsd=" xmlns:xsi=" <ns1:getRate soapenv:encodingStyle=" xmlns:ns1="urn:xmethods-CurrencyExchange"> Euro Israel A request to services.xmethods.net:80

<soap:Envelope xmlns:soap=' xmlns:xsi=' xmlns:xsd=' xmlns:soapenc=' soap:encodingStyle=' < n:getRateResponse xmlns:n='urn:xmethods-CurrencyExchange'> The Response

18 A SOAP Message A SOAP message is an ordinary XML document containing the following elements:  Envelope – identifies the XML document as a SOAP message: required  Header – contains header information: optional  Body – contains call or response information: required  Fault – provides information about errors that occurred while processing the message: optional

19 Special SOAP Header Attributes mustUnderstand And more Example:... <c:encoding env:role=" env:mustUnderstand="true"> gzip+base64... INITIAL SENDER INTERMEDIARY ULTIMATE RECEIVER role

20 SOAP Response on Error In loosely connected distributed systems many things can go wrong:  Invalid data may be transmitted  Servers may be unavailable SOAP provides a uniform way to indicate such errors.

21 Faults Example <env:Envelope xmlns:env=" xmlns:w=" env:Sender w:InvalidBuyRequest The value of 'amount' is invalid! Værdien af 'amount' er ugyldig!

22 Protocol Binding Transmitting a SOAP message requires a communication protocol to carry the message. This is called SOAP protocol binding. Transmission protocols: HTTP, SMTP,... Message exchange patterns:  request–response (for RPC)  POST  SOAP response (Only the response is a SOAP message)  GET How will we know what To use?

23 WSDL Web Services Description Language

24 Describing a Web Service Need a standard way to describe a Web Service:  The methods available  Their parameters  How to communicate  Etc.

25 Describing a Web Service – WSDL Answer WSDL is a standard for describing Web services using XML. WSDL Can Describe:  What a Web service can do  Where it resides  How to invoke it

Structure of a WSDL Description <description xmlns=" targetNamespace="..."...> <!-- XML Schema description of types being used in messages --> <!-- combination of an interface, a binding, and a service location -->...

27 A Recipe Server with XML and HTTP Let’s think of a Recipe Server which under an Ad hoc approach, RPC-style, it would have the following functionalities:  Recipes getRecipes()  Lock lockRecipe(ID)  void writeRecipe(Lock,Recipe)  void unlockRecipe(Lock) This is how it’s WSDL would look like (The following slides)

Recipe Server with WSDL and SOAP (1/6) <description xmlns=" targetNamespace=" xmlns:x=" <xs:schema xmlns:xs=" targetNamespace= " xmlns:t=" <xs:import namespace=" schemaLocation="recipes.xsd"/>

Recipe Server with WSDL and SOAP (2/6)

Recipe Server with WSDL and SOAP (3/6)

Recipe Server with WSDL and SOAP (4/6) <interface name="recipeserverInterface" xmlns:t=" styleDefault=" <operation name="getRecipesOperation" pattern=" <operation name="lockRecipeOperation" pattern=" <output messageLabel="Out" element="t:lockRecipeResponse"/>

Recipe Server with WSDL and SOAP (5/6) <operation name="writeRecipeOperation" pattern= " <operation name="unlockRecipeOperation" pattern="

Recipe Server with WSDL and SOAP (6/6) <binding name="recipeserverSOAPBinding" interface="x:recipeserverInterface" type=" xmlns:ws=" ws:protocol=" ws:mepDefault= " xmlns:soap=" <service name="recipeserver" interface="x:recipeserverInterface"> <endpoint name="recipeserverEndpoint" binding="x:recipeserverSOAPBinding" address= "

34 To Put It Briefly… This particular WSDL description tells us that there is a Web service at the URI It understands the RPC-style operations getRecipes, lockRecipe, writeRecipe, and unlockRecipe The communication uses SOAP with the SOAP HTTP binding Certain faults may occur And input and output values are required to be valid according the given schema definitions.

35 UDDI Universal Description, Discovery, and Integration

36 A Telephone Book How can you find a Web service? How can you register your Web service so that others will find it? UDDI is a mechanism for registering and discovering Web services. Think of UDDI as a telephone book

37 More about UDDI UDDI has grown from the equivalent of a simple yellow pages directory to a framework for brokering collaboration between Web services. For the applications we have considered so far, an external Web service would typically be discovered manually by the programmer and be hardwired into the application. This is known as static discovery. UDDI also targets dynamic discovery, where the application itself at runtime finds a required Web service selected on the basis of, for example, price, availability, or efficiency.

38 More about UDDI (Cont.) UDDI has as yet few applications, compared to the more widespread use of SOAP and WSDL, and most available case studies only consider static discovery.

39 Summary SOAP – A protocol for exchanging XML messages on a network (focusing on HTTP) WSDL – A language for describing Web services interfaces. UDDI – A system for managing registries of Web services

40 Resources An Introduction to XML and Web Technologies / Anders Møller and Michael I. Schwartzbach – course literature An Introduction to XML and Web Technologies / Anders Møller and Michael I. Schwartzbach W3C’s SOAP Specifications W3C’s WSDL Specifications UDDI The Web Service Interoperability Organization The Web Service Interoperability Organization HU