Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 6331 © Leonidas Fegaras Web Services1 Web Services (adapted from Erdogan Dogdu's presentation) Leonidas Fegaras.

Similar presentations


Presentation on theme: "CSE 6331 © Leonidas Fegaras Web Services1 Web Services (adapted from Erdogan Dogdu's presentation) Leonidas Fegaras."— Presentation transcript:

1 CSE 6331 © Leonidas Fegaras Web Services1 Web Services (adapted from Erdogan Dogdu's presentation) Leonidas Fegaras

2 CSE 6331 © Leonidas Fegaras Web Services2 What are Web Services? Services available via the Web –Mostly for application-to-application communication –Enables business-to-business transactions Examples: –stock quote service –weather service –map service –Web search service Based on XML SOAP: Simple Object Access Protocol WSDL: Web Service Description Language UDDI: Universal Description, Discovery, and Integration

3 CSE 6331 © Leonidas Fegaras Web Services3 SOAP A lightweight protocol for exchanging information in a distributed, heterogeneous environment Enables cross-platform interoperability –programming language neutral –hardware independent –protocol independent Works over existing Internet infrastructure Builds on XML standards Defines –message format –data encoding –headers for sending messages & receiving responses

4 CSE 6331 © Leonidas Fegaras Web Services4 A SOAP Request SOAP requests are HTTP POST requests POST /WebCalculator/Calculator.asmx HTTP/1.1 Content-Type: text/xml SOAPAction: Content-Length:

5 CSE 6331 © Leonidas Fegaras Web Services5 Message Layout SOAP Message SOAP Envelope SOAP Header SOAP Body Message Name & Data Headers XML-encoded SOAP message name & data contains SOAP message name Individual headers encloses headers encloses payload Protocol binding headers The complete SOAP message

6 CSE 6331 © Leonidas Fegaras Web Services6 Message Format The SOAP schema can be defined in an XML document

7 CSE 6331 © Leonidas Fegaras Web Services7 Server Response HTTP/ OK... Content-Type:text/xml Content-Length:

8 CSE 6331 © Leonidas Fegaras Web Services8 Data are in XML Plastic Novelties Ltd 129 PLAS

9 CSE 6331 © Leonidas Fegaras Web Services9 Example of a Request POST /StockQuote HTTP/1.1 Host: Content-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI DIS

10 CSE 6331 © Leonidas Fegaras Web Services10 Example of a Response HTTP/ OK Content-Type: text/xml; charset="utf-8" Content-Length: nnnn 34.5

11 CSE 6331 © Leonidas Fegaras Web Services11 WSDL: Web Services Description Language XML schema for describing Web Services –Service interface definition abstract semantics for Web Service –Service implementation definition concrete end points and network addresses where Web Service can be invoked Used primarily (although not exclusively) to describe SOAP services Describes four critical pieces of data: –Interface information describing all publicly available functions –Data type information for all message requests and message responses –Binding information about the transport protocol to be used –Address information for locating the specified service

12 CSE 6331 © Leonidas Fegaras Web Services12 Main Structure xschema types … a set of operations communication protocols a list of binding and ports

13 CSE 6331 © Leonidas Fegaras Web Services13 WSDL Parts define types used in message declaration –XML Schema must be supported by any vendor of WSDL conformant products The element defines the data elements of an operation –each message may consist of one or more parts similar to the parameters of a function call in a traditional programming language The defines a web service, the operations that can be performed, and the messages that are involved –defines the connection point to a web service, an instance of. –similar to a function library in a traditional programming language –each operation can be compared to a function in a traditional programming language

14 CSE 6331 © Leonidas Fegaras Web Services14 Example: HelloService.wsdl

15 CSE 6331 © Leonidas Fegaras Web Services15 Example (cont.)

16 CSE 6331 © Leonidas Fegaras Web Services16 Example (cont.) WSDL File for HelloService

17 CSE 6331 © Leonidas Fegaras Web Services17 WSDL Invocation Tools You can use any SOAP method to call HelloService Using the GLUE tool: invoke URL method arg1 arg2 arg3... To invoke the HelloService with GLUE –place the HelloService.wsdl file within a publicly available directory –issue the command: invoke sayHello World GLUE will –download the specified WSDL file –invoke the sayHello method –pass World as a parameter Server response: result = Hello, World!

18 CSE 6331 © Leonidas Fegaras Web Services18 UDDI UDDI = Universal Description, Discovery, and Integration Industry initiative to address discovery –a registration database for Web Services Specifications –schema for service providers and descriptions –API for publishing and searching –developed on industry standards (XML, HTTP, TCP/IP, SOAP) –applies to both XML and non-XML services Implementation –public and private instances of specification

19 CSE 6331 © Leonidas Fegaras Web Services19 Providers, Services and Bindings Providers –Examples: Accounting Department, Corporate Application Server –Name, Description, Contact Information –Categorization and Identification Information Services –Examples: Purchase Order services, Payroll services –Name, Description(s) –Categorization Information Bindings –Description(s), access points, parameters –Examples: Access Point (http://...) for Web Service

20 CSE 6331 © Leonidas Fegaras Web Services20 Features Neutral in terms of protocols –as a registry, it can contain pointers to anything Can search by business, service, Web Service, binding Usage of Globally Unique Identifiers (GUIDs) Specification allows public and private nodes Delineation between interface and implementation

21 CSE 6331 © Leonidas Fegaras Web Services21 tModel represents meta-data and interfaces microsoft-com:creditcheck Check credit limits

22 CSE 6331 © Leonidas Fegaras Web Services22 bindingTemplate A bindingTemplate represents data and implementation details


Download ppt "CSE 6331 © Leonidas Fegaras Web Services1 Web Services (adapted from Erdogan Dogdu's presentation) Leonidas Fegaras."

Similar presentations


Ads by Google