webservice

19
WebService

Upload: powa

Post on 05-Jan-2016

22 views

Category:

Documents


2 download

DESCRIPTION

WebService. Outline. Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry). What are Web Services ?. Web services are modular web applications that provide data and services to other applications over the web - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: WebService

WebService

Page 2: WebService

Outline

• Overview of Web Services• SOAP (messaging)• WSDL (service description)• UDDI (registry)

Page 3: WebService

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

Page 4: WebService

• A Web Service is a URL-addressable software resource that performs functions (or a function).

• "Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes. … Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service.” IBM web service tutorial

Web Services: Some Definitions

Page 5: WebService

Web Service Architecture

Service provider

Service broker Service requestor

publish(WSDL)

find(UDDI)

bind(SOAP)

"server"

"client""naming service"

Page 6: WebService

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

Page 7: WebService

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)

Page 8: WebService

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 ServiceLookup

SOAP Request

SOAP Response

WSDL File

Remote Web service

Publish Web Service

1

2

3

4

5

HTTP GET

Page 9: WebService

Web Services Implementation

• Application Server (web service-enabled)– provides implementation of services and exposes it through WSDL/SOAP– implementation in Java, as EJB, as .NET (C#) etc.

• SOAP server– implements the SOAP protocol

• HTTP server– standard Web server

• SOAP client– implements the SOAP protocol on the client site

Requestor(SOAP client)

Web Service Provider(endpoint)

HTTP server

SOAP server

application server

SOAP messages

(http transport)

Page 10: WebService

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

Page 11: WebService

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

Page 12: WebService

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)

Page 13: WebService

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

Page 14: WebService

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.

Page 15: WebService

Contoh

Page 16: WebService

WSDL

• Ditunjukkan di gambar di bawah ini• Coba amati dengan klas Java sebelumnya

Page 17: WebService

WSDL

Page 18: WebService

SOAP

• Ditunjukakn dalam gambar di bawah ini• Coba amati dengan meninjau file WSDL di

slide sebelumnya

Page 19: WebService