Web Services Essentials ©Copyright 2002-2004. These slides are based on material from “Web Services Essentials” by Ethan Cerami (O’Reilly & Associates)

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

Web Service Architecture
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
1 Understanding Web Services Presented By: Woodas Lai.
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.
WEB SERVICES DAVIDE ZERBINO.
Web Service Standards Relevant to SOA
1 Introduction to XML. XML eXtensible implies that users define tag content Markup implies it is a coded document Language implies it is a metalanguage.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
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.
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
Web Services Andrea Miller Ryan Armstrong Alex. Web services are an emerging technology that offer a solution for providing a common collaborative architecture.
Web services: an Introduction Stuart Fitz-Gerald Feb 2005.
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.).
Processing of structured documents Spring 2003, Part 6 Helena Ahonen-Myka.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Lecture 10 12/3/12 1. $_SERVER Server and execution environment information An array containing information such as headers, paths, and script locations.
UDDI ebXML(?) and such Essential Web Services Directory and Discovery.
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.
WSDL Tutorial Ching-Long Yeh 葉慶隆 Department of Computer Science and Engineering Tatung University
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
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.
Architecting Web Services Unit – II – PART - III.
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.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Web Services Based on SOA: Concepts, Technology, Design by Thomas Erl MIS 181.9: Service Oriented Architecture 2 nd Semester,
Web Services. ASP.NET Web Services  Goals of ASP.NET Web services:  To enable cross-platform, cross- business computing  Great for “service” based.
Introduction to Server-Side Web Development Introduction to Server-Side Web Development using JSP and Web Services JSP and Web Services 18 th March 2005.
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.
WebService. Outline Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry)
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)
Kemal Baykal Rasim Ismayilov
CP3024 Lecture 10 Web Services. What are Web Services?  “encapsulated, loosely coupled, contracted software objects offered via standard protocols” ZapThink.
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
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.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
SOAP, Web Service, WSDL Week 14 Web site:
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
Distributed Web Systems Web Services Lecturer Department University.
Java Web Services Orca Knowledge Center – Web Service key concepts.
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
Web Service Interview/VIVA
Unit – 5 JAVA Web Services
Introduction to Web Services
Introduction to Web Services and SOA
Web Server Administration
Web services, WSDL, SOAP and UDDI
WEB SERVICES DAVIDE ZERBINO.
Introduction to Web Services
Distributed System using Web Services
Introduction to Web Services and SOA
Distributed System using Web Services
Presentation transcript:

Web Services Essentials ©Copyright These slides are based on material from “Web Services Essentials” by Ethan Cerami (O’Reilly & Associates) Please for permission to copy.

2 Road Map  Part I: Introduction to Web Services –What is a Web Service? –Impact / Architectural Overview  Part II: Web Service Protocols –XML-RPC and SOAP –WSDL and UDDI

Part I: Introduction to Web Services

4 Introduction Today, the principal use of the World Wide Web is for interactive access to documents and applications. In almost all cases, such access is by human users, typically working through web browsers… The Web can grow significantly in power and scope if it is extended to support communication between applications, from one program to another. -- From the W3C XML Protocol Working Group Charter

What is a Web Service?

6  A Web Service is any service that: –Is available over the Internet or private (intranet) networks –Uses a standardized XML messaging system –Is not tied to any one operating system or programming language

7 A Basic Web Service Computer A: Language: Perl Operating System: Windows 2000 Computer B: Language: Java Operating System: Linux XML

8 XML Messaging  There are several alternatives for XML messaging: –XML Remote Procedure Calls (XML-RPC) –SOAP –Regular XML transported over HTTP  Any of these options are valid. XML-RPC SOAP HTTP POST/GET XML Document

9 Web Services Defined  Although not required, a web service may also have two additional (and desirable) properties: –a web service should be self describing. –a web service should be discoverable.

10 Web Services: Self Describing  If you publish a new web service, you should also publish a public interface to the service.  At a minimum, you should include human- readable documentation so that others can easily integrate your service.  If you have created a SOAP service, you should also include a public interface written in a common XML grammar.

11 Web Services: Discoverable  If you create a web service, there should be a relatively simple mechanism to publish this fact.  Likewise, interested parties should be able to easily discover your service.  The discovery service could be completely decentralized or completely centralized.

