source: trunk/gsdl3/gs3-soap-deploy-site.sh.in@ 7882

Last change on this file since 7882 was 7860, checked in by kjdon, 20 years ago

added in changes for the new soap server class

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1#!/bin/sh
2
3if [ ! -f gs3-setup.sh ]; then
4 echo "You must run this script from within the Greenstone 3 home directory"
5 exit 1
6fi
7#check that GSDL3HOME is set
8if test -z "$GSDL3HOME" ; then
9 source gs3-setup.sh
10fi
11
12sitename=$1
13siteuri=$2
14if [[ "$sitename" == "" || "$siteuri" == "" ]]; then
15 echo "Usage: gs3-soap-deploy-site.sh <sitename> <site URI>"
16 exit 1
17fi
18
19# make a new SOAPServer class from SOAPServer.java.in
20var=1
21 while [ -f src/java/org/greenstone/gsdl3/SOAPServer$var.java ]
22do
23 var=$((var+1))
24done
25
26# edit the SOAPServerX class
27cd src/java/org/greenstone/gsdl3
28cat SOAPServer.java.in | sed "s&SOAPServer&SOAPServer$var&" | sed "s&@sitename@&$sitename&" > SOAPServer$var.java
29
30make
31make install
32cd $GSDL3HOME
33
34# edit the resource file
35cd resources/soap
36cat site.xml.in | sed "s&@siteuri@&$siteuri&" | sed "s&@servername@&SOAPServer$var&" > $sitename.xml
37cd $GSDL3HOME
38
39# now deploy the server - needs to have tomcat running
40comms/jakarta/tomcat/bin/shutdown.sh
41comms/jakarta/tomcat/bin/startup.sh
42
43echo "waiting 5s for tomcat to startup"
44sleep 5s
45
46echo "deploying the soap server for site $sitename"
47java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter deploy resources/soap/$sitename.xml
48
49echo "Tomcat has been (re)started to deploy the site. "
50echo "If you don't want the server running, please "
51echo "run ./gs3-launch.sh -shutdown "
52echo ""
53echo "A SOAP server for site $sitename has been deployed."
54echo "The identifier for the SOAP service is $siteuri".
55echo "The address of the SOAP server is "
56echo " http://localhost:8080/soap/servlet/rpcrouter"
Note: See TracBrowser for help on using the repository browser.