Table of Contents
Prerequisites
Make sure that you have the following on a machine that has a public IP Address/Domain Name
- Download caGrid-1.3
- Install caGrid-1.3
- Check only the Install/Configure caGrid software
- Mention target grid as Training Grid for caGrid-1.3
- Select grid service container as tomcat
- caCORE SDK generated object model i.e., SDKArgoPeople.uml created in part 1 of this tutorial
Generate Domain Model
All caGrid data services are required to expose a domain model in their service metadata. This domain model describes the classes available in the data service, as well as their attributes, and relationships to one another. Using this model, a client can formulate queries, and discover data services which contain information they may be interested in. Additionally, the data service itself can use this information to validate queries for their correctness and map domain objects to their XML document representations. Models may be supplied from the caDSR, or from the local file system.
To create a domain model for our person object model, do the following:
cd $CAGRID_LOCATION/projects/dataExtensions ant xmiToDomainModel
- Browse to the UML object model file created with ArgoUML (SDKArgoPeople.uml) in part 1 of this tutorial
- Select XMI Type as SDK 4.0 XMI from ArgoUML
- Type in a project short name and version
- Click OK
- Choose a location to save your domain model and type in a name along with the .xml file extension
Define the Service
- Launch Introduce
cd $CAGRID_LOCATION ant introduce
- Select Create caGrid Service Skeleton from the toolbar at the top of the Introduce portal, or select Tools -> Create caBIG Service from the menu. The Create caBIG Grid Service screen will appear.
- Choose a directory in which to place the generated service, for eg., /home/user/Person
- Type in the Service Name as Person
- Type the Package Name as edu.uab.uabgrid.cacoresdk.domain, same as in step 4 of part 1
- The Namespace will be auto-filled from the package and service names
- Select the Data Service radio button from the Customize Service section.
- Click Create
Configure Data Service
The caGrid data services extension provides a pluggable framework for creating highly custom data services known as data service styles. Styles may be provided by a third party, or installed with caGrid. Styles are provided to create data services backed by various caCORE SDK.
Select Service Style
When the data service configuration window appears,
- Select the service style as caCORE SDK 4.1
- Leave the rest unchecked
- Click OK
Configure Service
- When the following panel appears, Browse to the location where you've installed caCORE SDK-4.1. The wizard reads this directory and auto-locates the relevant files and properties defined inside
- Click Next->API Type
Configure Security
- Select API Type as Remote API
- Type in your machine's Hostname (either FQDN/IP address)
- Type in the Port Number to which your tomcat is configured to (default will be 8080)
- Click Next: Login. Since this is a simple data service, we have not enabled security when generating the object model with caCORESDK. So, we can skip this step.
- Click Next: Domain Model
Configure Domain Model
- For Domain Model Source, from the pull-down menu select Pre-Generated
- Browse to the Model Filename saved in step 6 of the Generate Domain Model
- Click Next: Schemas
Map Package to Schema
- Every class exposed by the domain model must be supplied with a corresponding XML schema representation so it may be utilized in the grid. The mapping panel of this wizard streamlines this process by simultaneously generating the mapping from model to schema and configuring serialization of the XML data types to correspond to the domain model's Java beans.
- Packages from the domain model are listed, along with a suggested XML schema namespace, a mapping status, and a button to manually resolve the mapping for each package. This panel contains two buttons which serve as convenience methods for mapping a large batch of packages to their schemas. The 'Map From GME' button attempts to locate the suggested namespaces in the Global Model Exchange service and pull the corresponding schemas. The 'Map From Config' button makes use of the XML schemas provided by the caCORE SDK's output to map to each package of the domain model.
- Click Automatically Map From SDK Generated Schemas
- If this operation succeeds, the mapping status of each package will change from 'No Schema Assigned' to 'OK', and the 'Done' button will be enabled.
- Click the Done button
Deploy the Data Service
Continue to deploy the introduce created data service to tomcat









