The purpose of this document is to illustrate how to create an analytical service using Introduce and the ISO21090 data type extension. The tutorial explains both how to install the extension using the software update tool and how to use the extension to create a simple analytical service.
The completed service in this tutorial is available from SVN repository and can be checked out through anonymous access with the following command:
1. Launch Introduce and click the Create Service Skeleton button. Enter service information and click the Create button.
2. In the Import Data Types area under the Add/Remove Types tab, click the ISO21090 tab.
3. Click the Add button to add the ISO21090 data types to the service. These will now be listed on the left column.
4. Next, add an operation to the service using one of the ISO21090 types. Click the Services tab. Click Operations and then the Add Method button to the right.
5. Define a sendAd operation that takes an Ad object as input and returns an Ad object as output:
- Type "sendAd" for Method Name.
- Type "Send ISO address to the service" for the Method Description.
- For the Inputs tab, double-click Ad from the left.
- Click the Outputs tab. Double-click Ad from the left. Click the Done button.
6. Click Save to save the service.
Next, implement the client and server-side code:
1. In the service directory, open the following file in a text editor:
2. Copy and paste the following imports in the beginning of the file:
3. Find the Main method.
4. Then copy and paste the following:
5. Save the file.
6. Open the following file:
7. Copy and paste the following imports in the beginning of the file:
8. Replace this:
9. Save the file.
Next, deploy the service to a container. For complete details on deployment, please see the Grid Service Deployment Guide.
- If Introduce is closed, restart it from a command prompt:
- Click Deploy Service and browse to the service directory.
- Choose a container (Note: Tomcat is recommended) and configure other settings if needed. Refer to the aforementioned Grid Service Deployment Guide for complete details.
- Click Deploy
Start the Tomcat container with a command prompt.
Run the test client to verify that the service is working.
- In a command prompt:
- Alternatively, verify by opening a web browser and entering the service's URL: "http://localhost:8080/wsrf/services/cagrid/ISO21090AnalyticalService". You should see the following: