xml web services architecture siddharth ruchandani cs 6362 – sw architecture & design summer...

30
XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Upload: peter-warner

Post on 02-Jan-2016

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

XML Web Services Architecture

Siddharth RuchandaniCS 6362 – SW Architecture & DesignSummer 200507/11/05

Page 2: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Current Business Situation Systems “built to task,

built to last” work well independently

Accomplish what they were designed for

But what if these systems want to connect together?

Page 3: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

The Problem

Most systems aren’t designed to work with each other

Connecting the Accounting with Sales system is expensive, time-consuming, and unreliable

Page 4: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

The Solution

A standard way for systems to communicate with each other

Page 5: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

The Solution

A standard way for systems to communicate with each other

XML Web Services No need to re-

design existing components

Page 6: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

The Solution

A standard way for systems to communicate with each other

XML Web Services No need to re-design

existing components Not only connect

systems, connect people

Page 7: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Web Services

Provide a way for systems to interoperate across different platforms & operating systems

Structured way to format data, describe service capability and availability

Page 8: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Web Service Principles

Message Orientation – Web services communicate using messages Protocol Composability – Web services avoid monolithic design by

the use of modular building blocks that can be re-used Autonomous Services – Can be designed, implemented, managed,

versioned, and deployed independently Managed transparency – can manage which functionalities we want

to make available to the end-service and which to hide Protocol-based integration – can be implemented using simple

protocols

Page 9: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Web Services Architecture

HTTP – Hyper Text Transfer Protocol

XML – Extensible Markup Language

SOAP – Simple Object Access Protocol

WSDL – Web Service Description Language

UDDI – Universal Description, Discovery & Integration

Web Service layers

Transport (HTTP)

Encoding (XML)

Standard structure (SOAP)

Description (WSDL)

Discovery (UDDI)

Page 10: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

XML – eXtensible Markup Language

Unit of Information transfer

Simple, text-based Message – an XML

document information item as defined by the XML Infoset

Infoset – Abstract data model, foundation of XML Specifications (XML Schema, XML Query, XSLT)

Page 11: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

XML – eXtensible Markup Language

<m:GetContactInfo xmlns:m="http://example.org/CompanyInfo"> <ContactName>Sidd R.</ContactName> <CompanyName>SARK</CompanyName> <StreetName>W. Las Colinas</StreetName>

</m:GetContactInfo>

Page 12: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

XSD

XML Schema Definition Schema - an abstract representation of an object's characteristics

and relationship to other objects XML schema represents the interrelationship between the attributes

and elements of an XML object (for example, a document or a portion of a document)

Provides a universal type system, allowing data types to be defined and passed across platforms.

For an XML Web service, XSD defines the structure and data types for the XML encapsulated within a SOAP message sent to and from an XML Web service.

For example, within a schema for a document describing a Web site, you would define a Web site element, a Web page element, and other elements that describe possible content divisions within any page on that site.

Page 13: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

SOAP SOAP(Simple Object Access

Protocol) is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment.

SOAP uses XML technologies to define an extensible messaging framework, which provides a message construct that can be exchanged over a variety of underlying protocols.

The framework has been designed to be independent of any particular programming model and other implementation specific semantics.

SOAP 1.2 Specification definition XML document containing 3

elements: <Envelope>, <Header>, <Body>

Page 14: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

SOAP SOAP Over HTTP

Page 15: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

SOAP Processing Model

Identify the header block intended for the current SOAP node If header block cannot be processed, message is discarded and

fault message generated Process message If current node not the ultimate receiver, then message is relayed to

the next SOAP node

Page 16: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

WSDL

Web Service Definition Language

Describes What a request message

must contain What the response

message might look like Where the service is

available What protocol required to

talk to the service

Page 17: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

WSDL

WSDL documents can maintain information like method signatures, data returned, etc. about a web service

Applications can maintain a pointer to the required web service’s WSDL docs

Applications can then call the various methods of the web service

Page 18: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

WSDL (Example)

Page 19: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

WSDL (Example)

http://www.xmethods.com/ve2/ViewListing.po;(QHyMHiRM)?key=uuid:D784C184-99B2-DA25-ED45-3665D11A12E5

Page 20: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

UDDI

Universal Description Discovery & Integration

Analogous to a phonebook

Specifies protocol for querying a directory of web services

Page 21: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

UDDI

A UDDI director entry has 3 primary parts Service provider – to

contact someone responsible for the service

Web services offered – organized by application area, geography, etc.

Bindings to implementation – associates web service entry to the exact URI, protocol to use for access

Page 22: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

XML Web Service Lifetime

The client creates a new instance of an XML Web service proxy class. This object resides on the same computer as the client.

The client invokes a method on the proxy class. The infrastructure on the client computer serializes the arguments

of the XML Web service method into a SOAP message and sends it over the network to the XML Web service.

Page 23: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

XML Web Service Lifetime (contd.)

The infrastructure receives the SOAP message and deserializes the XML. It creates an instance of the class implementing the XML Web service and invokes the XML Web service method, passing in the deserialized XML as arguments.

The XML Web service method executes its code, eventually setting the return value and any out parameters.

The infrastructure on the Web server serializes the return value and out parameters into a SOAP message and sends it over the network back to the client.

The XML Web service infrastructure, on the client computer, receives the SOAP message, deserializes the XML into the return value and any out parameters, and passes them to the instance of the proxy class.

The client receives the return value and any out parameters.

Page 24: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Other Features

Security - Organizations building and managing secure XML Web services need to ensure that only authorized parties are allowed to use the XML Web services and that the SOAP messages sent and received by the XML Web services can only be modified or viewed by appropriate parties.

WS-Security is a simple, stateless, SOAP specification that describes how digital credentials should be placed within SOAP messages, and how these credentials should be associated with a message to ensure message integrity and confidentiality.

Page 25: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Other Features

Reliable Messaging WS-ReliableMessaging

Specification The specification defines three

different assurances that may be used in combination: At-Least-Once Delivery:

Each message is delivered at least one time.

At-Most-Once Delivery: Duplicate messages will not be delivered.

In-Order Delivery: Messages are delivered in the same order they were sent.

Page 26: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Case Studies

OSS (Operations Support System)

Localization Manager

Currency Exchange

Web Service

GetRate()

SendRate()

Page 27: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Case Studies

SDMS SPARTA OTHER

SCAUTHENTICATION SERVICE

Web Service to authenticate

applications against Active Directory (AD)

Page 28: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Case Studies

SDMS SPARTA OTHER

STORE LOCATOR WEB SERVICE

Web Service to locate stores by

Store number, division,

market, or geographical location

Page 29: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

Conclusion Web Services

Loosely coupled Ubiquitous Communication Universal Data Format

Discussed Important components of Web Services Architecture

XML XSD SOAP WSDL UDDI

Secure, Reliable Messaging Application Integration Platform independence Transport independence

Page 30: XML Web Services Architecture Siddharth Ruchandani CS 6362 – SW Architecture & Design Summer 2005 07/11/05

References

http://msdn.microsoft.com/webservices http://www.gotdotnet.com/team/XMLwebs

ervices/ http://searchwebservices.techtarget.com