Web Services Core Technologies

Slides:



Advertisements
Similar presentations
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Advertisements

Chapter 2: Basic Standards for Web Services Service-Oriented Computing: Semantics, Processes, Agents – Munindar P. Singh and Michael N. Huhns, Wiley, 2005.
Web Service Architecture
Web Services Using SOAP, WSDL, and UDDI
Siebel Web Services Siebel Web Services March, From
Service Description: WSDL COMP6017 Topics on Web Services Dr Nicholas Gibbins –
CSE 6331 © Leonidas Fegaras Web Services1 Web Services (adapted from Erdogan Dogdu's presentation) Leonidas Fegaras.
31242/32549 Advanced Internet Programming Advanced Java Programming
Presentation 7 part 2: SOAP & WSDL.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
General introduction to Web services and an implementation example
SOAP Overview Simple Object Access Protocol CSCI Topics in Software Engineering Web Infrastructure, Services, and Applications
1 Understanding Web Services Presented By: Woodas Lai.
Lecture 10: Web Services. Outline Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry)
XML in the real world (2) SOAP. What is SOAP? ► SOAP stands for Simple Object Access Protocol ► SOAP is a communication protocol ► SOAP is for communication.
SOAP SOAP is a protocol for accessing a Web Service. SOAP stands for Simple Object Access Protocol * SOAP is a communication protocol * SOAP is for communication.
Topics Acronyms in Action SOAP 6 November 2008 CIS 340.
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.
SOAP, WSDL & introduction to UDDI
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
Latest techniques and Applications in Interprocess Communication and Coordination Xiaoou Zhang.
XML Technologies and Applications Rajshekhar Sunderraman Department of Computer Science Georgia State University Atlanta, GA 30302
Slide 1 EE557: Server-Side Development Lecturer: David Molloy Room: XG19 Mondays 10am-1pm Notes:
Grid Computing, B. Wilkinson, 20043a.1 WEB SERVICES Introduction.
Livermore July Web Services Overview Francisco Curbera IBM T.J. Watson Research Center.
Web Services CS Web Services Internet-available services using XML messaging, for computer-computer interaction Not tied to any OS or language Self-describing:
WSDL Web Services Description Language Neet Wadhwani University of Colorado 3 rd October, 2001.
Web Service What exactly are Web Services? To put it quite simply, they are yet another distributed computing technology (like CORBA, RMI, EJB, etc.).
CS 415 N-Tier Application Development By Umair Ashraf July 6,2013 National University of Computer and Emerging Sciences Lecture # 9 Introduction to Web.
Secure Systems Research Group - FAU Web Services Standards Presented by Keiko Hashizume.
Service-Oriented Programming
1 Introduction CSIE, Da-Yeh University. 2 History of Software Development Traditional Programming Paradigm  Behind schedule, costly, and unreliable.
SOAP Tutorial Ching-Long Yeh 葉慶隆 Department of Computer Science and Engineering Tatung University
Web services: Why and How OOPSLA 2001 F. Curbera, W.Nagy, S.Weerawarana Nclab, Jungsook Kim.
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.
Lecture 15 Introduction to Web Services Web Service Applications.
Dodick Zulaimi Sudirman Lecture 14 Introduction to Web Service Pengantar Teknologi Internet Introduction to Internet Technology.
Web Services (SOAP, WSDL, UDDI) SNU OOPSLA Lab. October 2005.
Web Services. ASP.NET Web Services  Goals of ASP.NET Web services:  To enable cross-platform, cross- business computing  Great for “service” based.
Web Services. Abstract  Web Services is a technology applicable for computationally distributed problems, including access to large databases What other.
1 Web Service Description Language (WSDL) 大葉大學資工系.
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.
WebService. Outline Overview of Web Services SOAP (messaging) WSDL (service description) UDDI (registry)
Copyright © 2013 Curt Hill SOAP Protocol for exchanging data and Enabling Web Services.
1 Web Services Web and Database Management System.
Enterprise Computing: Web Services
XML and Web Services (II/2546)
Kemal Baykal Rasim Ismayilov
Introduction to Web Services. Agenda Motivation History Web service model Web service components A walkthrough examples.
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.
1 G52IWS: Web Services Description Language (WSDL) Chris Greenhalgh
Software Architecture Patterns (3) Service Oriented & Web Oriented Architecture source: microsoft.
UDDI (Universal Description,Discovery and Integration) By S.NAGARJUNA M.Tech-C.S.E.
Java Web Services Orca Knowledge Center – Web Service key concepts.
Sabri Kızanlık Ural Emekçi
WEB SERVICES.
Introduction to Web Services
Some Basics of Globus Web Services
Implementing a service-oriented architecture using SOAP
Presentation transcript:

