Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. Christoph Bussler Semantic Interfaces.

Similar presentations


Presentation on theme: " Copyright 2005 Digital Enterprise Research Institute. All rights reserved. Christoph Bussler Semantic Interfaces."— Presentation transcript:

1  Copyright 2005 Digital Enterprise Research Institute. All rights reserved. www.deri.org Christoph Bussler Chris.Bussler@deri.org Semantic Interfaces of Web Services Christoph Bussler

2 2 Contents Web Services Business-to-Business Integration Semantic Web Services Summary

3 3 Definition ‘Traditional’ Web Services –Two main technologies WSDL (Web Service Description Language) SOAP (Simple Object Access Protocol) –Main idea: remote invocation WSDL language to describe Web Service interface –Operations –Messages Implementation of Web Service interface provided by server SOAP message layout definition for client to send messages to Web Service and for it to send back result as message Intra- as well as Internet network remote invocation

4 4 Overview of Operation … joinStringResponse = joinStrings (‘TNC’, ‘2005’)... String Management Application Interface (in WSDL) joinStringResponse = joinStrings (firstString string, secondString string) Client requesting joining of strings SOAP message (XML) HTTP transport Company Boundary or Network Join String Service

5 5 Operational WSDL Example

6 6 Operational WSDL Example

7 7 Operational Client Example /* * Web Service client implemented using Apache WSIF * Copyright (c) 2005 National University of Ireland, Galway */ package src; import java.util.Map; import javax.xml.namespace.QName; import org.apache.wsif.WSIFMessage; import org.apache.wsif.WSIFOperation; import org.apache.wsif.WSIFPort; import org.apache.wsif.WSIFService; import org.apache.wsif.WSIFServiceFactory; import org.apache.wsif.providers.soap.apacheaxis.WSIFD ynamicProvider_ApacheAxis; import org.apache.wsif.util.WSIFPluggableProviders; import org.apache.wsif.util.WSIFUtils; import javax.wsdl.Definition; import javax.wsdl.Service; import javax.wsdl.PortType; /** * Web Service client implemented using Apache WSIF */ public class SimpleClient { public static void main(String[] args) { SimpleClient client = new SimpleClient(); try { client.wsifClient(); } catch (Exception e) { // handle the exception }

8 8 Operational Client Example /** * Use WSDL4j and WSIF apis to make the Web Service call. * Using the WSIF means that the client can invoke the Web * Service at run time based only on the service's WSDL document. * No stub or skeleton code for the client needs to be generated at * design time. Additionally, WSIF, abstracts the endpoint binding of * the operations of the service. WSIF supports bindings for: * SOAP/HTTP, JMS, J2EE, Java */ public void wsifClient() throws Exception { // Create the WSDL4j service object Definition wsdlDef = WSIFUtils.readWSDL(null, "http://uri.sample- uri/samples/SimpleWS/SimpleWS.wsdl"); String serviceNS = null, serviceName = null; Service wsdlService = WSIFUtils.selectService(wsdlDef, serviceNS, serviceName); PortType wsdlPortType = WSIFUtils.selectPortType(wsdlDef, null, null); // Create the WSIF service and operation objects WSIFServiceFactory factory = WSIFServiceFactory.newInstance(); WSIFService wsifService = factory.getService(wsdlDef, wsdlService, wsdlPortType); // Set the name of the port for the service WSIFPort wsifPort = wsifService.getPort("SimpleWS"); // Set the name of the operation to invoke WSIFOperation wsifOperation = wsifPort.createOperation("joinStrings"); // Create the input, output and fault messages associated with this operation WSIFMessage wsifInput = wsifOperation.createInputMessage(); WSIFMessage wsifOutput = wsifOperation.createOutputMessage(); WSIFMessage wsifFault = wsifOperation.createFaultMessage(); // Set the values of the input wsifInput.setObjectPart("in0", "first"); wsifInput.setObjectPart("in1", "second"); // Make the invocation // The return value will be "first ¦ second" try { wsifOperation.executeRequestResponseOperation(wsifInput, wsifOutput, wsifFault); String retValue = (String) wsifOutput.getObjectPart("joinStringsReturn"); System.out.println(retValue); } catch (Exception e) { System.out.println(e.getMessage()); }

9 9 Observation: Communication Paradigm Client / server –Server interface (= Web Service) defined –Client invocation interface undefined Relevance: recursive case, Web Service implementation itself can be client –What is client invocation interface? External visible invocations try { wsifOperation.executeRequestResponseOperation(wsifInput, wsifOutput, wsifFault); String retValue = (String) wsifOutput.getObjectPart("joinStringsReturn"); System.out.println(retValue); } catch (Exception e) { System.out.println(e.getMessage()); }

10 10 Observation: Service Definition Interface definition of Web Service only Web Service definition itself is non- existent –No composition definition possible in WSDL –No elementary definition possible –No non-functional properties can be defined

11 11 Observation: Data Semantics WSDL reduces data (message) definition to XML Schema No definition beyond the expressiveness of XML Schema possible Flashback example –What exactly does joinString mean? s1 blank s2 (‘TNC 2005’)? s1 | s2 (‘TNC|2005’)? s1s2 (‘TNC2005’)?

12 12 Operational Web Service Implementation /* * Sample Web Service * * Copyright (c) 2005 National University of Ireland, Galway * */ package src; /** * Join two strings together and return. */ public class SimpleWS { public String joinStrings(String s1, String s2) { return s1 + " ¦ " + s2; }

13 13 Intermediate Conclusion Communication paradigm –Client / server Service definition –Interface only Data semantics –Limited by XML Schema

14 14 Contents Web Services Business-to-Business Integration Semantic Web Services Summary

15 15 Company 2 B2B Integration Company 1 i Trading Partner 1Trading Partner 2

16 16 Company 2 B2B Integration Company 1 i Trading Partner 1Trading Partner 2 PO POA Inter-enterprise Coordination (External Behavior) Company 1

17 17 Company 2Company 1 B2B Integration Company 1 i Trading Partner 1Trading Partner 2 PO POA Application Intra-enterprise Coordination (Internal Behavior)

18 18 B2B Integration Company 1Company 2 i Trading Partner 1Trading Partner 2 PO POA Application Integration Server Integration Server PO’PO’’ POA’POA’’

19 19 B2B Integration Integration Server Trading Partner 1 (Merchant) i PO’ POA’ PO POA SHP’ SHP INVC INVC’ Application Integration Server

20 20 B2B Integration Integration Server Trading Partner 1 (Merchant) i PO’ POA’ SHP’ INVC’ Application INVCOK’ PO POA SHP INVC Integration Server

21 21 Communication Paradigm Conversation between trading partners –Not client / server behavior Possible representation: processes Integration Server PO POA SHP INVC Integration Server i

22 22 Communication Paradigm Conversation between trading partners –Not client / server behavior Possible representation: processes Integration Server PO POA SHP INVC Integration Server

23 23 Communication Paradigm Discovery –One way: client searches for provider –Other way: provider searches for client –Consequence: interfaces of both, client and server have to be defined for discovery and matching Integration Server PO POA SHP INVC Integration Server

24 24 Service Definition Complex invocation chains and relationships –Not just interfaces in client / server style –Company internally has to provide logic beyond interfaces Company 1Company 2Company 3Company 4Company 5

25 25 Company 2 Service Definition Relationship between service offer interface and service consumption interface –Must be defined –Follows interface – implementation abstraction Integration Server C D A B Integration Server E F

26 26 Data Semantics Complex documents –Constraints within documents on values Mediation –Different document definition of communicating trading partners Semantic complexity –Beyond XML schema Concepts, abstractions, complex consistency rules, correlation

27 27 Comparison CriteriaWeb ServicesB2B Requirements Communication paradigm Client / ServerConversation Service definition Service interfaceService interface and composition Data semanticsXML SchemaBeyond XML Schema

28 28 Intermediate Conclusion Web service cannot live up to B2B integration requirements due to naïve conceptual model –Communication paradigm –Service definition –Data semantics

29 29 Contents Web Services Business-to-Business Integration Semantic Web Services Summary

30 30 Semantic Web Services Semantic Web Services combine Semantic Web and Web Service technology Automatization of Web Service –Discovery –Combination, and –Invocation makes the technology scalable This combination is a pre-requisite to make Web Service technology scalable and mature

31 31 Semantic Web Services Mechanized support is needed in finding and comparing service providers and their offers –Machine processable semantics of information allows to mechanize these tasks Mechanized support is needed in dealing with numerous and heterogeneous data formats –Ontology technology is required to define such standards better and to map between them Mechanized support is needed in dealing with numerous and heterogeneous business and application logics –Mediation is needed to compensate these differences, allowing partners to cooperate properly

32 32 Semantic Web Services Fully enabled cooperation based on workable Web Services requires a modeling framework that is centered around two complementary principles: –Strong de-coupling of the various components that realize cooperations This de-coupling includes information hiding based on the difference of internal business intelligence and public message exchange protocol interface descriptions –Strong mediation service enabling anybody to speak with everybody in a scalable manner This mediation service includes the mediation of different terminologies as well as the mediation of different interaction styles

33 33 ontologiesmediators web services repositories Semantic Web Services The WSMF consists of four main different elements –Ontologies that provide the terminology used by other elements –Goal repositories that define the problems that should be solved by web services –Web services descriptions that define various aspects of a web service –Mediators which bypass interoperability problems

34 34 WSMO Conceptual Model Web Service Implemen- tation ChoreographyOrchestration Ontologies Mediators Web Service Goal

35 35 WSML Language namespace {_"http://example.org/bookTicket#", dc _"http://purl.org/dc/elements/1.1#", tr _"http://example.org/tripReservationOntology#", foaf _"http://xmlns.com/foaf/0.1/", wsml _"http://www.wsmo.org/wsml/wsml-syntax#", bti _"http://www.example.org/BookTicketInterfaceOntology#"} webService _"http://example.org/bookTicketWebService" importsOntology _"http://example.org/tripReservationOntology" capability BookTicketCapability interface BookTicketInterface importsOntology _"http://www.example.org/BookTicketInterfaceOntology" choreography BookTicketChoreography orchestration BookTicketOrchestration... (see WSMO Primer, D3.1 at www.wsmo.org)

36 36 Requirements Coverage Communication paradigm –Cooperative Web Services (or P2P) Service definition –Orchestration and Choreography Data semantics –Ontology –Mediation

37 37 WSMX Architecture Overview WSMX reference implementation of WSMO WSMX Semantic Web Service Definition Semantic Web Service Communication Semantic Web Service Invocation

38 38 WSMX Architecture Components

39 39 WSMO WG WSMX WGWSML WG A Conceptual Model for SWS A Formal Language for WSMO A Rule-based Language for SW An Execution Environment for WSMO http://www.wsmo.org/ Public Working Groups

40 40 WSMO – WSML – WSMX Mission of WSMO Providing a standard for describing Semantic Web Services Stands for the Web Service Modeling Ontology WSMO is derived from Web Service Modeling Framework (WSMF)

41 41 Contents Web Services Business-to-Business Integration Semantic Web Services Summary

42 42 Summary Web Services –Very simple and naïve conceptual model following the RPC paradigm Semantic Web Services –Expressive conceptual model –Semantic interfaces supported –B2B integration requirements covered

43  Copyright 2005 Digital Enterprise Research Institute. All rights reserved. www.deri.org Christoph Bussler Chris.Bussler@deri.org Semantic Interfaces of Web Services Christoph Bussler


Download ppt " Copyright 2005 Digital Enterprise Research Institute. All rights reserved. Christoph Bussler Semantic Interfaces."

Similar presentations


Ads by Google