Debian Codegraph @

samples/stock/README

raw
1 To run the stock samples, you must do the following:
2 1. Set up your CLASSPATH.
3 2. Start a server.
4 3. Deploy the service.
5 4. Run the samples.
6
7 1. Set up your CLASSPATH.
8 The CLASSPATH must contain: an XML parser (ie., Xerces), JUnit
9 (www.junit.org), all the jars in the lib directory, and the directory
10 containing the samples subdirectory.
11
12 2. Start a server.
13 To run the sample, you will first need to run a server. To run a very
14 simple server you could run, in a separate window:
15 java org.apache.axis.transport.http.SimpleAxisServer -p 8080
16
17 3. Deploy the service.
18 To deploy the service, be sure you're in the JAX-RPC samples directory (samples/stock), then run:
19 java org.apache.axis.client.AdminClient deploy.wsdd
20
21 4. Run the samples.
22
23 Run the GetInfo sample:
24 java samples.stock.GetInfo <symbol> <datatype>
25
26 where <symbol> is one of "IBM", "ALLR" (Allaire), or "CSCO" (Cisco)
27 (these are the only symbols this sample supports)
28 and <datatype> is one of "symbol", "name", or "address".
29
30 Here's a simple, explicit example:
31 java samples.stock.GetInfo IBM address
32 This should result in the following output:
33 IBM: Armonk, NY
34
35
36 Run the GetQuote sample:
37 java samples.stock.GetQuote [options] <symbol>
38
39 options:
40 -d turn on debugging - more 'd means more info
41 -h<HOST> server host name
42 -l<URL> ie. http://localhost:80/axis/servlet/AxisServlet
43 -p<PORT#> server port number
44 -s<SERVLET> ie. axis/servlet/AxisServlet
45 -u<USERID> user-id
46 -w<PASSWD> password
47
48 If you use the authorization and authentication handlers (which the given
49 deploy.wsdd does) you'll need to add a couple of files to your Servlet
50 Engine's current dir:
51
52 users.lst
53 - list of users and passwords
54
55 The access control list for the authorization handler is located in the
56 deploy.wsdd file. the 'allowedRoles' parameter is used to specify the users
57 who have the karma required to access the service.
58
59 If you are running the SimpleAxisServer, this means that these files must
60 be in the directory from which that program is run. The easiest thing to
61 do is to cd to samples/stock and run SimpleAxisServer from there.
62
63 Here's an explicit example of running GetQuote using these files:
64 java samples.stock.GetQuote -uuser1 -wpass1 XXX
65 This should result in the following output:
66 XXX: 55.25
67
68
69 Run the GetQuote1 sample:
70 java samples.stock.GetQuote1 -uuser -wpass1 XXX
71
72 GetQuote1 does the same thing that GetQuote does, but it shows how to
73 make the call with and without the GetQuote.wsdl file.