Web Services Core Technologies SOA and Web Services Web Services Standards The XML! SOAP WSDL UDDI

Service Oriented Architecture (SOA) SOA is an example of a the composite computing model: “an architecture that uses distributed, discovery-based execution to expose and manage a collection of service-oriented software assets” In this model: capabilities (i.e. software assets) should be dynamically discoverable should be a clear separation of the software's capabilities and its implementation should be possible to quickly assemble impromptu computing communities with minimal coordinated planning efforts, installation technicalities or human intervention.

What does this entail? Every step of the process needs to be machine processable Service description Data description Metadata description Service discovery Service invocation

SOA Triad of Operations

Web Service Protocols Web Services Protocols based on XML Messaging SOAP Service Description WSDL Service Discovery UDDI Many Others BPEL, WSRF, WS-Addressing, WS-Security, WS-Notification SOAP, WSDL are de-facto standards UDDI less ubiquitous – but a good example of simple publish/find. Service Registry Find (UDDI) Publish (UDDI) Describe (WSDL) Service Consumer Service Provider Bind (SOAP)

SOAP Simple Object Access Protocol (SOAP) Now just SOAP Has its roots in RPC as you can tell by the name Envelope for exchanging XML messages Doesn’t define message exchange pattern Not restricted to request/response Doesn’t specify transport protocol Normally tunnelled through HTTP POST, but can be any protocol that can carry a SOAP envelope Structurally very similar to an (X)HTML document…

Extension Information SOAP Document Envelope Top-level wrapper Header (optional) Security and authentication information (WS-Security) Routing information (WS-Addressing) Resource information (WSRF) … Body XML encoded application data Attachments (optional and used less now) Additional non XML-data (binary, unencoded text, etc.) SOAP Envelope (Required) SOAP Header (Optional) Extension Information e.g. routing, security SOAP Body (Required) Application Data e.g. request, response error

SOAP Request (HTTP) This envelope is dependent on HTTP HTTP Header POST /InStock HTTP/1.1 Host: www.stock.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> ... (optional header information) </soap:Header> <soap:Body xmlns:m="http://www.stock.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope> HTTP Header SOAP Envelope SOAP Header SOAP Body This envelope is dependent on HTTP

SOAP Response (HTTP) HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle ="http://www.w3.org/2001/12/soapencoding"> <soap:Header> ... (optional header information) </soap:Header> <soap:Body xmlns:m ="http://www.stock.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope> This is still transfer protocol dependent. There is no address in the envelope so I can’t cut and paste this into an email for example, and send it to someone. Where ever it goes, it will rely on the transfer protocol to set the address.

SOAP Faults SOAP fault sent instead of normal response if something goes wrong <Body xmlns=http://www.w3.org/2001/12/soap-envelope> <Fault> <faultcode>Client</faultcode> <faultstring>Something went wrong</faultstring> <detail>Application specific error information</detail> </Fault> </Body> Fault Code Client – Message incorrectly formed by client Server – Problem on server so message could not proceed VersionMismatch – Invalid namespace for SOAP envelope MustUnderstand – Header element not understood

