Top Banner
Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu
26

Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

Dec 14, 2015

Download

Documents

Anne Hider
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

Web Services Seminar:

Service Description Languages

Andrei Manuel Dub Yuan Liu

Page 2: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

Service Description Language

• From Microsoft

• Describing network services(general)

Abstract functionality

Concrete details

Conformance criteria for documents

2Web + SDL = WSDL

Page 3: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

What is

3

SOAP

WSDL

UDDIWSDL stands for Web Services Description LanguageWSDL is written in XMLWSDL is an XML documentWSDL is used to describe Web servicesWSDL is also used to locate Web servicesWSDL is a W3C recommendation

Page 4: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

Structure

4Src: wikipedia http://en.wikipedia.org/wiki/File:WSDL_11vs20

<description><documentation />?[ <import /> | <include /> ]*<types />?[ <interface /> | <binding /> | <service /> ]*</description>

Page 5: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

5Src: Web Services Description Language (WSDL) Version 2.0 Part 0: Primer:Figure 2-1. WSDL 2.0 Infoset Diagram

Page 6: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

namespace

6

Namespace in the description label: Decide on a WSDL 2.0 target namespace URI and other namespaces

<?xml version="1.0" encoding="utf-8" ?><description xmlns="http://www.w3.org/ns/wsdl"

targetNamespace= "http://greath.example.com/2004/wsdl/resSvc"xmlns:tns= "http://greath.example.com/2004/wsdl/resSvc"xmlns:ghns = "http://greath.example.com/2004/schemas/resSvc"xmlns:whttp="http://www.w3.org/ns/wsdl/http"

. . . >

Page 7: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

types

7

Message types: A good start point is to describe the types of messages that our services will use.<types>

<xs:schema targetNamespace="http://greath.example.com/2004/schemas/resSvcWrapper">

<xs:import namespace="http://greath.example.com/2004/schemas/resSvc"schemaLocation= "http://greath.example.com/2004/schemas/resSvc.xsd"/>

</xs:schema></types>

Not limited in XML Schema

Page 8: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

interface

8

Define the operations to be performed byWeb Services and the messages it used

<wsdl:interface name="BookListInterface"> <wsdl:operation name="getBookList"

pattern="http://www.w3.org/ns/wsdl/in-out" style="http://www.w3.org/ns/wsdl/style/iri" wsdlx:safe="true">

<wsdl:documentation> This operation returns a list of books. </wsdl:documentation> <wsdl:input element=""/> <wsdl:output element=""/>

</wsdl:operation> </wsdl:interface>

Page 9: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

binding

9

It specifies the format of the concrete message and the details of the transmission protocol . (SOAP 1.2 and HTTP) <wsdl:binding name="BookListHTTPBinding"

type="http://www.w3.org/ns/wsdl/http" interface="tns:BookListInterface"><wsdl:operation ref="tns:getBookList" whttp:method="GET"/>

</wsdl:binding>

Each interface construct has a binding counterpart.

Page 10: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

service

10

Where the service can be accessed.

<wsdl:service name="BookList" interface="tns:BookListInterface"> <wsdl:endpoint name="BookListHTTPEndpoint" binding="tns:BookListHTTPBinding" address="http://www.bookstore.com/books/"> </wsdl:endpoint> </wsdl:service>

Note that one service is to one interface!

Page 11: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

More On WSDL

11

If you are interested in…• import/include mechanisms• namespaces• Mapping to RDF and Semantic Web• extensibility

Page 12: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

An overview

12

Page 13: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

SOAP Encoding

13

WSDL describes Services SOAP transports messagesSOAP

WSDL

How can we define the mapping?

Page 14: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

SOAP Encoding

14

SOAP

WSDL

• Literal

• Concrete

Page 15: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

15

Page 16: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

An overview

16

Page 17: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

17

From 1.1 to 2.0

message is integrated in interface

Interfaindicativece is more clear than portType

A binding is now reusable. Adequate HTTP binding

Page 18: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

An overview

18

Page 19: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

19

WADL

Binding occurs only with the HTTP protocol

Major in Resource oriented web services

Components:

application – root elementresources – resources provided by the applicationmethod– defines the HTTP to be called + parametersresponse– an HTTP status code

Page 20: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

An overview

20

Page 21: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

21

Why not to RESTful…

Why& Why Not?Does WSDL always have to describe SOAP-based web services? Can it describe RESTful web services?

Why not: SOAP ,SMTP, or plain HTTP. In WSDL 2.0, it can even describe RESTful web services

Page 22: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

22

Page 23: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

Why?

23

SOAP

WSDL

UDDI

SOAP+WSDL+UDDI vs

RESTful Web Services

Universal Description, Discovery, and Integration

Page 24: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

24

WS-

Src: Web Information Systems Lecture Slides: Web 2.0 Patterns,Beat Signer

Page 25: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

Why?

SOAP+WSDL+UDDI

• XML,XML,XML• no mechanism for the

caching of results • complexity

RESTful

• stateless • cacheability • layering • simple • CRUD• better integrated with HTTP

and web browsers

25

Page 26: Web Services Seminar: Service Description Languages Andrei Manuel Dub Yuan Liu.

26