Back to index page

Getting web services running on the Greenstone 3 server

You need: In this document,


A Preliminary step: need to do this only once

In all likelihood, this step will not be required for versions later than Greenstone 3.03.

B How to deploy web services on Greenstone 3

We'll look at the example of deploying the "QBRSOAPServer" web service which is used by the GS3-webservices-democlient application.
  1. Go into your $GSDLHOME folder and start tomcat by typing in an X-term or ms-dos prompt:
    ant start

    (NOTE: Previously, only the fundamental SOAPServer class offered web services for Greenstone. And those web services could and can still be deployed with

    ant deploy-localsite
    This deploys SOAPServer's "process" web service operation on your localhost server. And you can view the effects of deploying it by going to http://localhost:8080/greenstone3/services. Its WSDL can be accessed via that page as well.)

    While "ant deploy-localsite" deploys the same default SOAPServer web service, we want to deploy another web service this time.

    We'll be deploying the new QBRSOAPServer web services, which will provide basic query, browse and retrieval web service operations. This is what the GS3-webservices-democlient uses:

    ant soap-deploy-site
    1. The first time it prompts you, you need to choose the Greenstone3 site you want to deploy the services for. (Localsite on localhost is the default).
    2. The next time, you need to type the name of the set of web services you wish to deploy. In this case, type
      Note the use of caps and lowercase letters.
    3. Finally it will ask you want you want to call this set of web services. You can either accept the default name—which would be QBRSOAPServerlocalsite if you had chosen to deploy it for localsite—or you can type some other name for the web services. (For instance, GS3AccessWebServices.)
      At present, just accept the default service name of QBRSOAPServerlocalsite.
    If all went well, it would now have been deployed.
  2. Point your browser to the Greenstone site you deployed them for and go to the "services" page. For example, if the services were deployed for localsite and your port was 8080, you'd go to:
    And on this page, it will mention QBRSOAPServerlocalsite (or whatever name you chose for the web services) among the list of web services deployed.
    There will be a link named wsdl next to the web service name. (You can click on the wsdl link to view the contents of this XML file. This file describes the web services: the url of the services, the operations it provides, the number and types of the values the operations take and returns.) We won't do anything special with all this other than copy the url for the WSDL file.

    For example, depending on the serviceName you chose and the host/port where the services have been deployed on, this might be


C Undeploying web services from Greenstone 3

When you don't want the web services deployed anymore, you can undeploy them.
  1. Go into $GSDLHOME folder. Make sure tomcat is running (if not, type "ant start").
  2. Type in an X-term:
    ant soap-undeploy-site
  3. Type the name of the web services you wish to undeploy.
    If you don't remember what the name is anymore, point your browser to the Greenstone site you deployed them for and go to the "services" page again. For instance, if my Greenstone3 server is listening at port 8080 on my local computer, I'd go to:
    The services page will list the deployed web services. Get the name of the web service you want to undeploy from here. Go back to your x-term and type this in to undeploy the chosen web service.
    For instance, if we had a web service with the name "QBRSOAPServerlocalsite" deployed and wanted it removed, we'd type that name.