Web Services Introduction

Slides:



Advertisements
Similar presentations
Web Service Architecture
Advertisements

An Introduction to Web Services Sriram Krishnan, Ph.D.
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
SOAP & Security IEEE Computer Society Utah Chapter Hilarie Orman - Purple Streak Development Tolga Acar - Novell, Inc. October 24, 2002.
SOAP.
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.
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)
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
2a.1 Brief outline of mark-up languages and XML ITCS 4146/5146 Grid Computing, UNC Charlotte, B. Wilkinson, 2007 Jan 22, 2007.
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 Michael Smith Alex Feldman. What is a Web Service? A Web service is a message-oriented software system designed to support inter-operable.
Processing of structured documents Spring 2003, Part 6 Helena Ahonen-Myka.
Service-Oriented Programming
Introduction SOAP History Technical Architecture SOAP in Industry Summary References.
Web Services (tying it all together) and Introduction to Grid Services Concepts These slides are adapted from course material developed by Barry Wilkinson,
Chapter 9 Web Services Architecture and XML. Objectives By study in the chapter, you will be able to: Describe what is the goal of the Web services architecture.
6-1.1 Grid Computing Software Infrastructure I: Web services Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC.
Grid Computing, B. Wilkinson, 20043b.1 Web Services Part II.
C.1 Review of the XML Mark-Up Language © 2010 B. Wilkinson/Clayton Ferner. Spring 2010 Grid computing course. slidesC-1.ppt Modification date: Feb 26,
1 Core Web Services Standards. 2 (Simplified) Web Service Architecture Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request.
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.
Web Services Description Language (WSDL) Jason Glenn CDA 5937 Process Coordination in Service and Computational Grids September 30, 2002.
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 based e-Commerce System Sandy Liu Jodrey School of Computer Science Acadia University July, 2002.
C.1 Review of the XML Mark-up Language Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © Appendix.
XML – An Introduction Structured Data Mark-up James McCartney CSCE 590, Cluster and Grid Computing.
Web Services Standards. Introduction A web service is a type of component that is available on the web and can be incorporated in applications or used.
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer /11/05.
Web Services. Abstract  Web Services is a technology applicable for computationally distributed problems, including access to large databases What other.
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.
Grid Services I - Concepts
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
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.
Introduction to Web Services Presented by Sarath Chandra Dorbala.
Lecture VI: SOAP-based Web Service CS 4593 Cloud-Oriented Big Data and Software Engineering.
SOAP, Web Service, WSDL Week 14 Web site:
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 9 Web Services: JAX-RPC,
Java Web Services Orca Knowledge Center – Web Service key concepts.
From last time Grid computing concept started in mid-90’s
Introduction to Web Services
The Object-Oriented Thought Process Chapter 13
Sabri Kızanlık Ural Emekçi
WEB SERVICES From Chapter 19 of Distributed Systems Concepts and Design,4th Edition, By G. Coulouris, J. Dollimore and T. Kindberg Published by Addison.
A Web Services Journey on the .NET Bus
WEB SERVICES.
Some Basics of Globus Web Services
Overview of Web Services
Web Server Administration
Inventory of Distributed Computing Concepts and Web services
Chapter 9 Web Services: JAX-RPC, WSDL, XML Schema, and SOAP
Web services, WSDL, SOAP and UDDI
WEB SERVICES DAVIDE ZERBINO.
WEB SERVICES From Chapter 19, Distributed Systems
Distributed System using Web Services
Presentation transcript:

Web Services Introduction ITCS 4010 Grid Computing, 2005, UNC-Charlotte, B. Wilkinson, slides 3a version 0.1.

Distributed Computing Concepts Web services build upon earlier distributed computing concepts One of the underlying concepts is the client-server model.

Client-server model Server Client Request service Database Server response

Remote Procedure Call Early distributed computing system introduced in the 1980’s. Allows a local program to execute a procedure on a remote computer and get back results from the procedure. Basis of certain remote operations such as mounting remote files in a shared file system.

Fundamental factors of RPC We need to know how and where to make the call. The basic RPC requires the calling program to know details about how to make the call (meaning and types augments and return value) The calling program also needs to know where to send the request.

Service registry RPC introduced the concept a service registry a third party used to identify location of “service” (procedure). Using a service registry is now part of what is now called a Service-Oriented Architecture.

Service-Oriented Architecture. Service registry Find Publish Bind Client Server (Service requester) (Service provider)

Later systems Examples Later forms of remote procedure calls in 1990’s introduced distributed objects: Examples CORBA (Common Request Broker Architecture) Java RMI (Remote Method Invocation)

Some aspects for a new system Universally agreed standardized interfaces Inter-operability The need to provide flexibility Using the Internet as the network communication (Internet standards)

