Deployment Descriptor Guide

Creating Deployment Discrypters

You need to create three deployment descriptors.

Application Description Document

Describe a application in a certain host and there must be a Host Description that is bound to each Application Description. Following is a sample application description. It's format is defined in Schema for the Application Description.

		
<ApplicationDescription xmlns="http://www.extreme.indiana.edu/namespaces/2004/01/gFac"
            xmlns:lead="http://www.extreme.indiana.edu/lead">
    <applicationName targetNamespace="http://www.extreme.indiana.edu/lead">lsApp</applicationName>
    <deploymentDescription>
        <hostName>rainier.extreme.indiana.edu</hostName>
        <executable>/bin/ls</executable>
        <workDir>/tmp</workDir>
        <tmpDir>/tmp</tmpDir>
    </deploymentDescription>
</ApplicationDescription>

Note here we are saying the /bin/ls is installed in host, rainier and we give the application a name. The Service will refer to the application by the name. You should change the host name to some host where you going to run the application. That host must have Globus toolkit installed!!. To learn more about "How to create a New application description" please refer to this Tutorial

Host Description

Usually these are added by the system administrators and they explain the environments in the host. However as you are running your test application you need to add this. Very simple host description will be like this. It's format is defined in Schema for the Host Description.

<HostDescription xmlns="http://www.extreme.indiana.edu/namespaces/2004/01/gFac"
            xmlns:lead="http://www.extreme.indiana.edu/lead">
    <hostName>rainier.extreme.indiana.edu</hostName>
    <hostConfiguration>
        <gFacPath>/u/hperera/cvscode/lead/codes/SecureGFac</gFacPath>
        <java>
            <name>java1.5</name>
            <path>/l/jdk1.5/bin/java</path>
        </java>
        <tmpDir>/tmp</tmpDir>
    </hostConfiguration>
</HostDescription>

You should update the Host name to your host where you going to run the application (That host must have Globus toolkit installed!!). And gFacPath is Gfac location at that host. Unzip the Gaf zip file in that host and points this value to unzipped location. To learn more about "How to create a New Host description" please refer to this Tutorial. It's format is defined in Schema for the Service Description.

Service Map File

This is a abstract description of the service. This defines the methods, and the association between the applications and methods. For each type of Service there must be a corresponding Service Map document. Following is a sample Service Map documents

<ServiceMap xmlns="http://www.extreme.indiana.edu/namespaces/2004/01/gFac"
            xmlns:lead="http://www.extreme.indiana.edu/lead">
    <service>
        <serviceName targetNamespace="http://www.extreme.indiana.edu/lead">LsService</serviceName>
    </service>
    <portType>
    <method>
        <methodName>Run</methodName>
        <application paramValuesOnly="true">
            <applicationName targetNamespace="http://www.extreme.indiana.edu/lead">lsApp</applicationName>
            <description>Echo the first input</description>
        </application>
        <inputParameter>
            <parameterName>inparam1</parameterName>
            <parameterType>String</parameterType>
        </inputParameter>
        <outputParameter>
            <parameterName>outparam1</parameterName>
            <parameterType>StdOut</parameterType>
        </outputParameter>
    </method>
    </portType>
</ServiceMap>

Finally this Service description explains the service. The Service will have the name LsService and it will have a operation called Run. It will take one input parameter and produce one output parameter. The return value is standard output of the application. You could have other types as out put parameters. However in that cases

  1. If the return type is StdOut or StdErr it will return the standard output or standard error of the application
  2. If return type is URI, URIArray, LEADFileID, LEADFileIDArray if your application generate any files in output to outputData directory. They will be retuned as results. Your application will get this outputData directory as environment variable outputData
  3. For any type if you print in to your standard out results as name value pairs, they will be returned as responses

To learn more about how to write a service map file please refer to the Gopi's tutorial

Create a new Service using three deployment descriptors

Application name must match between the Service Map file and application descriptions and host name must match between the Host Description and Application Descriptions. You can create your copies by taking above three and updating host name, Gfac path and Java home path. Save Application description file to rainier-ls.xml, Host description file to host.xml (change foo according to your host name) and Service Map file to LsService.xml file

  1. Create a property file for your service in same directory as the three deployment descriptors. For an example following is a simple property file, ls.properties
    serviceMapFile =  LsService.xml
    appDescFile = rainier-ls.xml
    hostDescFile = host.xml
    port = 12344
    
    More Options can be found from the reference documents.
  2. To start the service, From the directory where you have the properties file run
    	$export GFAC_HOME=<path-to-gfac>
    	$$GFAC_HOME/run.sh ls.properties
    

    if service is successfully started it it prints

    	....
    	Service WSDL is available from http://host:port/?wsdl
    	
  3. Shell will hangs while service is running. You can stop the service by pressing Ctrl+C.

Invoke your Service Using Command line Client

  1. You need WSDL url of the Gfac service you just created from what service print to the screen
  2. Run the command $GAFC_HOME/client.sh wsdl-url Run inparam1=/home/<user-name>

The applcation will run the ls on your home directory and the client will print result


Copyright © 2002-2006 The Trustees of Indiana University. All rights Reserved.