PhotoSharing Operations
| |
|
|
| |
Table of Contents
|
|
| |
|
|
Operations
Over the following steps we'll be adding all of the operations for our service. The steps are similar for each operation.
- Create the method
- Specify the input parameters
- Specify the output parameters
- Specify error handling via faults
Methods to be created:
| createGallery | grantViewGalleryPrivileges |
| listGalleries | revokeViewGalleryPrivileges |
| getGalleryName | grantAddImagePrivileges |
| addImage | revokeAddImagePrivileges |
| listImages | listUsersWithViewPrivileges |
| getImage | listUsersWithAddPrivileges |
createGallery
Output
|
Faults
|
listGalleries
getGalleryName
addImage
listImages
getImage
grantViewGalleryPrivileges
revokeViewGalleryPrivileges
grantAddImagePrivileges
revokeAddImagePrivileges
listAllUsersWithViewPrivileges
listAllUsersWithAddPrivileges
Add Service Properties
|
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

Copying required dependencies
Copying required dependencies
The PhotoSharing service requires several jars from the GridGrouper to run. We'll need to copy the jars into the service.
- Open a Windows Command Prompt
- Change directory to your Hackathon directory:

%> cd C:\hackathon
- Copy files to the service

%> ant installJars
Copying the modified code
Copying the modified code
In the previous steps, we created all of the interfaces for the the PhotoSharing service. Introduce has produced skeleton code for those interfaces but we still need to implement the code for the service. Please run the following batch file to copy already completed code into your service.
- Using a Windows Command Prompt
- Change directory to your Hackathon directory

%> cd C:\hackathon
- Copy files to the service

%> ant copySources
Review copied code
Even though we've copied code into the service. Please take a couple minutes to review the code in the following files:
- PhotoSharingImpl.java
- GalleryImpl.java
- PhotoSharingResource.java
- GalleryResource.java
Conclusion
We have now finished creating our photoSharing service! This service should match the completed one provided in the hackathon.zip which we used earlier. Our new service should function the same way when deployed and invoked. We have also completed the analytical service tutorial! We hope that this has helped you to understand the capabilities and security of caGrid. Visit caGrid 1.3 Tutorials for other tutorials or return to caGrid for other information.





