make allwhich will build the code and install it in OGSA-TP-3. You can also do the intermediate steps of the build explicitly, to see what is going on.
make gensourcegenerates the web-service interface code from the WDSL files in the package. These WSDL files import other WSDL files that are standard for OGSA: the imported files are taken from a web server at Cambridge. The generated code appears in the directory org/astrogrid/ogsa/echo. Code is also generated in org/gridforum and its subdirectories, but this code is already in the jar files of the OGSA-TP-3 installation; the regenerated code is not used in the build.
make compilecompiles both the auto-generated code and the hand-written code in the build directory. The class files for all the code go into org/astrogrid/ogsa/echo.
make jarcollects the class files from org/astrogrid/ogsa/echo into a jar file in the build directory.
make installcopies the jar file and the WSDL files into the OGSA-TP-3 installation (look at makefile for details of locations).
make distcleanremoves all built files from the build directory. This includes all the files needed for the installation and the entire directory tree starting at org. Nothing in or below the build directory is needed to run the service once the built files are installed in OGSA-TP. Finally, you need to edit a configuration file in OGSA-TP-3 to tell OGSA that it has a new service. Edit ${OGSA_HOME}/server-config.wsdd and add these lines after the last
<service name="astrogrid/echo/basic/EchoFactoryService" provider="Handler" style="wrapped"> <parameter name="allowedMethods" value="*"/> <parameter name="className" value="org.astrogrid.ogsa.echo.EchoFactoryImpl"/> <parameter name="persistent" value="true"/> <parameter name="schemaPath" value="schema/core/factory/factory_service.wsdl"/> <parameter name="instanceSchemaPath" value="schema/astrogrid/echo/echo_service.wsdl"/> <parameter name="handlerClass" value="org.globus.ogsa.handlers.RPCURIProvider"/> </service>
java org.globus.ogsa.server.ServiceContainer 8090 &(i.e. run the ServiceContainer? class from OGSA through the Java interpreter). The number 8090 is the IP port-number on which the server listens. You can pick any port-number you like if 8090 isn't suitable. If this operation works, you will gets some progress messages, then a pause of around 30 seconds, then several screens of XML. The XML is actually Web Services Inspection Language (WSIL) and it's a listing of the grid services that the new server is running. If the server doesn't work, you'll get an unhandled exception with a stack dump. If you have failures when running the code, the most likely problem is with your CLASSPATH. You should also check that you are in $OGSA_HOME when starting the server.
java org.globus.ogsa.impl.core.factory.client.CreateService \ http://my.host:8090/ogsa/services/astrogrid/echo/basic/EchoFactoryService \ echo1but replace "my.host:8090" with the name and port-number of your server. Note that this runs a client that is part of the OGSA-TP-3 release; it's not running any code specific to the echo service. In the URL, /ogsa.services is common to all services in the server. The part from /astrogrid/echo distinguishes the particular service. The name of the echo-service instance is the "echo1" parameter; you can call your instance whatever you like. If this operation succeeds, it will print several pages of XML. This XML is WSDL: it's the formal description of the created service-instance. Invoke the instance like this:
java org.astrogrid.ogsa.echo.TestEcho \ ping \ http://my.host:8090/ogsa/services/astrogrid/echo/basic/EchoFactoryService/echo1replacing my.host:8090 with the name and port-number of your server. The class for the client programme is specific to the echo service and is included in ag-ogsa-echo.jar which should be in ${OGSA_HOME}/lib by now. Note that the URL of the service-instance is the URL of its factory followed by the name of the instance. If this works, you will get
- Logging is working Echo: pingwhere the first line is a wart that may be removed in later versions; the second line is the intended result. If you have failures when running the code, the most likely problem is with your CLASSPATH.
![]() |
Click here for the AstroGrid Service Web |
This is the AstroGrid Development Wiki |
|