12 Web Services: Summary  To summarize, a complete web service is any service that: –Is available over the Internet or private (intranet) networks –Uses a standardized XML messaging system –Is not tied to any one operating system or programming language –Is self-describing via a common XML grammar –Is discoverable via a simple find mechanism

The Impact of Web Services

14 Web Services in Action  To understand the impact of web services, consider basic e-commerce functionality.  For example, Widgets Inc. sells parts through its web site. –Customers can purchase parts and check on order status.

15 The Web Today: Human Centric Web Browser Web Server HTTP GET: “What is the status of my order?” HTTP Response with HTML Page: “Leaving the warehouse at 3 pm today.”  This illustrates a human-centric web, where humans are the primary actors initiating web requests.  It also represents the primary model on which most of the web operates today.

16 Web Services: Application-Centric Web  With web services, we move from a human-centric web to an application- centric web.  In other words, conversations between applications occur as easily as conversations between web browsers and servers.

17 The Application-Centric Web  The order status is now a web service.  Applications can therefore connect to the order status service directly. Inventory Application Web Server XML Request: “What is the status of my order?” XML Response: “Leaving the warehouse at 3 pm today.” On to other applications On to human users

18 Application-Centric Web  There are numerous areas where an application-centric web would be extremely helpful: –credit card verification –package tracking –shopping bots –single sign-on registration –calendar, , etc.

19 The Semantic Web  Tim Berners Lee, the original inventor of the WWW, is now arguing for a Semantic Web.  Berners Lee: The next stage is development of the Web is the Semantic Web.  The Semantic Web vision is also application centric.  Berners Lee has also argued that web services are in fact an actualization of the Semantic Web Vision.

20 Haven’t we seen this before?  An application-centric web is not a new notion.  For years, developers have created –CGI applications, Java Servlets and CORBA applications –designed primarily for use by other applications.  The crucial difference is that most of these systems consisted of ad-hoc solutions.  With web services, we have the promise of some standardization.  Standardization will lower the barrier to application integration.

21 The Long-term Vision: Automated Web  In the long-term, web services offer the promise of the automated Web.  “Just-in-time” integration: –If services are easily discoverable, self-describing, and stick to common standards, it is possible to automate application integration.  For example, consider a company, Mega Electric (ME) that wants to buy parts from Widgets,Inc. –ME wants to automatically integrate inventory with Widgets, Inc. order status service.

22 Just-In-Time Integration ME “Smart” Inventory Application Service Registry Discover Services 1 Widgets Inc. Server Service Description Order Status Service Retrieve Service Description 2 Invoke Remote Service 3

23 Hype v. Reality  How close are we to creating “Just-in-time” integration?  Currently, only some processes can be automated: –automatic registry query –automatic invocation of service  However, –no mechanism exists for automating business relationships. –no mechanism exists for evaluating the quality of services.

24 Industry Landscape  Many companies are investing heavily in web services.  Currently many competing frameworks for building web services.  Three main contenders: –Microsoft.NET –IBM Web Services –Sun Open Net Environment (ONE), Java  All frameworks share a commitment to the same web services standards.

25 Standardization  The World Wide Web Consortium is heavily involved in standardizing web services. –SOAP is the first specification to be standardized. –  Web Services Interoperability Organization (WSI) –Industry organization –Designed to speed up the standardization/compliance process. –

Web Services Architecture

27 Web Service Architecture  There are two ways to view the web service architectural framework: 1)Examine individual roles of each web service actor 2)Examine the emerging web service protocol stack.

28 Web Service Roles  Three major roles in web services: –Service Provider: provider of the web service. –Service Requestor: any consumer of the web service. –Service Registry: logically centralized directory of services.

29 Web Service Roles Service Registry Service Requestor Service Provider Discover Services 1 Invoke Service 2

30 Web Service Protocol Stack  Service transport: responsible for transporting messages. Examples: HTTP, BEEP  XML messaging: responsible for encoding messages in common XML format. Examples: XML-RPC, SOAP  Service Description: responsible for describing an interface to a specific web service. Example: WSDL  Service Discovery: responsible for centralizing services into a common search registry. Example: UDDI.

31 Web Service Protocol Stack UDDI WSDL XML-RPC, SOAP, Custom XML HTTP, SMTP, FTP, BEEP Discovery Description XML Messaging Transport

