Web Services Kaarthik Sivashanmugam Department of Computer Science The University of Georgia.

30
Web Services Kaarthik Sivashanmugam Department of Computer Science The University of Georgia
  • date post

    18-Dec-2015
  • Category

    Documents

  • view

    215
  • download

    1

Transcript of Web Services Kaarthik Sivashanmugam Department of Computer Science The University of Georgia.

Web Services

Kaarthik SivashanmugamDepartment of Computer ScienceThe University of Georgia

RATS Oct 2002 CS@UGA

PrefaceI assume you all know that this is just an introductory

session to web services you all know XML you will ask questions we all will enjoy this session

RATS Oct 2002 CS@UGA

Purpose of this session Introduction to

web services enabling technologies: SOAP, WSDL, UDDI etc

Understanding need for web services web services jargons

Foresee challenges Discuss my work

RATS Oct 2002 CS@UGA

What are Web Services ? Web services are modular web applications

that provide data and services to other applications over the web

Web services apply web technologies such as HTTP and XML to the concepts of distributed computing technologies such as CORBA and DCOM

RATS Oct 2002 CS@UGA

Present Web: Common man’s comment: It is awesome.

information sharing B2C, B2B search, mail, chat, RPC and what not?

What is missing? automated interactions commonness between different distributed

application technologies

RATS Oct 2002 CS@UGA

Evolution:

Application Application

Application Application

ApplicationApplication

API

API

SOAP LAYER

User Interaction

User Interaction

RATS Oct 2002 CS@UGA

Evolution (contd) Need for betterment

Tomorrow’s Web: automated interactions application level interactions distributed computing platform

Answer: web services

Goals: enable internet scale dynamic binding efficiently support both open web and more constrained

environments universal availability and interoperability

RATS Oct 2002 CS@UGA

Vision: Unified view of applications in heterogeneous

systems on web Seamlessly integrate with existing platforms and

programming models Distributed computing platform for the web Interface to access functionalities offered by

information systems, application programs and business processes

RATS Oct 2002 CS@UGA

Web Service: Definition A Web service is a software application

identified by a URI, whose interfaces and binding** are capable of being defined, described and discovered by XML artifacts and supports direct interactions with other software applications using XML based messages via Internet-based protocols. (W3C definition)

**- An association between an Interface, a concrete protocol and a data format

RATS Oct 2002 CS@UGA

Web Service: Definition (contd) Web services are self contained, self-

describing, modular applications that can be published, located, and invoked across the Web. (Tidwell, IBM, 2001)

Web service applications are encapsulated, loosely coupled Web “components” that can bind dynamically to each other. (Curbera, IBM, 2001)

RATS Oct 2002 CS@UGA

Web Services: Features Service Oriented Architecture (SOA) as opposed to

application based (client-server, monolithic) architectures

Web is a collection of services

Service Registry

Service Provider

ServiceRequestor

Publish Find

Bind

RATS Oct 2002 CS@UGA

Features(contd) Create loosely coupled applications

changing implementation of a function does not require change in invoking function

Create encapsulated applications implementation is hidden from outside

Allows integration of applications with deep interaction applications are unaware of APIs

RATS Oct 2002 CS@UGA

Features(contd) Allow reuse of Software Components

reusable code that need not be written saving time, money and reducing risk

Address Middleware issues over web without much complexity FYI: Middleware is a high level software layer that provides a

standardized interface to collection of distributed objects FYI: What’s wrong with CORBA/RMI/COM ?

don’t talk to each other (some implementations do) tightly coupled with application different data representation, vendors and dialects RMI: Java-to-Java only technology CORBA: uses proprietary IIOP (typically blocked by Firewall) and

interoperability of ORB implementations is not guaranteed COM/DCOM: Microsoft only solution

RATS Oct 2002 CS@UGA

Features(contd) Based on messages, documents and not APIs

shift in focus from ‘how to invocate’ to ‘what to invocate’

Can be complementary to CORBA, RMI, COM components are treated as services using WSDL*1 as extended IDL*2

Common registry cross vendor, platform, industry widely accepted*1 Web Services Description Language *2 Interface Description Language

RATS Oct 2002 CS@UGA

Features(contd) Operating system agnostic

because it is XML (simple structured text) based technology

Consistent architecture both inside and outside an enterprise application producer/consumer in different hardware regardless of development environment

Allows composition combining and linking existing web services to

create new web processes to perform a complex task

RATS Oct 2002 CS@UGA

How Web Services work? Web services are standards-based software

components that can be accessed over the Internet.Step 1: Service providers (producer) maintain/publish

information about their services in a registryStep 2: Service requesters (consumer) search registries

for servicesStep 3: Once found, a service can be invoked based on

open Internet standards irrespective of differences in platforms, programming model, programming languages between consumer and producer

RATS Oct 2002 CS@UGA

Web Services Standards With the following technologies, it is possible to build standards-based

systems that are truly interoperable. UDDI: Universal Description, Discovery and Integration.

UDDI registry stores descriptions about companies and the services they offer in a common XML format. (for web services publishing and discovery)

WSDL: Web Services Description Language (new: DAML-S) WSDL is an XML-based format for specifying the interface to a web

service. (for web services description) SOAP: Simple Object Access Protocol

SOAP is the XML-based protocol for sending requests and responses to and from web services. (for web services invocation)

WSFL: Web Services Flow Language (new: BPEL4WS) for web services composition

RATS Oct 2002 CS@UGA

courtesy:http://www.cs.uga.edu/~sent/thesis/Final.ppt

Simple Web Service Invocation

RemoteWeb ServiceRepository(Web Sites)

WriteClient Code

Service Requestor

Invoke Web Service

Manual Web Service

