Upload
sheryl-townsend
View
218
Download
0
Tags:
Embed Size (px)
Citation preview
Applying Semantic Web Applying Semantic Web Technologies to Web Technologies to Web ServicesServices
Vadim EisenbergVadim EisenbergDecember 2008December 2008
Seminar in Databases (236826) Seminar in Databases (236826)
OutlineOutline
IntroductionIntroduction Semantic WebSemantic Web Web ServicesWeb Services
Applying Applying Semantic Web Semantic Web technologies to technologies to Web ServicesWeb Services ““Composing Web Services on the Semantic Composing Web Services on the Semantic
Web”Web”, B. Medjahed et. al., VLDB Journal 2003, B. Medjahed et. al., VLDB Journal 2003 ““Software Framework for Matchmaking Based Software Framework for Matchmaking Based
on Semantic Web Technology”on Semantic Web Technology”, L.Li et. al., , L.Li et. al., International Journal of Electronic Commerce International Journal of Electronic Commerce 20042004
22
SEMANTIC WEBSEMANTIC WEB
33
Semantic WebSemantic Web
Today, the data on the Web is Today, the data on the Web is “understandable”“understandable” only by only by humans humans or custom-developed software applicationsor custom-developed software applications
The vision behind the Semantic Web is that The vision behind the Semantic Web is that the data on the Web should be processed the data on the Web should be processed and and “understood” “understood” by by computerscomputers ““... the day-to-day mechanisms of trade, ... the day-to-day mechanisms of trade,
bureaucracy and our daily lives will be bureaucracy and our daily lives will be handled by machines talking to machines.”handled by machines talking to machines.”
Tim Berners-Lee, 1999Tim Berners-Lee, 1999
44
Example - Analyzing Financial Data Example - Analyzing Financial Data on the Webon the Web The need: a The need: a software applicationsoftware application, which , which
will analyze data about financial products will analyze data about financial products from from differentdifferent investment companies investment companies
For example, data about For example, data about ETFsETFs ETFETF ( (Exchange-Traded FundExchange-Traded Fund) ) is a low-cost is a low-cost
investment scheme , which holds assets as investment scheme , which holds assets as stocks or bonds. Usually tracks indices.stocks or bonds. Usually tracks indices.
55
Example: the SettingExample: the Setting
Several Israeli investment companies Several Israeli investment companies provide ETF productsprovide ETF products
The differencesThe differences the tracked index/indicesthe tracked index/indices the management feethe management fee the dividend distribution policythe dividend distribution policy the base currency (NIS or other)the base currency (NIS or other) the ranking of the productthe ranking of the product
66
Example: the GoalExample: the Goal
Our application must find the most suitable Our application must find the most suitable ETFETF more ambitious goal would be enabling this more ambitious goal would be enabling this
application to buy application to buy ETFsETFs such software applications, which act on such software applications, which act on
behalf of the user are called behalf of the user are called software software agentsagents
77
Example: the Data on the WebExample: the Data on the Web
88
The DataThe Data
99
The data: the ProblemsThe data: the Problems
The data is poorly The data is poorly structuredstructured htmlhtml binary formats - pdfbinary formats - pdf
The content and the layout are mixed The content and the layout are mixed There is no There is no commoncommon structurestructure for for
differentdifferent the investment companies the investment companies DifferentDifferent terminologyterminology for the same for the same
entitiesentities
1010
The ProblemsThe Problems
Writing an ETF analyzing application is a hard and Writing an ETF analyzing application is a hard and tedious tasktedious task CustomCustom parsersparsers for every page must be written for every page must be written The The parsersparsers will be broken once the pages change will be broken once the pages change The need for developing The need for developing customcustom rules and rules and
taxonomy taxonomy regarding the regarding the ETFsETFs• modeling information about modeling information about stocks, bonds, currencies, stocks, bonds, currencies,
states states etc.etc.• customcustom reasoning rules/query engines reasoning rules/query engines must be developed must be developed
for the applicationfor the application
1111
A Step to a More Computer-A Step to a More Computer-Friendly Web: XMLFriendly Web: XML
A universal format for structured data - A universal format for structured data - XMLXML
easy for easy for parsingparsing• strict rulesstrict rules• a tree representationa tree representation
easy for easy for automatic validationautomatic validation• XML schema, DTDXML schema, DTD• the tools automatically validate the datathe tools automatically validate the data
easy for easy for queryingquerying• several query languages exist - XPath, XQueryseveral query languages exist - XPath, XQuery
1212
A Step to a More Computer-A Step to a More Computer-Friendly Web: XMLFriendly Web: XML
easy for easy for transformationstransformations to other formats to other formats• XSLT XSLT
plenty of plenty of freefree tools/software tools/software packages/APIs packages/APIs for all the above existfor all the above exist
• APIs for Programming Languages : JAXP of APIs for Programming Languages : JAXP of Java, XLINQ of C#Java, XLINQ of C#
• easy application developmenteasy application development
1313
<ETF SecurityNumber=“1095736” ><Title> Tachlit Nikkei </Title>
<TrackedIndex> Nikkei 225 </BaseIndex><BaseCurrency> NIS </BaseCurrency><DividendPolicy units=“%” > 100 </DividendPolicy><ManagementFee period=“year” units=“%” > 0.65 </ManagementFee>
</ETF>
<ETF> <Title> Kesem Nikkei </Title> <BaseIndex> Nikkei 225 </BaseIndex> <BaseCurrency> NIS </BaseCurrency> <SecurityNumber> 1099464 </SecurityNumber> <DividendDistributionPolicy> coefficient T = 2.2% added to the value of the ETF </ DividendDistributionPolicy > <AnualManagementFee> 0% </AnualManagementFee></ETF>
XML ExamplesXML Examples
1414
XML + XSLT: Separation of XML + XSLT: Separation of Content from LayoutContent from Layout
XMLXML documents can store an information documents can store an information about how to about how to displaydisplay them - references to them - references to XSLXSL stylesheets stylesheets this enables separation of data proper from the this enables separation of data proper from the
way to display data way to display data the XML data can be processed conveniently the XML data can be processed conveniently
machinesmachines• and by and by humanshumans
the XML data can be the XML data can be displayeddisplayed to to humanshumans in a in a convenient way using XSL stylesheetsconvenient way using XSL stylesheets
1515
Example of XSLT: the StylesheetExample of XSLT: the Stylesheet
1616
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="ETF"> <html> <head><title><xsl:value-of select="Title"/></title></head> <body>
<TABLE> <TBODY> <TR> <TD>Security Name: <SPAN STYLE="color:blue"><b><xsl:value-of select="Title"/></b></SPAN></TD></TR> <TR> <TD>Based on Index: <SPAN STYLE="color:red"><b><xsl:value-of select="BaseIndex"/></b></SPAN></TD></TR> <TR> <TD>Security Number: <SPAN STYLE="color:blue"><b><xsl:value-of select="SecurityNumber"/></b></SPAN></TD></TR> <TR> <TD>Dividend Distribution Policy: <SPAN STYLE="color:blue"><i><xsl:value-of select="DividendDistributionPolicy"/></i></SPAN></TD></TR> <TR> <TD>Anual Management Fee: <SPAN STYLE="color:blue"><b><i><xsl:value-of select="AnualManagementFee"/></i></b></SPAN></TD></TR>
</TBODY></TABLE> </body> </html> </xsl:template></xsl:stylesheet>
Example of XSLT: the produced Example of XSLT: the produced htmlhtml
1717
XML + XSLXML + XSL
1818
WebSite
XSL stylesheet
Web Browser with XSLT support
XMLXML
XML Representation - the XML Representation - the ProblemsProblems
Lack of Lack of commoncommon unique termsunique terms Lack of Lack of commoncommon structurestructure (e.g. (e.g.
attributes vs. elements)attributes vs. elements) Lack of Lack of semanticssemantics
it is not clear from the document that it is not clear from the document that ETFETF is is a kind of a kind of securitysecurity, as , as trust fundstrust funds, , stocksstocks and and bondsbonds
1919
The Next Step to a More The Next Step to a More Computer-Friendly Web: RDFComputer-Friendly Web: RDF
Adding Adding semanticssemantics to documents: to documents: RDFRDF - - ResourceResource DescriptionDescription Framework Framework
• Resource is anything that has Resource is anything that has URIURI• URI - Uniform Resource IdentifierURI - Uniform Resource Identifier
UniqueUnique terms - using terms - using URIsURIs. . For example:For example:
not necessarily related to Web pages !not necessarily related to Web pages !2020
http://www.isa.gov.il/ETF#BaseCurrencyhttp://www.isa.gov.il/ETF#BaseCurrencyhttp://www.isa.gov.il/ETF#ManagementFeehttp://www.isa.gov.il/ETF#ManagementFeehttp://www.isa.gov.il/Securities#SecurityNumberhttp://www.isa.gov.il/Securities#SecurityNumber
RDFRDF
RDFRDF Data Model is based on triples : Data Model is based on triples :((subjectsubject, , predicatepredicate, , objectobject))
subjectssubjects and and predicatespredicates must be must be URIsURIs objectobject can also be can also be URIURI
2121
RDF ExamplesRDF Examples
( ( http://www.xnes.co.il/ETF#KesemNikkeihttp://www.xnes.co.il/ETF#KesemNikkei, , http://ww.isa.gov.il/Securities#SecurityNumbhttp://ww.isa.gov.il/Securities#SecurityNumberer, , 10994641099464))
( ( http://www.xnes.co.il/ETF#KesemNikkeihttp://www.xnes.co.il/ETF#KesemNikkei, , http://www.isa.gov.il/ETF#ManagementFeehttp://www.isa.gov.il/ETF#ManagementFee, , 0)0)
( ( http://www.xnes.co.il/ETF#KesemNikkeihttp://www.xnes.co.il/ETF#KesemNikkei, , http://www.isa.gov.il/ETF#BaseCurrencyhttp://www.isa.gov.il/ETF#BaseCurrency,,
http://www.currencies.com/NIShttp://www.currencies.com/NIS))
2222
RDF FormatsRDF Formats
RDF could be represented in XML RDF could be represented in XML formatformat XML is not the only XML is not the only formatformat ! !
2323
RDF/XML ExampleRDF/XML Example
2424
< rdf:RDFxmlns:rdf=“http://www.w3.org/1999/02/22-rdf-
syntax-ns#“xmlns=“http://www.xnes.co.il/ETF”xmlns:isa=“http://www.isa.gov.il/ETF”xmlns:cur=“http://www.currencies.com”>
<rdf:Description rdf:about=“KesemNikkei”><isa:SecurityNumber> 1099464 </isa:SecurityNumber><isa:ManagementFee> 0 </isa:ManagementFee> <isa:BaseCurrency rdf:resourse=“&cur;NIS” /></rdf:Description>
Integrating RDF with the Current Integrating RDF with the Current WebWeb
EmbeddingEmbedding metadatametadata in in HTMLHTML EmbeddingEmbedding RDFRDF directly (RDFa) directly (RDFa) EmbeddingEmbedding metadatametadata (Microformats) which (Microformats) which
could be transformed to could be transformed to RDFRDF (GRDDL) (GRDDL) PublishingPublishing RDFRDF + + XSLXSL
2525
Publishing HTML with RDF Publishing HTML with RDF embeddedembedded
2626
WebSite
Web Browser with XSLT support
HTMLHTML
Embedding RDF in HTMLEmbedding RDF in HTML
2727
<html> <head><title>Kesem Nikkei</title></head> <body> <div xmlns:isa="http://www.isa.gov.il/ETF"
xmlns:cur="http://www.currencies.com" about="http://www.xnes.co.il/ETF/KesemNikkei">
<TABLE> <TBODY> <TR> <TD>Security Name: <SPAN STYLE="color:blue"><b>Kesem Nikkei</b></SPAN></TD></TR> <TR> <TD>Based on Index: <SPAN STYLE="color:red"><b>Nikkei 225</b></SPAN></TD></TR> <TR> <TD>Security Number: <SPAN STYLE="color:blue" ><b> <SPAN property="isa:SecurityNumber">1099464</SPAN></b></SPAN></TD></TR>
<TR> <TD>Anual Management Fee: <SPAN STYLE="color:blue"><b><i> <SPAN property="isa:ManagementFee">0% </SPAN></i></b></SPAN></TD></TR> <TR> <TD>Based On Currency<SPAN STYLE="color:blue"><b><i> <SPAN property="isa:Currency"> NIS </SPAN></i></b></SPAN></TD></TR> </TBODY></TABLE> </div> </body></html>
Publishing RDF + XSLPublishing RDF + XSL
2828
WebSite
XSL stylesheet
Web Browser with XSLT support
RDF/XML
RDF/XML
RDF: a Graph RepresentationRDF: a Graph Representation
2929
xnes:Kesem Nikkei
stocks:Nikkei 225
cur:NIS
tih:TachlitNikkei
cur:Yen
geo:Israel
geo:Japan
geo:Europe
geo:Asia
isa:BaseIndex
isa:BaseIndex
isa:BaseCurrency
isa:BaseCurrency cur:state
cur:state
geo:continent
geo:continent
0.65
0
isa:ManagementFee
isa:ManagementFee
SPARQL - a Query Language SPARQL - a Query Language for RDFfor RDF
SPARQL - Simple SPARQL - Simple ProtocolProtocol and RDF and RDF QueryQuery LanguageLanguage
Executes Executes queriesqueries over RDF over RDF graphgraph Basic Basic queryquery structure - structure - SELECT ... WHERE ...SELECT ... WHERE ... Uses Uses URIsURIs Data integration Data integration “integrated” in the language :“integrated” in the language :
queriesqueries over multiple over multiple graphsgraphs QueryQuery Language with Language with web protocolweb protocol
web service specificationweb service specification
3030
SPARQL ExampleSPARQL Example
Suppose we want to find all Suppose we want to find all ETFsETFs, which are based on , which are based on NISNIS and have and have management fee management fee less than 0.5 %. We less than 0.5 %. We want the want the queryquery to return security numbers of the to return security numbers of the ETFsETFs..
SPARQL SPARQL queryquery::
3131
PREFIX isa: <http://www.isa.gov.il/ETF#> PREFIX cur: < http://www.currency.com/#>SELECT ?etfNumberWHERE {
?etf isa:SecurityNumber ?etfNumber ;isa:BaseCurrency cur:NIS ;
isa:ManagementFee ?fee .
FILTER (?fee < 0.5)}
Additional SPARQL ExampleAdditional SPARQL Example Suppose we want to find all Suppose we want to find all ETFsETFs, which are based on , which are based on currenciescurrencies
of of Asian statesAsian states. We want the . We want the queryquery to return the security numbers to return the security numbers of the of the ETFsETFs and the currencies they are based on. and the currencies they are based on.
SPARQL SPARQL queryquery::
3232
PREFIX isa: <http://www.isa.gov.il/ETF#> PREFIX cur: <http://www.currency.com/#>PREFIX geo: <http://www.geoinfo.com/#”>SELECT ?etfNumber ?currencyWHERE {
?etf isa:SecurityNumber ?etfNumber ; isa:BaseCurrency ?currency.?currency cur:state ?state.?state geo:continent geo:Asia.
}
RDF: the problemRDF: the problem
Suppose, we want to write a query about Suppose, we want to write a query about all the all the securitiessecurities ( (ETFsETFs, , trust fundstrust funds, , stocksstocks and and bondsbonds) which are based on ) which are based on Japan economy?Japan economy?
We need a some way for the query We need a some way for the query language to language to “understand” “understand” that that ETFETF is ais a SecuritySecurity
3333
The Next Step of the Semantic The Next Step of the Semantic Web - OntologiesWeb - Ontologies
OntologyOntology in computer science - in computer science - a formal a formal representation of a set of concepts within representation of a set of concepts within a domain and the relationships between a domain and the relationships between those concepts.those concepts. (From (From http://en.wikipedia.org/wiki/Ontology_(computer_science))
3434
The Next Step of the Semantic The Next Step of the Semantic Web - OntologiesWeb - Ontologies
For example, an For example, an ontologyontology can state that can state that any entity that has a any entity that has a propertyproperty (the (the predicatepredicate in the triple in the triple subjectsubject--predicatepredicate--objectobject) belongs to some class) belongs to some class the subject of the subject of isa:SecurityNumberisa:SecurityNumber is a is a
member of member of isa:Securityisa:Security (the (the domaindomain of the of the property)property)
the object of the object of isa:BaseCurrencyisa:BaseCurrency is is cur:Currencycur:Currency (the (the rangerange of the of the propertyproperty))
3535
The Next Step of the Semantic The Next Step of the Semantic Web - OntologiesWeb - Ontologies
Stating Stating subclasssubclass relationships relationships similar to inheritance in OOPsimilar to inheritance in OOP For exampleFor example
• isa:ETFisa:ETF and and isa:MutualFundisa:MutualFund is a is a subclasssubclass of of isa:Securityisa:Security
• isa:BaseCurrencyisa:BaseCurrency and and isa:BaseIndexisa:BaseIndex a a subpropertysubproperty of of isa:BasedOnisa:BasedOn
3636
The Semantic Web Ontology The Semantic Web Ontology LanguagesLanguages
There is a number of ontology languages There is a number of ontology languages developed for Semantic Webdeveloped for Semantic Web are built on RDFare built on RDF
The standard ontology languages (from more The standard ontology languages (from more primitive to more expressive) :primitive to more expressive) : RDF Schema (RDFS)RDF Schema (RDFS) OWL LiteOWL Lite OWL DLOWL DL OWL FullOWL Full
The more expressive the ontology language, the The more expressive the ontology language, the more computationally expensive is to process it more computationally expensive is to process it
3737
OWLOWL
In OWL it is possible to state in addition to In OWL it is possible to state in addition to range, domain, subClass and subProperty range, domain, subClass and subProperty information:information: boolean combination boolean combination of of classesclasses
• e.g. e.g. PersonPerson is either is either MaleMale or or FemaleFemale disjointnessdisjointness of of classesclasses
• e.g. e.g. MaleMale and and FemaleFemale are disjoint classes are disjoint classes
3838
OWLOWL
cardinalitycardinality of the of the objectsobjects• e.g. every person has one mother, two parents, e.g. every person has one mother, two parents,
four grandparentsfour grandparents characteristicscharacteristics of of propertiesproperties
• e.g. isSiblingOf is a e.g. isSiblingOf is a symmetricsymmetric and and transitivetransitive propertyproperty
and some other...and some other... An example ontology - An example ontology -
http://www.owldl.com/ontologies/family.owl
3939
OWLOWL
OWL is based on OWL is based on Description LogicsDescription Logics a formalism for representing a formalism for representing conceptsconcepts
(classes), (classes), rolesroles (properties) and (properties) and relationshipsrelationships between them between them
has a formally defined has a formally defined semanticssemantics several several reasoning tools reasoning tools existexist less expressive than First Order Predicate less expressive than First Order Predicate
LogicLogic a a compromisecompromise between between expressivenessexpressiveness and and
computational efficiencycomputational efficiency
4040
OWL Reasoning ExampleOWL Reasoning Example
Suppose we have the following ontology:Suppose we have the following ontology: domain of the property domain of the property X hasSister Y X hasSister Y is is
PersonPerson range of the property range of the property X hasSister Y X hasSister Y is is
FemaleFemale X hasSister Y X hasSister Y is a sub property of is a sub property of
X hasSibling YX hasSibling Y X hasSibling Y X hasSibling Y is a symmetric and transitive is a symmetric and transitive
propertyproperty
4141
OWL Reasoning ExampleOWL Reasoning Example
From a From a factfact “John”“John” hasSister hasSister “Mary” “Mary” and the and the ontologyontology follows follows ““John” John” is ais a Person Person ““Mary” Mary” is ais a Female Female ““Mary” Mary” is ais a sibling of sibling of “John”“John” ““John” John” is ais a sibling of sibling of “Mary”“Mary”
4242
OWL Reasoning ExampleOWL Reasoning Example
From an additional From an additional factfact “Mary” “Mary” hasSiblinghasSibling “Bob”“Bob” ““John” John” hasSiblinghasSibling “Bob”“Bob” ““Bob” Bob” hasSiblinghasSibling “Mary”“Mary” ““Bob” Bob” hasSiblinghasSibling “John”“John”
4343
Description Logic - LimitationsDescription Logic - Limitations
It is It is impossibleimpossible to define a rule for an to define a rule for an “uncle”, as in First Order Predicate logic“uncle”, as in First Order Predicate logic ParentParent((XX,,YY), ), BrotherBrother((XX,,ZZ) → ) → UncleUncle((ZZ,,YY))
4444
The Logic Reasoning in the The Logic Reasoning in the Semantic WebSemantic Web
The logic reasoning is used in the context The logic reasoning is used in the context of the Semantic Web for:of the Semantic Web for: checking the checking the consistencyconsistency of of ontologiesontologies checking the checking the consistencyconsistency of of datadata with regard with regard
to the to the ontologiesontologies automatic automatic classificationclassification of instances of of instances of datadata discoveringdiscovering implied implied relationshipsrelationships between between
instances of datainstances of data
4545
The Semantic Web: an Optimistic The Semantic Web: an Optimistic ScenarioScenario
All the data All the data in the world is described by in the world is described by RDFRDF or could be converted automatically or could be converted automatically to an RDF representationto an RDF representation semantic markupsemantic markup converters to RDFconverters to RDF
4646
The Semantic Web: an Optimistic The Semantic Web: an Optimistic ScenarioScenario
All the data All the data could be queried by could be queried by one one query languagequery language (e.g. SPARQL) (e.g. SPARQL)
All the world knowledge All the world knowledge about any about any domain could be formalized in domain could be formalized in ontologiesontologies which will appear on the Webwhich will appear on the Web for example, ontologies about securities, for example, ontologies about securities,
currencies, geographic information etc.currencies, geographic information etc.
4747
The Semantic Web: an The Semantic Web: an Optimistic ScenarioOptimistic Scenario * *
4848
RDF extractors/converters
Documents- XML, HTML, Text... Databases
ontologies OWL
SPARQL** engine
* Influenced by http://www.w3.org/2007/Talks/0223-Bangalore-IH/Slides.html#(36)** OWL enabled SPARQL or another query language
RDF Data
SQL-SPARQL “bridge”
Software Applications
The Semantic Web: The Semantic Web: ApplicationsApplications
Data IntegrationData Integration Knowledge ManagementKnowledge Management Semantic SearchSemantic Search Management of multimedia dataManagement of multimedia data Ontology-oriented software Ontology-oriented software
developmentdevelopment and others...and others...
4949
The Semantic Web: The Semantic Web: ApplicationsApplications
Corporate Semantic Web - a high-impact Corporate Semantic Web - a high-impact technology according to technology according to Gartner 2006 mainstream adoption in 5-10 yearsmainstream adoption in 5-10 years
5050
WEB SERVICESWEB SERVICES
5151
Web ServicesWeb Services
The initial problem: writing a The initial problem: writing a software software application application for analysis of financial productsfor analysis of financial products
A possible solution: A possible solution: each company publishes each company publishes on the Web on the Web a set of a set of
callable callable “functions” “functions” which return the data about which return the data about the productsthe products
the the functionsfunctions are are calledcalled by the application (as by the application (as in regular programming languages)in regular programming languages)
• ETFInfo.getManagementFee(“KesemNikkei”)ETFInfo.getManagementFee(“KesemNikkei”)
• ETFInfo.getBaseCurrency(“KesemNikkei”)ETFInfo.getBaseCurrency(“KesemNikkei”)
5252
Web ServicesWeb Services
Web Services Web Services - the standard way to call - the standard way to call ““functions”functions” over the over the WebWeb
Set of standard protocols for Set of standard protocols for invocationinvocation, , publishingpublishing and and locatinglocating software software applications across the Webapplications across the Web Based on Based on HTTPHTTP and and XMLXML
The protocols :The protocols : SOAP - invocationSOAP - invocation WSDL - publishingWSDL - publishing UDDI - discoveryUDDI - discovery
5353
Publishing RDF + XSL + Web Publishing RDF + XSL + Web ServicesServices
5454
WebSite
XSL stylesheet
Web Browser with XSLT support
RDF/XML
RDF/XML
Web Services
XML messages
SOAP - SOAP - Simple Object Access Simple Object Access ProtocolProtocol
Applications are invoked by sending an Applications are invoked by sending an XML message XML message ((requestrequest) in the SOAP ) in the SOAP format over HTTP to a specific serviceformat over HTTP to a specific service identified by a URLidentified by a URL
The request contains specifications of the The request contains specifications of the requested operation and of the parameters requested operation and of the parameters to itto it
An An XML message XML message ((responseresponse)) with the with the result is sent back by the Web Serviceresult is sent back by the Web Service
5555
SOAP ExampleSOAP Example
abstraction over calling a function:abstraction over calling a function: float managementFee = float managementFee =
getManagementFee(“Kesem Nikkei”);getManagementFee(“Kesem Nikkei”); a a requestrequest with the name of the operation with the name of the operation
“getManagementFee” and the string “getManagementFee” and the string paremeter “Kesem Nikkei” is sent to the paremeter “Kesem Nikkei” is sent to the serviceservice
a a responseresponse with the float return value is with the float return value is sent backsent back
5656
SOAP ExampleSOAP Example
A SOAP requestA SOAP request
5757
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body> <getManagementFee soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > <Title xsi:type="xsd:string"> Kesem Nikkei </Title>
</getManagementFee > </soapenv:Body></soapenv:Envelope>
SOAP ExampleSOAP Example
A SOAP responseA SOAP response
5858
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body> <getManagementFeeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > <ManagementFee xsi:type="xsd:float"> 0 </ ManagementFee >
</getManagementFeeResponse > </soapenv:Body></soapenv:Envelope>
WSDL - WSDL - Web Services Web Services Description LanguageDescription Language
Written in Written in XMLXML DefinesDefines
functionalityfunctionality the Web Service provides the Web Service provides• operationsoperations• types of the parameterstypes of the parameters• types of the return valuestypes of the return values
data encoding and communication protocolsdata encoding and communication protocols location of the servicelocation of the service
Formal description Formal description makes possible makes possible automatic generation of code stubs on the automatic generation of code stubs on the client and the server sidesclient and the server sides
5959
WSDL ExampleWSDL Example
An abstraction of a Java interface :An abstraction of a Java interface :
interface interface ETFInfoETFInfo { {
floatfloat getManagementFeegetManagementFee((StringString title); title);
StringString getBaseCurrencygetBaseCurrency((StringString title); title);
}}
6060
WSDL ExampleWSDL Example
6161
<?xml version="1.0" encoding="UTF-8"?><description xmlns="http://www.w3.org/ns/wsdl" > <types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.xnes.co.il" > <xsd:element name="Title" type="xsd:string"/> <xsd:element name=“ManagementFee" type="xsd:float"/> ... </types> <interface name="ETFInfo"> <operation name="getManagementFee" pattern="http://www.w3.org/ns/wsdl/in-out"> <input messageLabel="In" element="t:Title"/> <output messageLabel="Out" element="t:ManagementFee"/> </operation> <operation name="getBaseCurrency" pattern="http://www.w3.org/ns/wsdl/in-out"> <input messageLabel="In" element="t:Title"/> <output messageLabel="Out" element="t:BaseCurrency"/> </operation>
... </interface><!-- protocols, WebService location, etc. -->...</description>
Web Services - the ProblemWeb Services - the Problem
The problem is with The problem is with automaticautomatic compositioncomposition of Web Servicesof Web Services differentdifferent companies provide different Web companies provide different Web
ServicesServices• different different operation namesoperation names• different different parameter namesparameter names
Web Services descriptions is Web Services descriptions is syntacticsyntactic• parameters/return values parameters/return values
types are specifiedtypes are specified the semantics is not specified the semantics is not specified
Currently, the composition and discovery of Web Currently, the composition and discovery of Web Services is done Services is done manuallymanually
6262
The solution - Semantic Markup of The solution - Semantic Markup of Web ServicesWeb Services
The Web Services descriptions can be The Web Services descriptions can be tagged by RDF statementstagged by RDF statements operationsoperations parametersparameters return valuesreturn values preconditionspreconditions postconditionspostconditions
6363
The solution - Semantic Markup of The solution - Semantic Markup of Web ServicesWeb Services
Using Using ontologiesontologies for for reasoningreasoning about about parameters, return values, preconditions etc.parameters, return values, preconditions etc. about Web Services themselvesabout Web Services themselves
Semantic Reasoning Semantic Reasoning can be applied to the can be applied to the Web Service RDF descriptions and Web Service RDF descriptions and ontologiesontologies integrating information integrating information from different Web from different Web
ServicesServices composingcomposing Web Services Web Services matchmakingmatchmaking between between consumersconsumers and and
producersproducers of Web Services of Web Services
6464
““Composing Web Services on the Composing Web Services on the Semantic Web”Semantic Web”, B. Medjahed , B. Medjahed et. al., VLDB Journal 2003et. al., VLDB Journal 2003
6565
Web Services CompositionWeb Services Composition
6666
ETF information Web Service
Stock Exchange Web Service
Bank Web Service
Securities Ranking Web Service
ETF purchase composite
Web Service
““Composing Web Services on the Semantic Composing Web Services on the Semantic WebWeb””
An An ontology ontology for Web Servicesfor Web Services A A customcustom web services web services description description
languagelanguage based on based on XMLXML
Using Using URIsURIs and existing and existing taxonomiestaxonomies for for providing semantics to the descriptions of providing semantics to the descriptions of operations and their parametersoperations and their parameters
A A custom algorithm custom algorithm for composing web for composing web servicesservices
6767
““Composing Web Services on the Composing Web Services on the Semantic Web”:WeaknessesSemantic Web”:Weaknesses
TheThe ontology ontology - using DAML-OIL (an - using DAML-OIL (an alternative to OWL). However, the authors alternative to OWL). However, the authors did not describe how exactly they used the did not describe how exactly they used the ontologyontology
Custom matching algorithm Custom matching algorithm - not using - not using standard technologies the authors missed standard technologies the authors missed the opportunity to use existing tools for the opportunity to use existing tools for logical reasoninglogical reasoning
6868
““Composing Web Services on the Composing Web Services on the Semantic Web”:WeaknessesSemantic Web”:Weaknesses
UsingUsing URIs URIs of terms in existing of terms in existing taxonomies on the Web. However, the taxonomies on the Web. However, the authors missed the opportunity to reuseauthors missed the opportunity to reuse existing ontologiesexisting ontologies
• specifying synonyms for parameter typesspecifying synonyms for parameter types• specifying sub-class relationships between specifying sub-class relationships between
parameter typesparameter types RDF related toolsRDF related tools
• query languagesquery languages
6969
““Software Framework For Software Framework For Matchmaking Based on Matchmaking Based on Semantic Web Technology”Semantic Web Technology”, , L.Li et. al., International Journal L.Li et. al., International Journal of Electronic Commerce 2004of Electronic Commerce 2004
7070
Web Services MatchmakingWeb Services Matchmaking
7171
Request)Management Fee < 0.5,%
Dividend > 70(%
Advertisement1)Management Fee = 0.3,%
Dividend = 80(%
Advertisement2)Management Fee = 0.6,%
Dividend = 100(%
Advertisement3)Management Fee = 0,%
Dividend = 30(%
MatchmakingSystem
““Software Framework for Matchmaking Software Framework for Matchmaking Based on Semantic Web Technology”, L.Li Based on Semantic Web Technology”, L.Li et. al., 2004et. al., 2004 The The requestsrequests and and advertisementsadvertisements are are
expressed in an expressed in an ontology languageontology language in particular, constraints on the operation in particular, constraints on the operation
parametersparameters The matchmaking is done by an existing The matchmaking is done by an existing
Description Logic Description Logic reasoning toolreasoning tool The experiments showed that Description The experiments showed that Description
Logic reasoning technology can be used in Logic reasoning technology can be used in large scale e-commerce applications large scale e-commerce applications (the (the performance is reasonable)performance is reasonable)
7272
BibliographyBibliography ““A Semantic Web Primer”A Semantic Web Primer”, G. Antoniou and F.van Harmelen, , G. Antoniou and F.van Harmelen,
20042004 “State of the Semantic Web”, I. Herman, 2008, I. Herman, 2008 “SPARQL tutorial”, , JenaJena - - A Semantic Web Framework for A Semantic Web Framework for
JavaJava “Description Logics course” , E.Franconi, E.Franconi “Gartner's 2006 Emerging Technologies Hype Cycle Highlight
s Key Technology Themes”, , Gartner,Inc., Gartner,Inc., 20062006
““Composing Web Services on the Semantic Web”Composing Web Services on the Semantic Web”, B. , B. Medjahed et. al., VLDB Journal 2003Medjahed et. al., VLDB Journal 2003
““Software Framework For Matchmaking Based on Semantic Software Framework For Matchmaking Based on Semantic Web Technology”Web Technology”, L.Li et. al., International Journal of , L.Li et. al., International Journal of Electronic Commerce 2004Electronic Commerce 2004
7373