Part II: Web Service Protocols

XML Messaging

34 Option 1: XML-RPC  XML-RPC: protocol that uses XML messages to perform Remote Procedure Calls (RPC.)  Platform independent; diverse applications can talk to each other.  XML-RPC is the easiest way to get started with web services. –Simpler than SOAP –Simpler data structures for transmitting data.

35 XML-RPC Example  Here is a sample XML-RPC request to a weather service: weather.getWeather “Give me the current weather conditions in zip code: ”

36 XML-RPC Example  Here is a sample Weather response: 65 “Current temperature is 65 degrees”

37 Option 2: SOAP  SOAP: used to stand for “Simple Object Access Protocol”  XML-Based protocol for exchanging information between computers.  Currently a formal recommendation of the World Wide Web Consortium (W3C.)

38 SOAP Message Format SOAP Message Envelope (Required) Header (Optional) Body (Required) Fault (Optional: Response only)

39 SOAP 1.1 Example  Here is a sample SOAP request to a weather service: <SOAP-ENV:Envelope xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <ns1:getWeather xmlns:ns1="urn:examples:weatherservice" SOAP-ENV:encodingStyle="

40 SOAP 1.1 Example:  Here is a sample SOAP response: <SOAP-ENV:Envelope xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <ns1:getWeatherResponse xmlns:ns1="urn:examples:weatherservice" SOAP-ENV:encodingStyle=" 65

WSDL & UDDI

42 WSDL  WSDL: Web Service Description Language.  WSDL is an XML grammar for specifying an interface for a web service.  Specifies –location of web service –methods that are available by the web service –data type information for all XML messages  WSDL is commonly used to describe SOAP services.

43 WSDL In a Nutshell : Root WSDL Element : What messages will be transmitted? : What operations (functions) will be supported? : What SOAP specific details are there? : Where is the service located? : What data types will be transmitted?

44 WSDL Excerpt: Weather Service

45 WSDL Excerpt: Weather Service … WSDL File for Weather Service <port binding="tns:Weather_Binding" name="Weather_Port"> <soap:address location="

46 So What?  Given a WSDL file, a developer can immediately figure out how to connect to the web service.  Eases overall integration process.  Better yet, with WSDL tools, you can automate the integration…

47 WSDL Invocation Tools  For example, IBM has a tool called Web Services Invocation Framework (WSIF).  Given a WSDL file, the tool will automatically invoke the service.  A number of other tools from Microsoft, GLUE, and open source projects also do this.

48 WSIF: Example  Invoke WSIF with the Weather WSDL File; specify method name and zip code parameter: java clients.DynamicInvoker sdl getWeather  generates the following output: Reading WSDL document from ' Preparing WSIF dynamic invocation Executing operation getWeather Result: temperature=65 Done!

49 UDDI  UDDI: Universal Description, Discovery and Integration.  Currently represents the discovery layer in the protocol stack.  Originally created by Microsoft, IBM and Ariba.  Technical specification for publishing and finding businesses and web services.

50 UDDI: Two Parts  Part I: Technical specification –specification for building a distributed directory of businesses and services. –XML format for specifying businesses and services. –API for querying/publishing to the registry.  Part II: Implementation –UDDI Business Registry, fully operational implementation of the specification. –Businesses can publish services here. –Businesses can discover services here. –Currently maintained by IBM, Microsoft, etc.

51 UDDI Data  White Pages –Information about a specific company; name description, address, etc.  Yellow Pages –Classification data for company or service. –For example: industry, product or geographic codes.  Green Pages –Technical information about specific services. –Pointers to WSDL Files.

All Together Now!

53 Using the Protocols Together Find Services via UDDI Step 1: Retrieve Service Description File: WSDL or XML-RPC Instructions Step 2: Create XML-RPC or SOAP Client Step 3: Invoke Remote Service Step 4:

Final

55 Final  Final is Cumulative with focus on material after midterm –JSP JDBC & MySQL –XML and DTD –SAX and JODM –Few questions on php  Questions: –True /False 20 questions –10 short questions What is the error What is the output Write a short (few line) code to perform a specific task General questions –Write a program/class JDOM or SAX to process and output xml document JDBC and MySQL