• Ei tuloksia

2. State of the Art

2.2 Semantic Web Service Technologies

2.2.5 OWL-S Generation

While detailed guidelines for adopting semantic web services in the factory automa-tion setting exist [57], the formulaautoma-tion of semantic descripautoma-tions currently forms a considerable threshold to the industrial application of semantic technologies. For example, Puttonen et al. [84] use the manufacturing system described in [112] as an application scenario for semantic web service composition. The system includes 29 instances of a conveyor service and five instances of a workstation service. To apply semantic web service technologies to the system, it is necessary to create an ontol-ogy model of the system and a semantic description of each of the 34 web service instances. The creation of the semantic service descriptions includes modifying both the service WSDL file and the OWL-S document. While the process can be expe-dited through meticulously planned copy-paste and search-and-replace techniques, it typically results in a considerable delay as well as errors that occur at system run-time and are difficult to trace. Hence, mitigating the effort in producing the complete semantic web service descriptions should considerably reduce the threshold for the industrial adoption of semantic web services in factory automation.

Although the approach presented in this dissertation somewhat increases the

2. State of the Art 24 modifications required to the service WSDL files, it completely automates the cre-ation of service OWL-S description documents. The proposed approach is primarily intended to be used by an autonomous software agent responsible for service com-position based on a goal that is expressed in terms of an OWL domain model.

Therefore, the approach especially focuses on service conditions and effects to the world state, whereas most current literature appears to focus on composing services based on their input and output type compatibility possibly augmented with some service classification criteria.

The service composition framework presented in [76] automates the generation of OWL-S descriptions for web services. Furthermore, it automates even the gen-eration of XSLT transformations between the XML data elements exchanged by the services and the corresponding semantic concepts. In addition, the OWL-S API [108] includes a sample GUI application for generating OWL-S descriptions for WSDL operations. However, the sample application requires the user to manually specify any XSLT transformations and omits service preconditions and effects.

OWL-S incorporates a rather complex syntax, which can form a considerable learning barrier. Therefore, Timm and Gannod [102] have developed a methodology that facilitates the adoption of OWL-S by exploiting the more familiar UML lan-guage. Their approach involves first creating a UML class diagram representing the service ontology using a UML editing tool. For this purpose, they have developed a custom UML profile, in which classes are tagged with stereotypes. The stereotypes indicate to which OWL-S constructs the classes are mapped. The diagram is saved in XMI [122] format and processed by a conversion application. The conversion from XMI to OWL-S is performed by applying XSLT transformations. Figure 2.2 illus-trates the approach. The conversion result is an OWL-S description of the service without agrounding. Timm and Gannod [103] have further developed the approach by creating a software tool which also generates the OWL-S grounding. However, the user is required to specify, for example, a mapping between WSDL operations and OWL-S processes through a graphical user interface [103]. In addition, the tool developed by Timm and Gannod [103] applies the OWL-S API [72] in executing OWL-Sprocesses and allowing the user to monitor the progress.

Figure 2.2: UML diagrams can be automatically converted to OWL-S descriptions by applying XSLT transformations to the saved XMI files.

2. State of the Art 25 Grønmo et al. [26] point out that OWL-S descriptions are typically rather verbose and difficult to read, which may impede an engineer from comprehending them.

Hence, they propose using transformations in both directions between OWL-S and UML to facilitate web service composition. The approach involves first designing the composite process in UML. Then, the individual tasks in the process are transformed into semantic descriptions, which are used in semantic discovery of matching services.

The semantic descriptions of the matching services are transformed into UML for manual examination and selection. Finally, the composite process is constructed from the selected services as a UML model, and a semantic web service description is generated from the model. Although the approach basically sets no restrictions on the used semantic language, and Grønmo et al. [26] describe how WSMO [87]

could also be applied, they have only implemented transformations between UML and OWL-S. Similarly to Timm and Gannod [102], they have developed their own UML profile to be used in the transformations.

