source: trunk/gsdl3/gs3-soap-deploy-site.bat.in@ 7969

Last change on this file since 7969 was 7969, checked in by mdewsnip, 20 years ago

Renamed gs3-soap-deploy-site.bat to gs3-soap-deploy-site.bat.in (because it contains the server hostname and port, which the users sets).

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1@echo off
2
3if exist gs3-setup.bat goto begin
4 echo You must run this script from within the Greenstone 3 home directory
5 goto exit
6
7:begin
8call gs3-setup.bat
9
10:: Required arguments: sitename and siteuri
11:checkSitename
12if not "%1" == "" goto checkSiteURI
13 echo Usage: gs3-soap-deploy-site.bat sitename siteURI
14 goto exit
15
16:checkSiteURI
17if not "%2" == "" goto start
18 echo Usage: gs3-soap-deploy-site.bat sitename siteURI
19 goto exit
20
21:start
22:: Make a new SOAPServer class from SOAPServer.java.in
23cd %GSDL3HOME%\src\java\org\greenstone\gsdl3
24"%GSDL3HOME%\winutil\sed.exe" 's,SOAPServer,SOAPServer%1,' SOAPServer.java.in > SOAPServer.java.in.tmp
25"%GSDL3HOME%\winutil\sed.exe" 's,@sitename@,%1,' SOAPServer.java.in.tmp > SOAPServer%1.java
26del SOAPServer.java.in.tmp
27
28:: Compile and install the new class
29call winMake.bat
30call winMake.bat install
31
32:: Edit the resource file
33cd %GSDL3HOME%\resources\soap
34"%GSDL3HOME%\winutil\sed.exe" 's,@servername@,SOAPServer%1,' site.xml.in > site.xml.in.tmp
35"%GSDL3HOME%\winutil\sed.exe" 's,@siteuri@,%2,' site.xml.in.tmp > %1.xml
36del site.xml.in.tmp
37
38:: To deploy the SOAP server Tomcat needs to be running
39cd %GSDL3HOME%
40call "%GSDL3HOME%\comms\jakarta\tomcat\bin\shutdown.bat"
41call "%GSDL3HOME%\comms\jakarta\tomcat\bin\startup.bat"
42
43echo Deploying the SOAP server for site %1...
44java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter deploy resources\soap\%1.xml
45
46echo Tomcat has been (re)started to deploy the site.
47echo If you don't want the server running, run
48echo gs3-launch.bat -shutdown
49echo.
50echo A SOAP server for site %1 has been deployed.
51echo The identifier for the SOAP service is %2
52echo The address of the SOAP server is
53echo http://localhost:8080/soap/servlet/rpcrouter
54
55:exit
Note: See TracBrowser for help on using the repository browser.