30
1 Web Services Distributed Systems

1 Web Services Distributed Systems. 2 Service Oriented Architecture Service-Oriented Architecture (SOA) expresses a software architectural concept that

Embed Size (px)

Citation preview

1

Web Services

Distributed Systems

2

Service Oriented Architecture

• Service-Oriented Architecture (SOA) expresses a software architectural concept that defines the use of services to support the requirements of software users

3

Service Oriented Architecture

ServiceRequestor

ServiceProvider

ServiceBroker

LegacySystem

Internet

4

Requirements for a SOA

• Interoperability between different systems and programming languages

• Clear and unambiguous description language

• Retrieval of the service

• Security

5

Web Services: DefinitionW3C

• A Web service is a software system – Identified by a URL, whose public interfaces and bindings are

defined and described using XML.

• Its definition can be discovered by other software systems

• These systems may then interact with the Web service – using XML based messages conveyed by Internet protocols

• Web Services implement a Service Oriented Architecture

6

Web Services

• Web services are an emerging technology that offer a solution for providing a common collaborative architecture.

• Web services provide functional building blocks which are not tied to any particular programming language or hardware platform.

• They are accessible over standard Internet protocols.

7

The Evolution

• Online systems replace Batch systems• Graphical User Interfaces replace “green”

screens• Networked systems replace standalone systems• Internet based systems replace LAN based

systems• Future ???

– Web Services replace simple Internet and LAN based systems

8

Technologies• XML (eXtensible Markup Language)

– markup language that underlies most of the specifications used for Web services.  

• SOAP (Simple Object Access Protocol)– (Simple Object Access Protocol), similar to JDBC, is a network,

transport, and programming language and platform neutral protocol that allows a client to call a remote service. The message format is XML.

• WSDL (Web services description language)– An XML-based interface and implementation description language. The

service provider uses a WSDL document in order to specify the operations a Web service provides. 

• UDDI (universal description, discovery, and integration) – Both a client-side API and a SOAP-based server implementation that

can be used to store and retrieve information on service providers and Web services.

9

How it works

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

• Web Services communicate using standard protocol known as SOAP (Simple Object Access Protocol).

• A Web Service is located by its listing in a Universal Discovery, Description and Integration (UDDI) directory.

10

Technologies

11

Integration

• In a lot of organizations, the data and logic of one application are basically useless to other applications. – When an application and its data are isolated

from other applications, we often say that they are in “silos.”

• Web Services are better at sharing data and functions. – The result is that the “silos” come down, and

previously isolated systems can talk to each other.

What are Web Services good for?

12

Access

• Web Services are especially good at providing access through different interfaces.

• A Web Service can have a dedicated client application, but it can also be readily accessed through browsers, wireless devices, voice-activated interfaces, and so on.

• Adding new access methods is much simpler than with a traditional application.

What are they good for?

13

Flexibility

• One of the more important innovations in Web Services is “machine-to-machine communications.”

• This means that a Web Service can ask another Web Service to do something, and that Web Service can ask another Web Service to do something, and so on.

• In the future, many Web Services will really just be aggregations of other Web Services.

What are they good for?

14

Application Assembly

• Future applications will be assembled from a diverse group of web services, aggregating functionality.

• Reusability is extended to the execution level, versus reusability from just the design and construction level.

What are they good for?

15

SOAP

• Simple Object Access Protocol

• SOAP is an open protocol specification defining a uniform way of performing RPCs using HTTP as the underlying communications protocol with XML for the data serialization.

16

How Is a Service Described?

• WSDL (“Web Service Description Language”)– XML-based– Submitted to W3C for standardization

• Terraserver example– http:terraserver.microsoft.com/default.aspx

17

How Do I Find Web Services?

• UDDI project by Microsoft, IBM, and others. Take a look at //uddi.org

• Websites– //www.xmethods.net– //www.salcentral.com

18

XMethods

19

Currency Exchange

20

Using the Currency Exchange Web Service

RV Application

CurrencyExchangeWS

Internet

21

WebSphere Studio Wizards

• Wizards make it easy for you to create and use Web Services– Wizard to create a Web Service from a JavaBean

• Generates WSDL document

• Creates all required software components

• Create a Test client

– Wizard to create a Web Service Client• Use the WSDL document as input

22

Generate a Web Service Client

23

Web Service Client

24

Web Service Client

25

Testing

Input.jsp

Result.jsp

Method.jsp

26

conversion.html

27

conversion.html

<IFRAME src="Input.jsp?method=getRate"name="inputs"

scrolling="no" frameborder="0" height="250"></IFRAME>

<IFRAME src="Result.jsp" name="result" scrolling="no"

frameborder="0"></IFRAME>

28

conversion.html

29

Currency conversion

30

Lab Exercises

• Create Web Services client

• Integrate Web Service into the RV application