Yang and Chung [124] present a UML to OWL-S conversion method that addi-tionally extracts service composition information from UML state diagrams.

Kim and Lee [41] also propose a method for converting UML diagrams to OWL-S processes. Their method is similar to the one proposed by Timm and Gannod [102]

in that UML models are first saved in XMI format and then converted to OWL-S by applying XSLT transformations. Nevertheless, their method, in addition to using class diagrams for representing domain ontologies, also uses sequence and activity diagrams for representing business process behavior. Kim and Lee [42] compare their method with other proposed approaches to converting UML diagrams to OWL-S models, such as that of Grønmo et al. [26]. Kim and Lee [42] point out that their method also allows modeling of complex processes which comprise several control constructs, whereas most of the earlier methods mainly focus on atomic processes.

In addition, experiments carried out by Kim and Lee [42] show that an automatic conversion from UML to OWL-S following their approach seldom results in a higher number of elements than a manual conversion performed by a human expert.

While it is straightforward to create a transformation script that converts XML structure into RDF [20], it is considerably more difficult to define the translation in the opposite direction due to the numerous different ways of serializing a single RDF model to XML [54]. Hence, the XSLT transformation scripts used in lowering schema mappings should consider all possible alternatives of serializing the RDF data. As a solution, the SAWSDL specification [20] suggests using hybrid transformations consisting of two scripts: the first one is a semantic query language expression, such as a SPARQL query, and the last one is an XSLT transformation. As query languages such as SPARQL define only one way of serializing the results into XML, the XSLT transformation is straightforward to write. Unfortunately, the OWL-S

2. State of the Art 26 WSDL grounding allows only a single XSLT transformation script to be defined for each variable through the datatype property xsltTransformationString, and there is no corresponding property for specifying a preprocessing expression, such as a SPARQL query. Nevertheless, a simple XSLT transformation may be sufficient even for lowering schema mappings, since both Timm and Gannod [103] and Pi et al. [76]

present software tools able to automatically generate lowering XSLT transformation scripts based on a mapping from semantic concepts to XML schema entities.

Paolucci et al. [74] examine the similarities between OWL-S and SAWSDL and conclude that SAWSDL annotations provide sufficient information for generating OWL-S service descriptions. However, SAWSDL provides no information allowing the derivation of preconditions and effects for the OWL-S processes [74].

To allow lowering XSLT scripts to prepare for only a very restricted set of for-matting options, the software tool that processes the OWL-S definitions to invoke web services can preprocess the input data to the XSLT scripts. For example, the software tool presented in this dissertation preprocesses the input data so that an XSLT script can assume the input RDF graph to be only a small subgraph rooted at the OWL individual representing the input value. Hence, there is only one possible XML serialization for the input RDF data. The preprocessing approach has been inspired by the OWL-S WSDL grounding implementation included in the OWL-S API [108].

The approach proposed in this dissertation also includes generating the required XSLT scripts unless they have been explicitly specified. Nevertheless, unlike the tools presented in [76] and [103], the software tool presented in this dissertation requires no user interaction during the OWL-S generation process. Instead, the tool is implemented as a web service. In addition, the approach presented also considers the service conditions and effects as well as the data interfaces.

The purpose of SAWSDL annotations in the approach presented in this disserta-tion is somewhat different to their convendisserta-tional use in the literature. For example, Sellami and Boucelma [91], as well as Hobold and Siqueira [28], apply SAWSDL annotations in service discovery and composition. Nonetheless, the generality of the annotations allows them to be applied in a wider range of use cases, and Op-dahl [70] applies SAWSDL annotations in improving the interoperability of different software modeling languages. This dissertation proposes using SAWSDL annota-tions as guidelines for generating the service OWL-S descripannota-tions for web services representing manufacturing devices. In particular, the approach uses SAWSDL an-notations to generate the OWL-S process conditional effects and the XSTL trans-formations used in the OWL-S groundings.

2. State of the Art 27