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