WS-Addressing The previous example was dependent on HTTP to have an address WS-Addressing overcomes this Allows addressing information to be embedded in the SOAP header E.g. To, From, FaultTo These values can also be transferred in a SOAP body using an EndpointReference xml structure WS-Addressing specifies how an EndpointReference can be mapped to a bunch of SOAP headers.

WS-Addressing Simple EndpointReference: Gets mapped to SOAP Header: <wsa:EndpointReference> <wsa:Address>http://example.com/service</wsa:Address> </wsa:EndpointReference> Gets mapped to SOAP Header: <soap:Header> <wsa:MessageID>urn:uuid:2</wsa:MessageID> <wsa:To>http://example.com/service</wsa:To> </soap:Header> EPR Can contain other info, e.g.: ReferenceParameters – application specific keys Service description location – WSDL file

EndpointReference to SOAP Headers SOAP Envelope Address Header http://server.com To http://server.com ReferenceParameters Element Element … … Element Element Body CM0356/CMT606 Spring 2008

SOAP Request (HTTP & WS-Addressing) POST /StockMarketService HTTP/1.1 Host: www.stock.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Header> <wsa:MessageID>urn:uuid:1</wsa:MessageID> <wsa:ReplyTo> <wsa:Address>http://example.com/business/client</wsa:Address> </wsa:ReplyTo> <wsa:To>http://www.stock.org/StockMarketService</wsa:To> <wsa:Action>http://www.stock.org/GetStockMarket</wsa:Action> </soap:Header> <soap:Body xmlns:m="http://www.stock.org/stock"> <m:GetStockMarket> <m:MarketName>DOW</m:MarketName> </m:GetStockMarket> </soap:Body> </soap:Envelope> HTTP Header SOAP Envelope SOAP Header SOAP Body

SOAP Response (HTTP & WS-Addressing) HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope xmlns:wsa="http://www.w3.org/2005/08/addressing" soap:encodingStyle ="http://www.w3.org/2001/12/soapencoding"> <soap:Header> <wsa:MessageID>urn:uuid:2</wsa:MessageID> <wsa:RelatesTo>urn:uuid:1</wsa:RelatesTo> <wsa:To>http://example.com/business/client</wsa:To> <wsa:Action> http://www.stock.org/GetStockMarketResponse</wsa:Action> </soap:Header> <soap:Body xmlns:m ="http://www.stock.org/stock"> <m:GetStockMarketResponse> <wsa:EndpointReference> <wsa:Address>http://www.dow-service.com</wsa:Address> </wsa:EndpointReference> </m:GetStockMarketResponse> </soap:Body> </soap:Envelope> This is still transfer protocol dependent. There is no address in the envelope so I can’t cut and paste this into an email for example, and send it to someone. Where ever it goes, it will rely on the transfer protocol to set the address.

SOAP XML based Simple and Lightweight Compared to CORBA, RMI, DCOM etc. Language and OS Independent Unlike RMI (Java) or DCOM (Windows) Transport Protocol Independent Transfer Protocol Independent with WS-Addressing Extensible Additional features can be included in header Vendor Support IBM, Microsoft, Apache, HP, Sun, etc

WSDL Web Service Definition Language (WSDL) WSDL documents describe: Where the service resides, and How to invoke the service Generally available as web pages e.g. http://bouscat.cs.cf.ac.uk/someService?WSDL Location of WSDL relative to Web Service not specified Like CORBA Interface Definition Language (IDL) but more flexible

WSDL Documents (1) Types What data types will be transmitted Messages What messages will be transmitted Port Types What operations (functions) will be supported Bindings How will the messages be transmitted on the wire? What message protocol (e.g. SOAP) specific details are there? Service Where is the service located? Types Messages Port Types Bindings Service

WSDL Documents (2) Service can have multiple ports A port is an endpoint to which messages are sent e.g. http://cs.cf.ac.uk/service Each port is bound to: A message protocol e.g. SOAP A port type via the binding element Port types specify: Operation name Input message type Output message type Types defined using XML Schemas Service Port (http://host/) Port Binding (e.g. SOAP) Binding Abstract Definition Port Type (in) Message Operation(s) (out) Message