Web Services Introduced in the 2000. Software components designed to provide specific operations (“services”) accessible using standard Internet technologies and standardized protocols. The specific standards and protocols will be described shortly. For machine interaction over a network.

Stateless Web Service It is generally thought that web services should be stateless – they do not remember or store information themselves from one invocation to the next. Any state information needed by the web service to complete a client request or maintained should be held separately.

First attempt as a stateful service A now defunct attempt at providing a stateful service was embodied in the OGSI standard which was part of the OGSA grid computing standard Introduced in 2002(?) Abandoned in 2004 Will look at this way briefly later.

Web Service with state Example Web services can be front-ends to stateful resources. Example Business application might access an inventory of items being held through a web service. Web service Database request data request data return data

Stateless web service + stateful resource Concept formalized in a standard called WS-RF framework. WS-RF also at the center of recent grid computing software (Globus 4.0). Provides a way of identifying resource through the web service, and other things such as resource lifetime

Web Service addressing Usually located by a URI. Example http://www.cs.uncc.edu:8080/axis/MyMath This URL is only supposed to be accessed by a computer program.

Web service could be located on a computer anywhere on the Internet. Application Web Services User might interact with an application that accesses the web service to perform a function.

Note The term “Web Service” is a little misleading as the web service need not be on the web. It could be on the same computer as the client, or another computer in a local cluster.

WS-Addressing WS-Resource Framework introduced a standard for addressing WS-Resources, called WS-Addressing Introduces an End-Point Reference (EPR) to point to the service, which will provide the URL and possibly additional information about the service.

Service-Oriented Architecture Client needs to: Identify location of the required service Know how to communicate with the service to get it to provide the actions required. Uses service registry - a third party.

Service-Oriented Architecture Service registry 1. Publish 2. Find 3. Bind Service requester Service provider

Service-Oriented Architecture Steps: Services “published” in a Service registry. Service requestor asks Service Registry to locate service. Service requestor “binds” with service provider to invoke service.

Key aspects Has similarities with RMI and other distributed object technologies (CORBA etc.) but: Web Services are platform independent They use XML within a SOAP message). Most use HTTP to transmit message.

XML-based Web Services XML provides a flexible basis for storing and retrieving service information on web services.

Structure of an XML document Optional Prolog Root Element

Uses symbol sequence: <? … ?> Prolog Includes: Processing instruction to specify how to process document.. Uses symbol sequence: <? … ?> Meta-information about document, and comments.

<!-- this is a comment --> One PI identifies document as a XML document, e.g. <?xml version=“1.0” encoding=“UTF-8”?> Comments, same form as HTML: <!-- this is a comment -->

Root element Root element contains contents of document. Other elements are within root element and can be nested.

XML Tags Not predefined as in HTML. Must define your own tags using names as names in a programming languages As in programming languages, restrictions. Case sensitive. Start with a letter. “Elements” have start and end tags. Start tags can have attributes as in HTML.

Namespace Mechanism If XML documents combined, can be problem if different documents use the same tag names to mean different things. With namespace mechanism, tags given additional namespace identifier to qualify it.

namespace identifier + local name Qualifying names Qualified name given by namespace identifier and name used in document: Qualified name = namespace identifier + local name

Namespace identifier Uses URI’s (Uniform Resource Identifiers) - web naming mechanism. URLs are a subset of URI, and would typically be used, e.g.: http://www.cs.wcu.edu/~abw/ns

Associating namespace identifier with local name Names in document given a prefix, i.e.: <mypo:street> Namespace identifier associated with prefix in root element:: xmlns:mypo=“http://www.cs.uncc.edu/~abw/ns”

Namespace Example prefix <mypo:po xmlns:mypo=“http://www.cs.uncc.edu/~abw/ns”> <mypo:description> Computer, Pentium IV, 4.7 Ghz, 4 Gbytes main memory </mypo:description> </mypo:po>

Can apply namespace to every tag without a prefix automatically if that is required: <mypo:po xmlns=“http://www.cs.uncc.edu/~abw/ns”> <description> Computer, Pentium IV, 4.7 Ghz, 4 Gbytes main memory </description> </mypo:po>

Defining Legal XML Tags Legal tags in a document defined optionally using either: Document type definitions (DTD) within document using <!DOCTYPE …. > (old, not allowed with SOAP) or XML schema

XML Schema Flexible way of handing legal element names. Expressed in XML. Schema is an XML document with required definitions. Handles namespaces. Has notation of data types

The name space given by the xmlns tag becomes the default namespace unless overridden by a prefix.

XML Schema Structure Example <?xml version=“1.0” encoding=“UTF-8”?> <myRootElement xmlns=http://www.cs.uncc.edu/namespaces/myName/ myMathService> … <operation> </operation> </myRootElement> Here all tags without prefixes have the namespace given

