Create and Modify the Service Skeleton
caCORE Datatype Mapping Extension
Since the release of caGrid, various users have requested the ability to use types from caCORE-SDK generated schemas in their analytical service. A new community project, caCORE Datatype Mapping Extension, was created to address this need.
We'll be using this extension as part of this tutorial and have already installed it in the hackathon setup. If you're interested in learning more about it, you can obtain more information about it on the caGrid Wiki at: caCORE Datatype Mapping Extension Home
Create the Service Skeleton
This phase of this tutorial involves starting the Introduce toolkit and using it to create the skeleton of the new grid service.
Open a Windows Command Prompt
- Click Start->Run and type cmd, then press the Enter key
- Change directory to the caGrid Installer:
%> cd c:\hackathon\caGrid
- Start Introduce using the provided Ant task:
Once Introduce has been started, we can begin to create the service skeleton.
|
Create the Service Skeleton
- Click the Create Service Skeleton button on the toolbar at the top of the Introduce portal. The Create caGrid Service Skeleton screen will appear (see right).
- Type the following as your service directory C:\hackathon\PhotoSharing.
- Type PhotoSharing in the Service Name field.
- Type org.cagrid.demo.photosharing in the Package Name field.
- Verify that the Namespace field contains http://photosharing.demo.cagrid.org/PhotoSharing
.
- Click the Create button.
|
Create caGrid Service Skeleton
|
|
|
|
|
Add caCORE Data Types
Now that we have created the service skeleton, we want to modify the service. The Modify Service Interface for our PhotoSharing service will open automatically once Introduce finishes creating the skeleton. The first step in modifying our service will be to add caCORE Data Types.
- Click the Types tab
- Select the caCORE SDK tab in the Import Data Types section
- Select caCORE SDK v4.1 from the caCORE SDK Version drop down.
- Set C:\hackathon\caCORE_SDK_411 to the caCORE SDK directory.
- Click the Add button
|
caCORE Data Types
|
|
|
|
|
Add Gallery Service Context
|
Next, we will add a gallery service context.
- Click the Services tab.
- Click Services element in the Services box.
- Click Add Service Context.
|
Add Service Context
|
|
|
|
|
Modify the Gallery Service Context
|
Modify the gallery service context:
- Set Gallery to Service Name
- Set "http://photosharing.demo.cagrid.org/PhotoSharing/Gallery" to Namespace.
- Set org.cagrid.demo.photosharing.gallery to Package Name.
- Uncheck secure in the Resource Framework Options
|
Modify Service Context
|
|
|
|
|
Configure Secure Communications
|
Modify the Security of the Gallery Service Context:
- Click the Security tab
- Click Custom option
- Check the Transport Layer Security option
|
Configure Security
|
|
|
|
|
Authorization Mechanism
|
Change the Authorization Mechanism:
- Select the Authorization tab
- Select Enforce Authentication from the Authorization Mechanism drop down box.
- Click the Done button
|
Modify Authorization Mechanism
|
|
|
|
|
Save Your Service
Save Your Service!
Remember to save your service. Introduce will allow you to roll back to a save point. This can be very useful in the event that you run into problems.
Click the Save button at the bottom of the "Modify Service Interface"

Modify the Main Service Context
|
We will enable secure access to your service via Introduce.
- Click the Services tab.
- Select PhotoSharing.
- Click Modify Service
|
Modify Main Service
|
|
|
|
|
Authentication Requirements
|
Add authentication requirements.
- Click the Security tab.
- Select Custom.
- Check Transport Layer Security
|
Add Authentication
|
|
|
|
|
Authorization Mechanism
|
Change the Authorization Mechanism:
- Select the Authorization tab
- Select Enforce Authentication from the Authorization Mechanism drop down box.
- Click the Done button
|
Change Authorization Mechanism
|
|
|
|
|
Save Your Service
Save Your Service Again!
Remember to save your service again. Introduce will allow you to roll back to a save point. This can be very useful in the event that you run into problems.
Click the Save button at the bottom of the "Modify Service Interface"