WSDL Documents (3) <message name="getBookRequest"> <part name="param" element="isbn"/> </message> <message name="getBookResponse"> <part name="resp" element="book"/> <portType name="bookPortType"> <operation name="getBook"> <input message="getBookRequest"/> <output message="getBookResponse"/> </operation> </portType> point to xml in the types section Abstract Definition of Service

WSDL Documents (4) <binding type="bookPortType" name="bookBind"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name=“getBook”> <soap:operation soapAction="getBook"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="Hello_Service"> <port binding="bookBind" name="bookPort"> <soap:address location="http://localhost/bookservice"/> </port> </service>

UDDI Universal Description, Discovery and Integration (UDDI) Protocol Originally Microsoft, IBM and Ariba Registry for business services Like a phone book for Web Services, although not actually restricted to Web Services XML-based UDDI directory contains three components White Pages - Businesses Yellow Pages – Services provided by the businesses Green Pages – How these services can be accessed

UDDI – White Pages Information about businesses Name Description of the business Potentially multiple languages Contact information Address Phone number etc. Other information Dun & Bradstreet Universal Numbering System number (D.U.N.S)

UDDI Data Model (1) <businessEntity businessKey=“ABCD”> <name>BBC</name> <description> ... </description> </businessEntity>

UDDI – Yellow Pages Classification of services/businesses based on standard taxonomies Standard Industrial Classification (SIC) 7361 = Services - Employment Agencies 7385 = Services - Telephone Interconnect Systems United Nations Standard Products and Services Code (UNSPSC) 93141800 = Employment  83111603 = Cellular telephone services A business may provide multiple services  

UDDI Data Model (2) <businessService serviceKey=“EFGH” businessKey=“ABCD”> <name>News</name> </businessService> <businessEntity businessKey=“ABCD”> <name>BBC</name> <description> ... </description> </businessEntity> <businessService serviceKey=“IJKL” businessKey=“ABCD”> <name>Weather</name> </businessService>

UDDI – Green Pages Information and service bindings, i.e. how a service can be accessed Web Service related Web Service address Parameters Non-Web Service related E-mail FTP CORBA Telephone A service may have multiple bindings (e.g. a Web Service binding, a telephone binding)

UDDI Data Model (3) <bindingTemplate> <businessEntity bindingKey=“MNOP” serviceKey=“EFGH”> <description> Web Service </description> <accessPoint> http://bbc.co.uk/news </accessPoint> <tModelInstanceDetails> <tModelInstanceInfo tModelKey=”QRST”/> </tModelInstanceDetails> </bindingTemplate> <businessEntity businessKey=“ABCD”> <name>BBC</name> <description> ... </description> </businessEntity> <businessService serviceKey=“EFGH” businessKey=“ABCD”> <name>News</name> </businessService> <bindingTemplate> bindingKey=“IJKL” serviceKey=“EFGH”> <description> Web Page </description> <accessPoint> http://news.bbc.co.uk </accessPoint> </bindingTemplate>

UDDI - tModels No explicit link between UDDI and WSDL Binding template contains access point (i.e. where to contact the service) But no information on how to interface with the access point (such as expected data types) tModel (Technical Model) associates an interface description with a binding e.g. WSDL Multiple bindings may refer to the same interface (tModel) e.g. The airline industry may define a standard ticket booking interface, multiple airlines may implement this interface

UDDI Data Model (4) <businessEntity <bindingTemplate> businessKey=“ABCD”> <name>BBC</name> <description> ... </description> </businessEntity> <bindingTemplate> bindingKey=“MNOP” serviceKey=“EFGH”> <description> Web Service </description> <accessPoint> http://bbc.co.uk/news </accessPoint> <tModelInstanceDetails> <tModelInstanceInfo tModelKey=”QRST”/> </tModelInstanceDetails> </businessTemplate> <businessService serviceKey=“EFGH” businessKey=“ABCD”> <name>News</name> </businessService> <tModel tModelKey=”QRST”> <overviewDoc> <overviewURL> http://bbc.co.uk/news?wsdl </overviewURL> </overviewDoc> </tModel>