XML Schema Structure Example <?xml version=“1.0” encoding=“UTF-8”?> <myRootElement xmlns:math=http://www.cs.uncc.edu/namespaces/myName/ myMathService> … <math:operation> </math:operation> </myRootElement> Here the tag operation is qualified with the prefix math that identifies the namespace

Schema One could arrange that all those processing the document are preconfigured to use a specific schema or, better The scheme could be specified in the document

Associating a Schema with an instance of an XML document XML schema Document xlns:xsi=“http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=“ .. “

Schema validation The schema approach allows documents that are supposed to conform to XML syntax and a specific schema to be checked against the scheme, prior to processing. Formally two aspects Well-formedness – document conforms to rules of XML syntax. Validity – checks the structure and identity of elements etc. that the document should have from that schema.

XML “scheme definition languages” (XSD) Each XML document conforms to its own schema that defines the tags. This gives an infinite number of XML “languages.” Many XML languages invented for specific purpose. All one needs is the language schema to use it.

Web Service Description Need a way of formally describing a service, what is does, how it is accessed, etc. An Interface Description language (IDL)

Web Service Definition Language (WSDL) A W3C standard XML document that describes three fundamental properties of a service: What it is - operations (methods) it provides. How it is accessed - data format, protocols. Where it is located - protocol specific network address.

Parts of a web services WSDL document Root definitions and namespaces Abstract definition of service Message definitions Binding definitions to network protocols (parameters in method signature) Service definitions (where service is, ports) Type definitions - data types

From http://www.globus.org Web Services 1 3 2 4 5 6 From http://www.globus.org

UDDI Registries Web service registries can be based upon UDDI registries (Universal Description Discovery, and Integration), introduced in 2001. UDDI specification standardized by OASIS (Organization for the Advancement of Structured Information Standards) See: http://www.oasis-open.org

Notes The UDDI registry is a web service itself. The (UDDI) registry itself has to be known to both the client and service. Registry technically unnecessary if the client already knows about the service, but usually some form of service registration and locator is present.

Steps to access a web service in a Service-Oriented Architecture Client (Service requester) Server (Service provider) UDDI Service registry Publish Find WSDL Service definition UDDI Service definition Location of service Give me your WSDL WSDL Request service operation Result

Question Could the WDSL document be provided by the registry, and if so, is that better? Answer

Message exchanges Done with specific protocols.

Web Service Protocols Usually using a HTTP transport protocol which carries SOAP (Simple Object Access Protocol) messages holding XML documents. SOAP message HTTP envelop XML document

Web Services “Stack” HTTP transport SOAP message carrying XML documents WSDL (Web Services Description Language used to describe message syntax for invoking a service and its response. UDDI (Universal Description, Discovery and Integration) used as web service discovery mechanism.

Web Services Stack Activity Protocol/language UDDI WSDL SOAP + XML Service discovery UDDI WSDL Service description Service invocation SOAP + XML Service message transport HTTP

Simple Object Access Protocol (SOAP) A communication protocol for passing XML documents.

W3C specification describes SOAP as: “SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses.”

Simple Object Access Protocol (SOAP) Provides mechanisms for: Defining communication unit - a SOAP message Error handling Extensions Data representation Remote Procedure Calls (RPC’s) Document-centric approach for business transactions Binding to HTTP

SOAP Envelope namespace <SOAP-ENV:Envelope xmlns=“http://schemas.xmlsoap.org/soap/envelope/”> <SOAP-ENV:header> . </SOAP-ENV:Header> <SOAP-ENV:Body> </SOAP-ENV:Body> </SOAP-ENV:Envelope> namespace

What goes down the Wire HTTP packet containing: Stuff about context, transactions, routing, reliability, security SOAP message Attachments XML/SOAP standardization body, World Wide Web Consortium (W3C) covers SOAP and attachments.

by S. Graham et al, SAMS publishing, 2004 Books Several books on XML, e.g.: “Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, 2nd edition” by S. Graham et al, SAMS publishing, 2004 Very good but 792 pages!!

Additional SOAP materials See: http://www.w3c.org/TR/soap

Additional XML materials On-line materials W3C consortium home page: http://www.w3.org/XML/ W3Schools XML Tutorial : http://www.w3schools.com/xml/

Quiz What is SOAP? (a) Something you use to clean yourself (b) A protocol for passing XML documents (c) A protocol for passing object-oriented programs (d) None of the other answers

What is an XML schema? (a) A way to make XML documents secure (b) A way of defining XML tags (c) A way of encoding data for transmission (d) None of the other answers

What can UDDI be used for? (a) To transmit data between computers (b) As a universal data description interface (c) As a web services registry (d) To encode the characters of the world

What is a WSDL document? (a) One that describes how to access a service and use it (b) One that describes the data of a service (c) One that describes how to use the client code (d) None of the other answers