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

Post on 06-Jul-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

- 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.

- 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.

- Click OK

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.

- 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.

- 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.

- 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:

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

- Clique OK.

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

- Click on Next.

- Click on Next

- Click on Start Server to test your web server .

- Click on Next and Finish.

5. Testing your Web service

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

- Click on Next

- Click on Finish

- 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.

- 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.

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

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

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

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.

- 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.

- 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.

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.

- 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.

- 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.

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

- 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.

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.

top related