Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services Description Language CS409 Application Services Even Semester 2007.

Similar presentations


Presentation on theme: "Web Services Description Language CS409 Application Services Even Semester 2007."— Presentation transcript:

1 Web Services Description Language CS409 Application Services Even Semester 2007

2 2 Web Service Requirements An industry standard web service : –Provide a service description, at least, a WSDL document. –Capable of transporting XML documents using SOAP over HTTP. –Be registered with a discovery agent. –Able to act as both the requestor and provider of a service (optional). e.g: provider asking for status information.

3 3 Service Description Description structure –Abstract: service interface definition. –Concrete: service implementation definition. –Supplementary definition. Service Definition = Abstract + Concrete. Service Description = Service Definition + Supplementary Definition.

4 4 Service Description (2) abstract concrete Service Definition supplementary definitions Service Description Fig 1. Description Structure

5 5 WSDL is … A format to precisely describe web service. Explain the syntax for the invocation of a web service. Explicate the expected response from a web service. An XML document adheres to the WSDL XML schema.

6 6 Role of WSDL Integration Layer Business Rules Data Presentation Integration Layer Business Rules Data Presentation WSDL Document for Application B Application A Application B WSDL Document for Application A Fig 2. WSDL Standpoint

7 7 WSDL Structure Abstract: Concrete: Supplemental: portType import message types binding service operation documentation

8 8 WSDL Structure (2) abstract concrete Service Definition Fig 3. Relation of WSDL content and service definition WSDL Document............

9 9 WSDL Structure (3) Sample definitions and import : targetNamespace=“http://www.doddystore.com/services/PriceCheck” xmlns:soap=“http://schemas.xmlsoap.org/wsdl/soap/” xmlns:pcheck=“http://www.doddystore.com/services/PriceCheck” xmlns:avail=“http://www.doddystore.com/ns/availability” xmlns:wsi=“http://ws-i.org/schemas/conformanceClaim” <import namespace=“http://www.amazon.com/BookPriceCheck” location=“http://www.amazon.com/BookPrice/BookPriceCheck.wsdl” />...

10 10 WSDL Structure (4) definition is the root element of WSDL. Normally contains some XML namespace declarations. import makes available the definitions in another WSDL document. Useful for modularization of your WSDL document –Separate abstract from concrete. –Maintain separate WSDL by its function but present a complete definition all at once.

11 11 WSDL Structure (5) Sample portType and operation :

12 12 WSDL Structure (6) A WSDL can contain zero or more portType. Each portType must have unique name. Operation element define a combination of input, output, and fault message.

13 13 WSDL Structure (7) Sample message :

14 14 WSDL Structure (8) Message is the construct that describes the form of operation. WSDL can contain zero or more message elements. Each message must have unique name.

15 15 WSDL Structure (9) Sample types : <xsd:schema targetNamespace=“http://www.doddystore.com/ns/availability”

16 16 WSDL Structure (10) The types element is used to define user- defined XML types and elements, e.g.: any data types that are not described by XML schema built-in types (simple and complex). A WSDL document can have at most one types element.

17 17 WSDL Structure (11) Sample binding : <soap:operation soapAction=“http://www.doddystore.com/services/PriceCheck/checkPrice” />

18 18 WSDL Structure (12) The binding assigns portType and its operation into specific protocol and encoding style. It informs the service requestor how to format the message. Each portType can have more than one binding (so it could be invoked by several messaging/transport protocol).

19 19 WSDL Structure (13) Sample service :...

20 20 WSDL Structure (14) Purpose of service is to group a set of related port. Group the port that related to the same portType but different binding. Group the port that related but different portType (not recommended).

21 21 WSDL Structure (15) Sample documentation :

22 22 WSDL Structure (16) documentation provide useful human- readable information about the web service description. For example: to declare that the WSDL file is compliant with the WS-I basic profile, thus it is an interoperable description.

23 23 Web Service Interaction Roles in web service: –Service provider. –Service requestor. –Intermediary Receives request then forwards it to the provider. –Initial sender. –Ultimate receiver.

24 24 Web Service Interaction (2) Message path: –The route along with a message travels. –Can be simple or dynamic. –Consist of: one initial sender, one ultimate receiver, and zero or more intermediaries.

25 25 Web Service Interaction (3) Service Requestor Initial Sender Intermediary Service Intermediary Service Provider Ultimate Receiver Message path Fig 4. Simple Message Path

26 26 Web Service Interaction (4) Correlation: –Technique to match message sent along its paths. –Normally used in request and response message exchange patterns. Choreography: –Rules in how a group of web services interact. –Including: sequence, condition for sequence, usage patterns, etc. –Orchestration: implementation of choreography in the business process context.

27 27 Web Service Interaction (5) Service Requestor Initial Sender Intermediary Service Intermediary Service Provider Ultimate Receiver Correlation ID = 1001 Fig 5. Correlation Correlation ID = 1001

28 28 Web Service Interaction (6) Service Requestor Initial Sender Intermediary Service Provider Ultimate Receiver Fig 6. Choreography Intermediary Service Intermediary Service Intermediary Service 12 3a 3b 45

29 29 Message Exchange Patterns Categories: –Synchronous, request and response. –Asynchronous, fire and forget one-to-one and one-to-many (broadcast). Types of MEP: –Request/Response *. –One-Way *. –Notification. –Solicit/Response. * supported by J2EE

30 30 Message Exchange Patterns (2) Request/Response: –Client initiate by sending request message. –Provider replies with a response. –In WSDL, identified by operation section that is declared with a single input element followed by a single output.

31 31 Message Exchange Patterns (3) One-Way Messaging: –Client sends a message but does not expect a reply. –Also known as asynchronous messaging. –In WSDL, identified by operation section that is declared with a single input but no output. Example:

32 32 Message Exchange Patterns (4) Notification: –Provider sends a message but doesn’t expect a reply from the client. –Follows the push model of distributed computing. –Client must register with the service to receive the message (subscriber). –In WSDL, identified by operation section that is declared with a single output but no input.

33 33 Message Exchange Patterns (5) Solicit/Response: –Similar to Notification, but the provider expects a reply from the client. –Client must register with the service to receive the message (subscriber). –In WSDL, identified by operation section that is declared with a single output element followed by a single input (reverse of Request/Response).

34 34 Further Development WSDL 2.0 –Consistency. –Better naming –Simplification –New functionality, e.g. interface extension. –Functionality removal. –Changes in interface, operation, binding, types, service, import, and definitions.

35 35 WSDL 2.0 Sample of changes: –portType becomes interface. –port becomes endPoint. –fault becomes inFault and outFault. –Interface could be extended. –Operation overloading has been removed. –New attribute: style and styleDefault to define the MEP. –etc. * Read “Building Web Services with Java” page 224 to 230 for more details about comparison between WSDL 1.1 and WSDL 2.0.

36 36 Some WSDL Resources WSDL 1.1: www.w3.org/TR/wsdl WSDL 2.0: www.w3.org/2002/ws/desc/wsdl20 WS-Policy: www- 106.ibm.com/developerworks/library/ws- polfram/

37 Thank You Doddy Lukito dlukito@infinitechnology.com dlukito@alumni.carnegiemellon.edu


Download ppt "Web Services Description Language CS409 Application Services Even Semester 2007."

Similar presentations


Ads by Google