Starting the Add Numbers server and client

You can run the Add Numbers service on any server on your network including localhost.

About this task

For more information about the Add Numbers service, see The Add Numbers service.

Procedure

  1. On Windows systems, click Start, then right click Command Prompt. Click Run as administrator. On Linux or Mac OS systems, make sure that you are logged in as the same user who installed HCL OneTest API, and then open a Terminal window.
  2. Change your working directory to install_dir/examples/addnumbers.
  3. Run startup.bat.
    The Add Numbers Server window is displayed.
    The Add Numbers Server window with initial settings.
  4. Specify the following information:
    Host Adapter
    The hostname or IP address of the network adapter on the current computer to which the Add Numbers service will bind. You can specify localhost for a simple test scenario.
    Port Number
    The port number on which the Add Numbers service will listen on the specified host. The default is 8088.
    Protocol
    Keep the default value of HTTP. To use HTTPS protocol, see Securing the Add Numbers service.

    Click Start Service.

  5. To record messages or discover resources through HCL OneTest API, you must use a proxy server to forward messages from the Add Numbers client to the Add Numbers server. The proxy server must be running at the time you start the Add Numbers client. If you are running HCL® Quality Server on your current system, and that system is running Windows, you probably have an HTTP proxy server that is running on localhost:3128.
    1. Use a text editor to open the startup.bat file in the install_dir/examples/addnumbersclient directory.
    2. Comment out the first line that refers to AddNumbersClient.jar:
      @rem %JAVA_HOME%\bin\java %NET_PROPS% %SSL_PROPS% -jar AddNumbersClient.jar
    3. Remove the comment characters from the line that contains proxy information. By default, the proxy hostname is localhost and the default port number is 3128. Separate properties are provided for HTTP and HTTPS. To use a different proxy host, change the appropriate values, as in the following example:
      %JAVA_HOME%\bin\java %NET_PROPS% %SSL_PROPS%  -Dhttp.proxyHost=my_server -Dhttp.proxyPort=8080 -Dhttps.proxyHost=localhost 
      -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=  -jar AddNumbersClient.jar
    4. Save and close the file.
  6. Open a second Command Prompt or Terminal window with the same permissions as described in step 1.
  7. Change your working directory to install_dir/examples/addnumbersclient.
  8. Run startup.bat.
    The Add Numbers Client window is displayed.
  9. Specify the following information:
    Host Adapter
    Enter the same hostname or IP address as in step 4.
    Port Number
    Enter the same port number as in step 4.
    Protocol
    Keep the default value of HTTP. To use HTTPS protocol, see Securing the Add Numbers service.
    Add
    Enter an operand in each of the two fields.

    Click the equal sign next to Call webservice to send the two operands to the Add Numbers server.

    The sum is displayed in the field next to the equal sign.