Web Service Modeling Language
From Wiki
(Redirected from WSML)
This article is a stub. You can help us by expanding it.
Example
We take as example the Currency Converter Service offered by http://www.webservicex.com/. You will learn how to extract ontologies from the WSDL file of the service.
Currency Converter Service Ontology
The ontology is created based on the web service's description file. Below is an excerpt from http://www.webservicex.com/CurrencyConvertor.asmx?wsdl:
<s:element name="ConversionRate">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="FromCurrency" type="tns:Currency"/>
<s:element minOccurs="1" maxOccurs="1" name="ToCurrency" type="tns:Currency"/>
</s:sequence>
</s:complexType>
</s:element>
<s:simpleType name="Currency">
<s:restriction base="s:string">
<s:enumeration value="EUR"/>
<s:enumeration value="USD"/>
...
</s:restriction>
</s:simpleType>
<s:element name="ConversionRateResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="ConversionRateResult" type="s:double"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="double" type="s:double"/>
The WSML ontology is:
wsmlVariant _"http://www.wsmo.org/wsml/wsml-syntax/wsml-flight"
namespace { _"http://oxygen.informatik.tu-cottbus.de/ontologies/currencyConverter/currencyConverterOntology#"
,
dc _"http://purl.org/dc/elements/1.1/",
xsd _"http://www.w3.org/2001/XMLSchema#",
wsml _"http://www.wsmo.org/wsml/wsml-syntax#"
}
ontology _"http://oxygen.informatik.tu-cottbus.de/ontologies/currencyConverter/currencyConverterOntology"
nonFunctionalProperties
dc#type hasValue _"http://www.wsmo.org/2004/d2#ontologies"
dc#description hasValue "Ontology for Currency Conversion"
dc#subject hasValue "Currency Converter"
dc#identifier hasValue _"http://oxygen.informatik.tu-cottbus.de/ontologies/currencyConverter/currencyConverterOntology"
dc#title hasValue "Ontology for webservicex.com CurrencyConverter web service"
wsml#version hasValue "$Revision: 1 $"
dc#format hasValue "text/html"
dc#language hasValue "en-US"
dc#creator hasValue "Emilian Pascalau"
dc#date hasValue "2008-04-26"
endNonFunctionalProperties
concept ConversionRate
nonFunctionalProperties
dc#description hasValue "conversion rate definition"
endNonFunctionalProperties
FromCurrency ofType (1 1) xsd#string
ToCurrency ofType (1 1) xsd#string
concept ConversionRateResponse
nonFunctionalProperties
dc#description hasValue "currency converter response"
endNonFunctionalProperties
ConversionRateResult ofType (1 1) xsd#double
axiom FromCurrencyConstraint
definedBy
!- ?x memberOf ConversionRate
and ?x[FromCurrency hasValue ?type]
and (?type = "USD"
or
?type = "EUR").
axiom ToCurrencyConstraint
definedBy
!- ?x memberOf ConversionRate
and ?x[ToCurrency hasValue ?type]
and (?type = "USD"
or
?type = "EUR").

