L.6.1 Test this service using the Java command line Test Program

To test the service using the java command line test program, follow these steps:

  1. Create the required JSON and populate the appropriate parameters. Save it in a file (Request.JSON)
  2. Open Command Line and navigate to the location of the JSON files.
  3. Run the command mentioning the relevant web service and the JSON file.

Example: java -jar FTPWSclient.jar Request.json <RestURL>

The results will appear on the command line.

This screenshot illustrates how the web service call is made and what the return information looks like when running from the command line.

Example: java -jar FTPWSClient.jar Request.json <Restful_URL>

Note:

"TP" in the above command indicates you are calling the getTPRate program for this web service. A value of "EC" would indicate you are calling the getEconomicCost program.

Figure L-1 Putty Snapshot


Putty Snapshot