Lookup

SOAP Request

SOAP Response

WSDL File

Remote Web service

Publish Web Service

1

2

3

4

5

HTTP GET

RATS Oct 2002 CS@UGA

Behind the scene

Components required software which needs to be exposed as a web service SOAP Server (Apache Axis, SOAP::Lite, etc.) HTTP Server (if HTTP is used as the transport level protocol) SOAP Client (Apache Axis, SOAP::Lite etc.)

Deployment: registering with SOAP server with details about the code to execute when requested Invocation: requesting for some service. Could be done with any SOAP client.

courtesy:http://www.cs.uga.edu/~sent/thesis/Final.ppt

(http transport)Requestor

SOAP Messages

Web Service ProviderEndpoint

SOAP Client

RATS Oct 2002 CS@UGA

WSDL* Structure Service

collection of endpoints endpoints= port + binding

Port typeset of operations supported by endpoints

Operationsabstract description of action supported by service

Bindingmaps abstract specification to specific protocol

Portsnetwork address/URI that implements service

Messagetyped definition of data communicated

* Used in conjunction with UDDI registry and can be compared with IDLcourtesy: http://www.llnl.gov/CASC/workshops/components_2001/viewgraphs/FranciscoCurbera.ppt

Service

Port(e.g. http://host/svc)

Binding(e.g. SOAP)

Abstract interface

portType

operation(s)

inMesage outMessage

Port

Binding

RATS Oct 2002 CS@UGA

WSDL File

ConcreteDescription

Provides explicit representation of available protocols while in OMG model, protocol is fixed at the time ORB infrastructure is deployed. Protocol specification is not visible to application or developer

AbstractDescription

RATS Oct 2002 CS@UGA

SOAP: Simple Object Access Protocol XML based lightweight protocol for the exchange of information in a

decentralized, distributed environment

What's so special about SOAP ? platform independent gets over firewall issues

Why do we need it ? today's applications communicate using RPC using HTTP. But

HTTP is not designed for this. introduces security and compatibility issues firewalls typically block

How ? XML based messages (simple text and nothing else)

RATS Oct 2002 CS@UGA

SOAP: SOAP defines a framework for message structure and a message-processing

model Does not define application semantics Enables trans-operating system RPCs Used over HTTP, SMTP, FTP, MQSeries, Jabber, JMS etc

<?xml version="1.0" encoding="UTF-8" ?> <env:Envelope xmlns:env="http://www.w3.org/2001/09/soap-envelope"> <env:Header>

<n:alertcontrol xmlns:n="http://example.org/alertcontrol"> <n:priority>1</n:priority> <n:expires>2001-06-22T14:00:00-05:00</n:expires> </n:alertcontrol>

</env:Header> <env:Body>

<m:alert xmlns:m="http://example.org/alert"> <m:msg>Pick up Mary at school at 2pm</m:msg>

</m:alert> </env:Body></env:Envelope>

courtesy: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsoapspec/html/soapspecindex.asp

RATS Oct 2002 CS@UGA

UDDI A shared public registry implementation based on a set

of public specifications Specification for registry also defines a SOAP-based

web service for locating WSDL-formatted protocol descriptions of web services

Two types of information are registered within UDDI. The first is the set of abstract service protocols, called tModels (technical models), which are used to describe the behavior of a web service. The second type of information in UDDI is the service implementation, currently referred to as a businessEntity. These entries refer to multiple tModels and provide descriptions about their behavior and specifications.

RATS Oct 2002 CS@UGA

Web Services Composition Task of combining and linking existing web services to create new

web processes. WHY ? (e.g.. Conference booking scenario)

Adds value to the collection of services, by orchestrating them according to the requirement of the problem

Types of Composition Static Composition - services to be composed are decided at design time Dynamic Composition - services to be composed are decided at run-time

WSFL, XLANG, BPEL4WS, DAML-S are some of the XML languages that have been proposed for specifying a web service composition

RATS Oct 2002 CS@UGA

Challenges and my ongoing work in Web Services Semantics based discovery of web services

WSDL, UDDI do not support description and publishing services based on capabilities

present discovery is based on key word search (e.g.. “Ticket Service”). Not efficient.

solution: Ontology based description and discovery of web services

achieves semantic mark up to web services and provides semantic interoperability

Dynamic composition QoS, service agreements, security Harmonizing transactional behavior, reliably executing and

monitoring messages

RATS Oct 2002 CS@UGA

Summary Web Services

framework is being defined, standardized standards are still in flux received wide acceptance in industry as an e-business

(r)evolution

provides increased flexibility in software deployment offers a cost effective way to maintain and integrate legacy IT

systems at a lower cost than typical enterprise application integration efforts

could be next-generation EDI could be used as middleware for internet level applications

RATS Oct 2002 CS@UGA

Wrap upHopefully you understood in this session:

1. what a web service is2. advantages of using it3. value addition by composition4. what has been done so far in web services?5. what can be done in future w.r.t. WS?

RATS Oct 2002 CS@UGA

Questionsand hopefully answers mailto:[email protected] http://www.arches.uga.edu/~kaarthik

RATS Oct 2002 CS@UGA

For more information: http://www.uddi.org http://www.w3.org/2002/ws/ http://java.sun.com/webservices/docs/1.0/tutorial/ http://www.alphaworks.ibm.com/webservices http://edocs.bea.com/wls/docs70/webserv/index.html http://xml.apache.org/ http://www.xml.com/pub/a/2001/04/04/webservices/ http://www-3.ibm.com/software/solutions/webservices/ http://www.w3c.org/TR/wsdl http://www.w3c.org/TR/soap http://chief.cs.uga.edu/~jam/webwork/geneflow/papers/wspapers.html