source: trunk/gsdl3/README@ 3286

Last change on this file since 3286 was 3283, checked in by kjdon, 22 years ago

small changes

  • Property svn:keywords set to Author Date Id Revision
File size: 8.2 KB
Line 
1initial prototype of gsdl3
2
32002/07/30 *********************************
4
5think we will use java servlets rather than cgi. can use tomcat to serve our
6servlets as well as for the soap stuff (in fact, rpcrouter is a servlet that
7does soap stuff)
8
9I have added a test html page, and a test servlet.
10
11tomcat should already be installed (if not, see below).
12
13you need to edit the tomcat conf/server.xml to add a context for gsdl servlets
14add this line near the soap one:
15
16 <!-- GSDL3 Service -->
17 <Context path="/gsdl3" docBase="<GSDLHOME>/web" debug="1" reloadable="true"/>
18
19when you edit server.xml, (or change web.xml in gsdl3/web/WEB-INF/web.xml) or
20change the classes, you need to shutdown and restart the server. also you may
21need to clear the cache of your browser
22
23once you have made the test servlet class,
24(in web/WEB-INF/classes, javac TestServlet.java)
25you can run it.
26
27localhost:8080/gsdl3 should get you the index page - can click on the link to
28run the test. or can specify it directly:
29localhost:8080/gsdl3/testing
30
31the path 'testing' is determined by servlet-mapping entry in
32web/WEB-INF/web.xml
33
34Note: also changed setup.bash to only have CLASSPATH, not CP - need to change
35the CP entry in catalina.sh to use CLASSPATH instead - see below in Tomcat
36installation
372002/07/16 *********************************
38
39MGPP java wrapper
40
41a java interface has been added for mgpp.
42
43the java code is in src/java/org/greenstone/mgpp
44the cpp code in src/cpp/jni/mgpp
45
46you need to run make in the java part before the cpp part, as the java stuff
47creates the jni header file for the cpp side
48
49in src/java/org/greenstone/mgpp do:
50make
51make install
52
53in src/cpp/jni/mgpp do:
54make
55make install
56
57run the Queryer:
58java org.greenstone.mgpp.Queryer <basedir> <indexdir> <textdir>
59
60eg if have a mgpp collection in gsdl/collect/mgppdemo
61java org...Queryer gsdl/collect/mgppdemo/index tt/mgppdemo text/mgppdemo
62
63for this to work (termporarily) you need to get the mgpp source from gsdl as
64it hasn't been added to gsdl3 cvs yet
65
66if you already have gsdl installed, then build a collection using mgpp (see
67greenstone doc and source collection at nzdl2.cs.waikato.ac.nz for more info - search for mgpp)
68
69you need to edit the src/cpp/jni/mgpp Makefile to set the correct include
70directories.
71also copy gsdl/src/mgpp/lib/libmg.a and gsdl/src/mgpp/text/libtextin.a to
72gsdl3/lib/cpp
73
74(and if you want 'make test' to work in src/java/org/greenstone/mgpp you need to change the command to run)
75
76the make steps above should now work.
77
78if you dont have gsdl yet, do:
79cvs co gsdl
80cd gsdl
81./configure
82make
83make install
84
85then build collections etc (good luck)
86
872002/07/05 *******************************
88
89only for linux
90
91need to run setup.bash to set CLASSPATH etc
92
93java src code in src/java/org/greenstone/gsdl3 - you need to do a make, and
94then a make install in this top directory. - makes all the classes in the
95subdirectories too.
96
97classes get compiled to src/java/org/greenstone/gsdl/classes, then a jar file
98is made of them all. make install copies this to lib/java
99
100There are two executable classes: Library1 and Library2
101
102both are run by "java org.greenstone.gsdl3.Libraryx <gsdlhome> <sitehome>"
103
104gsdlhome is the base dir for your installation: .../gsdl3
105sitehome is the base dir for the site you are running:
106 for the local library example site, its .../gsdl3/sites/localsite
107 for the distributed soap example site, its .../gsdl3/sites/site1
108
109(imaginative names eh)
110
111There are 3 sites in this prototype example.
112
113sites/localsite is a standalone site, like used by a local library. It has
114no connections to any other sites.
115
116sites/site1 is a site that specifies a SOAP connection to another site: site2
117
118sites/site2 can be run as a local site also.
119
120to run site1, and talk to site2 via SOAP, you need to have apache tomcat installed,running, and serving site2. (see below)
121
122Library1 - just takes straight XML queries and returns the results. see docs/xml/* for examples - not there yet. can use the other library to see how requests are formatted
123basically its like:
124
125<message><request type="describe|query" to="demo/TextQuery" info=""/></message>
126with type="describe", to="", can use serviceList, collectionList and siteList for the info field.
127
128Library2 - still command line based, but has a slightly nicer interface.
129it will prompt you for commands eg
130type of request - describe/query
131collection name
132service name
133info name (at the moment collectionList, serviceList, siteList)
134these can all be left blank except for the first one
135A sample usage thingy:
136
137describe,_,_,_ - returns info from MessageRouter - list of colls, sites, services etc
138
139describe,_,_,collectionList - returns info from MessageRouter - only a list of colls
140
141describe,demo,_,_ - returns info from demo coll - list of services
142
143describe,demo,TextQuery,_ - returns info about the service
144
145Library2 also attempts to use some XSLT transforms to format the resulting xml
146
147********************************************************************
148
149SOAP stuff.
150
151am using jakarta tomcat at this stage to serve the SOAP classes
152-----------------------------------------------------
153set up SOAP Server:
154
155the class SOAPServer is a wrapper around a messagerouter - so can serve
156the collections
157
158it has a path hard coded in - need to set this to your appropriate site -
159for the example sites that I've set up, it should be <GSDL3HOME>/sites/site2
160--------------------------------------------------------------------
161TOMCAT installation:
162
163need to install tomcat and soap:
164
165
166 a tar file is in comms/tomcat directory - not sure where to put this, so made a new directory for it
167
168you need to unzip the tar file.
169
170edit jakarta-tomcat-4.0.1/bin/catalina.sh:
171
172on line 89 add $CLASSPATH to the CP="...." line ie. CP="$CLASSPATH:..." - this
173sets up the class path properly (note this has changed since last time
1742002/07/30)
175
176edit jakarta-tomcat-4.0.1/conf/server.xml
177
178add the following (put proper path for <GSDL3HOME>)
179
180<!-- SOAP Service -->
181<Context path="/soap" docBase="<GSDL3HOME>/comms/soap/soap-2_2/webapps/soap" debug="1" reloadable="true"/>
182
183(there are other Context elements to look at)
184
185---------------------------------------------------------------------
186install soap:
187
188just untar soap-bin-2.2.tar.gz in the comms/soap directory
189--------------------------------------------------------------
190to run tomcat, need to source setup.bash in GSDL3HOME to set up $CP
191
192then cd to comms/tomcat/jakarta-tomcat-4.0.1/bin
193
194run startup.sh
195
196to shut down tomcat, run shutdown.sh
197
198you can access the soap service though the web, at http://localhost:8080/soap
199
200(conf/server.xml is the place to change the port number if needed)
201
202
203Run the admin client
204
205can list, deploy, undeploy soap services
206
207-----------------------------------------------------------------
208to deploy the SOAPServer for site2:
209
210edit the following fields in the deploy form:
211
212ID: org.greenstone.site2
213Scope: any will do: Request - new instantiation for each request
214 Session - same instantiation across a session
215 Application - only uses one instantiation
216
217Methods: process
218
219Java Provider / Provider Class: org.greenstone.gsdl3.SOAPServer
220
221then click deploy.
222hopefully all will be well.
223
224---------------------------------------------------------
225
226shoudl be able to run (from GSDL3HOME directory)
227java org.greenstone.gsdl3.Library2 . ./sites/site1
228
229and have it talk via soap. (assuming you have tomcat running and have deployed
230org.greenstone.site2)
231
232--------------------------------------------------------
233
234debugging soap:
235
236tomcat output goes to jakarta-tomcat-4.0.1/logs/catalina.out
237
238if you recompile the classes, you need to shutdown and restart tomcat to get the new classes.
239
240deployment info is retained between shutdown and start up - dont need to redeploy it each time.
241
242TcpTUnnelGui:
243
244this program allows you to view the actual soap messages
245
246run like:
247
248java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080
249
250tomcat uses 8080, and you need to modify the greenstone stuff to talk to port 8070 instead of 8080:
251
252sites/site1 is the site that talks to the SOAPServer for site2
253
254in site1/sitecfg.xml, in the address field, replace 8080 with 8070 when you want to use TcpTunnelGui.
255
256note that
257http://localhost:8080/soap/servlet/rpcrouter
258
259is the address for talking to the tomcat soap thingy.
260
261
262-------------------------------------------------------------------
263
264
265
266
Note: See TracBrowser for help on using the repository browser.