source: main/tags/3.00/gsdl3/README@ 25390

Last change on this file since 25390 was 3222, checked in by kjdon, 22 years ago

Initial revision

  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1initial prototype of gsdl3
2
3only for linux
4
5need to run setup.bash to set CLASSPATH etc
6
7java src code in src/java/org/greenstone/gsdl3 - you need to do a make, and
8then a make install in this top directory. - makes all the classes in the
9subdirectories too.
10
11classes get compiled to src/java/org/greenstone/gsdl/classes, then a jar file
12is made of them all. make install copies this to lib/java
13
14There are two executable classes: Library1 and Library2
15
16both are run by "java org.greenstone.gsdl3.Libraryx <gsdlhome> <sitehome>"
17
18gsdlhome is the base dir for your installation: .../gsdl3
19sitehome is the base dir for the site you are running:
20 for the local library example site, its .../gsdl3/sites/localsite
21 for the distributed soap example site, its .../gsdl3/sites/site1
22
23(imaginative names eh)
24
25There are 3 sites in this prototype example.
26
27sites/localsite is a standalone site, like used by a local library. It has
28no connections to any other sites.
29
30sites/site1 is a site that specifies a SOAP connection to another site: site2
31
32sites/site2 can be run as a local site also.
33
34to run site1, and talk to site2 via SOAP, you need to have apache tomcat installed,running, and serving site2. (see below)
35
36Library1 - 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
37basically its like:
38
39<message><request type="describe|query" to="demo/TextQuery" info=""/></message>
40with type="describe", to="", can use serviceList, collectionList and siteList for the info field.
41
42Library2 - still command line based, but has a slightly nicer interface.
43it will prompt you for commands eg
44type of request - describe/query
45collection name
46service name
47info name (at the moment collectionList, serviceList, siteList)
48these can all be left blank except for the first one
49A sample usage thingy:
50
51describe,_,_,_ - returns info from MessageRouter - list of colls, sites, services etc
52
53describe,_,_,collectionList - returns info from MessageRouter - only a list of colls
54
55describe,demo,_,_ - returns info from demo coll - list of services
56
57describe,demo,TextQuery,_ - returns info about the service
58
59Library2 also attempts to use some XSLT transforms to format the resulting xml
60
61********************************************************************
62
63SOAP stuff.
64
65am using jakarta tomcat at this stage to serve the SOAP classes
66-----------------------------------------------------
67set up SOAP Server:
68
69the class SOAPServer is a wrapper around a messagerouter - so can serve
70the collections
71
72it has a path hard coded in - need to set this to your appropriate site -
73for the example sites that I've set up, it should be <GSDL3HOME>/sites/site2
74--------------------------------------------------------------------
75TOMCAT installation:
76
77need to install tomcat and soap:
78
79
80 a tar file is in comms/tomcat directory - not sure where to put this, so made a new directory for it
81
82you need to unzip the tar file.
83
84edit jakarta-tomcat-4.0.1/bin/catalina.sh:
85
86on line 89 add $CP to the CP="...." line ie. CP="$CP:..." - this sets up the
87class path properly
88
89edit jakarta-tomcat-4.0.1/conf/server.xml
90
91add the following (put proper path for <GSDL3HOME>)
92
93<!-- SOAP Service -->
94<Context path="/soap" docBase="<GSDL3HOME>/comms/soap/soap-2_2/webapps/soap" debug="1" reloadable="true"/>
95
96(there are other Context elements to look at)
97
98---------------------------------------------------------------------
99install soap:
100
101just untar soap-bin-2.2.tar.gz in the comms/soap directory
102--------------------------------------------------------------
103to run tomcat, need to source setup.bash in GSDL3HOME to set up $CP
104
105then cd to comms/tomcat/jakarta-tomcat-4.0.1/bin
106
107run startup.sh
108
109to shut down tomcat, run shutdown.sh
110
111you can access the soap service though the web, at http://localhost:8080/soap
112
113(conf/server.xml is the place to change the port number if needed)
114
115
116Run the admin client
117
118can list, deploy, undeploy soap services
119
120-----------------------------------------------------------------
121to deploy the SOAPServer for site2:
122
123edit the following fields in the deploy form:
124
125ID: org.greenstone.site2
126Scope: any will do: Request - new instantiation for each request
127 Session - same instantiation across a session
128 Application - only uses one instantiation
129
130Methods: process
131
132Java Provider / Provider Class: org.greenstone.gsdl3.SOAPServer
133
134then click deploy.
135hopefully all will be well.
136
137---------------------------------------------------------
138
139shoudl be able to run (from GSDL3HOME directory)
140java org.greenstone.gsdl3.Library2 . ./sites/site1
141
142and have it talk via soap. (assuming you have tomcat running and have deployed
143org.greenstone.site2)
144
145--------------------------------------------------------
146
147debugging soap:
148
149tomcat output goes to jakarta-tomcat-4.0.1/logs/catalina.out
150
151if you recompile the classes, you need to shutdown and restart tomcat to get the new classes.
152
153deployment info is retained between shutdown and start up - dont need to redeploy it each time.
154
155TcpTUnnelGui:
156
157this program allows you to view the actual soap messages
158
159run like:
160
161java org.apache.soap.util.net.TcpTunnelGui 8070 localhost 8080
162
163tomcat uses 8080, and you need to modify the greenstone stuff to talk to port 8070 instead of 8080:
164
165sites/site1 is the site that talks to the SOAPServer for site2
166
167in site1/sitecfg.xml, in the address field, replace 8080 with 8070 when you want to use TcpTunnelGui.
168
169note that
170http://localhost:8080/soap/servlet/rpcrouter
171
172is the address for talking to the tomcat soap thingy.
Note: See TracBrowser for help on using the repository browser.