Hands On Session

Uploaded from authorPOINTLite
Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Semantic Web Services Hands-On Session with IRS-III: 

Semantic Web Services Hands-On Session with IRS-III John Domingue and Liliana Cabral Knowledge Media Institute, The Open University, UK

European Travel Scenario: 

European Travel Scenario

European Travel Demo : 

European Travel Demo

IRS-III Hands On Task: 

IRS-III Hands On Task Develop an application for the European Travel scenario based on SWS. The application should support a person booking a train ticket between 2 European cities at a specific time and date Create Goal, Web service and Mediator WSMO descriptions in IRS-III (european-travel-service-descriptions) for available services. Your descriptions should choose a specific service depending on the start and end locations and the type of traveller. Use the assumption slot to do this Publish available lisp functions against your descriptions Invoke the web services Solution to be shown at the end of the session

Tutorial Setup: 

Tutorial Setup IRS Server (3000) Domain Models Web Service WSMO Descriptions + Registry of Implementors Goal WSMO Descriptions + SOAP Binding Travel Services (3001) IRS Lisp Publisher IRS-III Knowledge Model Browser & Editor Mediator WSMO Descriptions

Travel Related Knowledge Models: 

Travel Related Knowledge Models

Key Classes, Relations, Instances : 

Key Classes, Relations, Instances Is-in-country <city> <country> e.g. (is-in-country berlin germany) -> true (student <person>) -> true, for john matt michal (business-person <person>) -> true, for liliana michael

Goals: 

Goals 1- Get train timetable Inputs: origin and destination cities (city), date (date-and-time, e.g. (18 4 2004)) Output: timetable (string) 2- Book train Inputs: passenger name (person), origin and destination cities, departure time-date (list-date-and-time), e.g. (20 33 16 15 9 2004)) Output: booking information (string)

Services: 

Services 1 service available for goal 1 No constraints 6 services available for goal 2 As a provider write the constraints applicable to the services to satisfy the goal (assumption logical expressions) 1 wg-mediator mediation-service Used to convert time in list format to time in universal format

Service constraints: 

Service constraints Services 2-5 Services for (origin and destination) cities in determined countries Service 4-5 Need a mediation service to map goal time-date to service time-date Services 6-7 Services for students or business people in Europe

Available Functions (1/3): 

Available Functions (1/3) 1- get-train-times paris london (18 4 2004) "Timetable of trains from PARIS to LONDON on 18, 4, 2004 5:18 …23:36" 2- book-english-train-journey christoph milton-keynes london (20 33 16 15 9 2004) "British Rail: CHRISTOPH is booked on the 66 going from MILTON-KEYNES to LONDON at 16:49, 15, SEPTEMBER 2004. The price is 169 Euros." 3- book-french-train-journey sinuhe paris lyon (3 4 6 18 8 2004) "SNCF: SINUHE is booked on the 511 going from PARIS to LYON at 6:12, 18, AUGUST 2004. The price is 27 Euros."

Available Functions (2/3): 

Available Functions (2/3) 4- book-german-train-journey christoph berlin frankfurt 3304251200 "First Class Booking German Rail (Die Bahn): CHRISTOPH is booked on the 323 going from BERLIN to FRANKFURT at 17:11, 15, SEPTEMBER 2004. The price is 35 Euros." 5- book-austrian-train-journey sinuhe vienna innsbruck 3304251200 "Austrian Rail (OBB): SINUHE is booked on the 367 going from VIENNA to INNSBRUCK at 16:47, 15, SEPTEMBER 2004. The price is 36 Euros. "

Available Functions (3/3): 

Available Functions (3/3) 6- book-student-european-train-journey john london nice (3 4 6 18 8 2004) "European Student Rail Travel: JOHN is booked on the 916 going from LONDON to NICE at 6:44, 18, AUGUST 2004. The price is 94 Euros. " 7- book-business-european-train-journey liliana paris innsbruck (3 4 6 18 8 2004) "Business Europe: LILIANA is booked on the 461 going from PARIS to INNSBRUCK at 6:12, 18, AUGUST 2004. The price is 325 Euros." 8- mediate-time (lisp function) or JavaMediateTime/mediate (java) (9 30 17 20 9 2004) 3304686609

Example: Multiply Goal: 

Example: Multiply Goal

Example: Multiply Mediator: 

Example: Multiply Mediator

Example: Multiply Web Service (1/2): 

Example: Multiply Web Service (1/2)

Example: Multiply Web Service (2/2): 

Example: Multiply Web Service (2/2)

Example: Publishing for Multiply: 

Example: Publishing for Multiply

Example: Invocation Multiply Goal: 

Example: Invocation Multiply Goal

IRS-III Visualizer: 

IRS-III Visualizer

SWS Creation & Usage Steps: 

SWS Creation & Usage Steps Create a goal description (e.g. multiply-goal) Add input and output roles Include role type and soap binding Create a wg-mediator description Source = goal Possibly add a mediation service Create a web service description Used-mediator of WS capability = wg-mediator above Specify Operation <-> Lisp function mapping in Choreography Grounding Publish against web service description Invoke web service by ‘achieve goal’

Multiple WS for goal: 

Multiple WS for goal Each WS has a mediator for used-mediator slot of capability Some WS may share a mediator Define a kappa expression for assumption slot of WS capability Kappa expression format (kappa (?goal) <ocml relations>) Getting the value of an input role (wsmo-role-value ?goal <role-name>)

Defining a Mediation Service: 

Defining a Mediation Service Define a wg-mediator Source = goal Mediation-service = goal for mediation service Mediation goal Mediation goal input roles are a subset of goal input roles Define mediator and WS as normal

Goal Based Invocation: 

Goal Based Invocation Instantiate Goal Description Exchange-rate-goal Has-source-currency: us-dollars Has-target-currency: pound Web Service Discovery European-exchange-rate-ws Non-european-exchange-rate-ws European-bank-exchange-rate-ws Solve Goal Goal -> WG Mediator -> WS/Capability/Used-mediator Web service selection European-exchange-rate Mediate input values ‘$’ -> us-dollar WS -> Capability -> Assumption expression Mediation Invoke selected web service European-exchange-rate Invocation

Valid Relations: 

Valid Relations Classes are unary relations e.g. (country ?x) Slots are binary relations e.g. (is-capital-of ?x ?y) Standard relations in base (OCML toplevel) ontology =, ==, <, >, member

European Currency Assumption: 

European Currency Assumption (kappa (?goal) (member (wsmo-role-value ?goal 'has_source_currency) '(euro pound)))

Tips: 

Tips Order matters for input roles Input roles in goal must match order of arguments to function Need to specify both input roles and output role Be careful with soap binding sexpr as default String for one line output Use xml for multiple line output Input roles for web services inherited from goal Slot names can not be the same as class names Goal <-> web service linking mediator in the capability used mediators