how to install and use owl-s composer inside eclipse ide composer … · how to install and use...

31
How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1. Minimal configuration - Java 1.6 can be downloaded at http://java.sun.com/javase/downloads/widget/jdk6.jsp - Apache Tomcat 6.0 can be downloaded at http://tomcat.apache.org/download-60.cgi - Eclipse Ganymede JEE with necessary plugin to run OWL-S Composer can be downloaded at http://www.lasid.ufba.br/pessoal/danielaclaro/download/eclipse_versaomix.zip Unzip into directory C:\ Note: It is important that configuration be exactly as mentionned above.. - Axis 2-1.4 (this version must be used for compatibility reasons) http://www.lasid.ufba.br/pessoal/danielaclaro/download/axis2-1.4.1- bin.zip Unzip into directory C:\ 2. Configuring TomCat inside Eclipse IDE - Start Eclipse IDE - Select menu Window -> Preferences -> Server -> Installed Runtimes - Click on Add... and the dialog box New Server Runtime opens. Select Apache Tomcat v6.0

Upload: others

Post on 06-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

How to install and use OWL-S Composer inside Eclipse IDE

Authors: Manuele Ferreira and Daniela Claro

1. Minimal configuration

- Java 1.6 can be downloaded at http://java.sun.com/javase/downloads/widget/jdk6.jsp

- Apache Tomcat 6.0 can be downloaded at http://tomcat.apache.org/download-60.cgi

- Eclipse Ganymede JEE with necessary plugin to run OWL-S Composer can be downloaded at http://www.lasid.ufba.br/pessoal/danielaclaro/download/eclipse_versaomix.zip

Unzip into directory C:\

Note: It is important that configuration be exactly as mentionned above..

- Axis 2-1.4 (this version must be used for compatibility reasons) http://www.lasid.ufba.br/pessoal/danielaclaro/download/axis2-1.4.1-

bin.zip

Unzip into directory C:\

2. Configuring TomCat inside Eclipse IDE

- Start Eclipse IDE

- Select menu Window -> Preferences -> Server -> Installed Runtimes

- Click on Add... and the dialog box New Server Runtime opens. Select Apache Tomcat v6.0

Page 2: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Next and select the directory (path) where Tomcat was installed.

- Verify if the JRE selected is the properly version for your Apache Tomcat (we are here using version 6.0). If necessary, you can click

on Installed JREs... to add JDKs inside Eclipse IDE.

Page 3: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Finish

3. Configuring Apache Axis in Eclipse IDE

- Select Window -> Preferences -> Web Services -> Axis2 Preferences

- Select Axis2 Runtime and write the path of Axis2 inside your computer.

Page 4: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click OK

Page 5: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

4. Creating a Web service

- Select in Eclipse IDE File -> New -> Other... -> Web -> Dynamic Web Project

- Click on Next

- Insert a name for your project Dynamic Web Project, i.e. Calculator.

Page 6: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Then you click on Modify in Configuration and select Axis2 Web Services and then OK.

Note. Do not forget to check Axis2 Web Services as below.

- Click on Next and then Finish

- This process is going to create a dynamic Web project in your workbench.

Page 7: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Create a Java class into ws package. This class must have sum and subtract methods of your Calculator. Those methods should

have two parameters as seen in Figure below.

Page 8: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Select Calculator.java, click with your right button and select New -> Other... -> Web Services -> Web Service and then click on Next and the next screen should appear:

Page 9: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Web Service runtime link to select Axis2 runtime. Select Apache Axis2 and then click OK.

Page 10: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Clique OK.

Note: You should verify if you have chosen the right server and project as below:

Page 11: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Next.

Page 12: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Next

Page 13: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Start Server to test your web server .

Page 14: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Next and Finish.

Page 15: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

5. Testing your Web service

- Select your right button Calculator dynamic Web project and select Run -> Run As -> Run on Server.

- Click on Next

Page 16: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Finish

Page 17: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Servlet container is going to deploy Axis2 server webapp and Axis2 webpage is going to appear in your browser.

Note: If this web Page does not appear correctly in your web browser, it can be a problem within access enpoint. Try this url: http://localhost:8080/Calculator/axis2-web/index.jsp.

Page 18: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Services link to see all available Web Services. You new web service Calculator can be seen in this webpage.

- Click on Calculator Service link to to view the WSDL of your new Web service.

Page 19: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

6 –Creating Semantic Web Services

- Copy your WSDL file and paste inside wsdl package of Calculator project.

- Click with your right button on WSDL file and select Owl-s Composer > Convert to owl-s

Page 20: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Verify is your WSDL is correct and determine a namespace and clink on Finish.

Page 21: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Refresh your project and verify is a new directory called owls was created within all owls files generated from your Calculator class.

Page 22: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1
Page 23: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

7 – Creating a Semantic Web service Composition

- Click with you right Button onto the name of your project and select New > Other > OWL-S Composer > OWL-S Diagram

- Click on Next. You should define a name for your composition into Service Name and a namespace to your composition. Inside

Inputs area, click on “add” and add all input parametersof of this Web service. On Outputs area, click on "add" and create the

output of your composition.

Note: It is important to notice that as it is a semantic web service, parameters types should follow XMLSchema.

Page 24: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Next. Select the base directory which have all owl-s files that are going to be imported soo as to generate your composition. In our example, our directory is called owls.

Page 25: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click on Next. Define a name for the file which is going to store your graphical composition.

Note: do not remove the extension .owls_diagram.

- Click on Finish.

Page 26: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

The code of the XX.owls_diagram opens automatically. Close this file and open it again using a double-click on the same file inside project directory.

A new screen opens with na empty place to model graphically your composition. Such white area is where your composition is visually

composed. At the right side you can see a menu with all components necessary to create your own composition web service.

In order to use one of those components you should click on menu and then click again inside the white area. You should Assign each

component, thus drag the component base and drop on other component. All web services available to be composed are located in

Imported Process and their structures supported by Processes.

- Create a structure sequence inside such white area and add your first web service sum and then subtraction.

Page 27: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Drag-and-drop the external area of your composition to your first web service, showing the mapping between those two parameters

defined inside the wizard. Make all other necessary arrangement to your composition.

Page 28: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click with your right Button on arrow and select Show Properties View. Thus a form opens in the down bord of Eclipse where you can map all inputs and outputs parameters.

Page 29: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

The screen below appears with all mappings for Input and Output parameters.

Page 30: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

- Click with your right button on diagram file and select Owl-s Composer > Generate owls file. Verify if the address is correct and click on Finish.

- Refresh your project and verify if a owls was created inside your project directory. This file was generated corresponding to your

graphical composition.

Page 31: How to install and use OWL-S Composer inside Eclipse IDE Composer … · How to install and use OWL-S Composer inside Eclipse IDE Authors: Manuele Ferreira and Daniela Claro 1

Click with your right button on the owls file generated and then Execute Composition to execute your composition. All input

values are going to appear, thus you can input your values for your Calculator. Then all services inside the composition are executed and the results are presented.