UDDI Query Also find_service, find_binding, find_tModel <find_business> <findQualifiers> <findQualifier> uddi:uddi.org:findQualifier:exactMatch </findQualifier> </findQualifiers> <name> BBC </name> </find_business> Also find_service, find_binding, find_tModel NOTE: This search is lexical

Putting It All Together <businessEntity> <name>Book Club</name> <businessService> <name>Book Service</name> <bindingTemplate> <description>Web Service</description> <tModelInstanceDetails> <tModelInstanceInfo tModelKey=”QRST”/> </tModelInstanceDetails> </bindingTemplate> <tModel tModelKey=”QRST”> <overviewDoc> <overviewURL> http://cs.cf.ac.uk/bookservice?wsdl </overviewURL> </overviewDoc> </tModel> </businessService> </businessEntity> Service Registry <find_service> <findQualifiers> <findQualifier> exactMatch </findQualifier> </findQualifiers> <name> Book Service </name> </find_service> Find (UDDI) Publish (UDDI) Describe (WSDL) Service Consumer Service Provider Bind (SOAP) http://cs.cf.ac.uk/bookservice

Putting It All Together <message name="getBookRequest"> <part name="param“ element="isbn"/> </message> <message name="getBookResponse"> <part name="resp" element="book"/> <portType name="bookPortType"> <operation name="getBook"> <input message="getBookRequest"/> <output message="getBookResponse"/> </operation> </portType> <binding type="bookPortType" name="bookBind"> <soap:binding style="document" transport=http://schemas.xmlsoap.org/soap/http <operation> <soap:operation soapAction="getBook"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </binding> <service name="Hello_Service"> <port binding="bookBind" name="bookPort"> <soap:address location="http://cs.cf.ac.uk/bookservice"/> </port> </service> Service Registry Find (UDDI) Publish (UDDI) Describe (WSDL) Service Consumer Service Provider Bind (SOAP) http://cs.cf.ac.uk/bookservice

Putting It All Together Service Registry Find (UDDI) Publish (UDDI) Describe (WSDL) Service Consumer Service Provider <soap:Envelope <soap:Body> <getBookResponse> <book> <title>Harry Potter</title> <author>J.K. Rowling</author> <date>2005-10-05</date> </book> </getBookResponse> </soap:Body> </soap:Envelope> <soap:Envelope <soap:Body> <getBookRequest> <isbn>0004702670</isbn> </getBookRequest> </soap:Body> </soap:Envelope> Bind (SOAP) http://cs.cf.ac.uk/bookservice

Discussion What have we seen here? A lot of XML! What about Service Orientation? How do the technologies support his? SOAP as a simple, transport/transfer independent envelope is useful. Applications can put everything they need in it to make messages self describing Supports transactions/security/adressing etc.

And What About WSDL? The abstractions defined by WSDL are Object Oriented and encourage RPC style interactions. Operations = methods Input type/Output types = method parameters Ports - collections of related operations = a Class/Interface PortBinding - Instance of the Port = Object This is not very service oriented! It often results in RPC interactions simply wrapped in complex XML.

And UDDI? The idea of UDDI is good But it’s very complicated Wants to cover everything But searching is limited to lexical queries It never really took off The two main public UDDI repositories run by MS and IBM have shut down Why? Perhaps because of complexity Perhaps because companies do not want to share their commodities in this way They want more control over how their services are published and accessed. Hence UDDI still works, but mainly behind the corporate firewall - NOT on an internat scale

Conclusion SOA What is it, what are its benefits? How do core Web Service technologies support SOA? SOAP Simple protocol for exchanging XML messages Extensible via header WSDL Language for defining web services Operations Inputs/Outputs Object Oriented in spirit UDDI Registry for business services Not tied to Web Services Complex data structures Only supports lexical matching without extensions