| 1 |
To run the TCP Transport samples, do the following: |
| 2 |
1. Set up your CLASSPATH. |
| 3 |
2. Start a server. |
| 4 |
3. Deploy the service. |
| 5 |
4. Run the sample. |
| 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 the TCP |
| 14 |
server: |
| 15 |
java samples.transport.tcp.TCPListener -p <SERVER_PORT> |
| 16 |
|
| 17 |
3. Deploy the service. |
| 18 |
To deploy the service, run: |
| 19 |
java samples.transport.tcp.AdminClient -l tcp://<SERVER_NAME>:<SERVER_PORT> deploy.wsdd |
| 20 |
|
| 21 |
TCPListner does not save the deployed services in any config files. So you have |
| 22 |
to deploy the service every time you restart the TCPListener. |
| 23 |
|
| 24 |
The list of currently deployed services can be seen using: |
| 25 |
java samples.transport.tcp.AdminClient -l tcp://<SERVER_NAME>:<SERVER_PORT> list |
| 26 |
|
| 27 |
4. Run the sample. |
| 28 |
Finally, to run the client, run: |
| 29 |
java samples.transport.tcp.GetQuote -l tcp://<SERVER_NAME>:<SERVER_PORT> <SYMBOL> |
| 30 |
|
| 31 |
|
| 32 |
Also note that if you use some other URL scheme, for example, http://...... in the |
| 33 |
step 4, the request is sent using the HTTP protocol. Thus if you are not using the |
| 34 |
TCPListener, but some HTTP server or SimpleAxisServer, you can use the same client |
| 35 |
with URL = http://<SERVER_NAME>:<SERVER_PORT>/ServicePATH to invoke the service. |
| 36 |
|
| 37 |
The onwire representation of the TCP transport request is: |
| 38 |
<SIZE_OF_THE_MESSAGE> <NEWLINE> <SOAP_MESSAGE> |
| 39 |
|