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 Test Integrations and APIs, and then open a Terminal window.
  2. Change your working directory to C:\Program Files\HCL\DevOpsTestAPI/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 Test Integrations and APIs, 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 Test Virtualization Control Panel 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 C:\Program Files\HCL\DevOpsTestAPI/examples/addnumbersclient directory.
    2. Comment out the first line that refers to AddNumbersClient.jar:
      @rem for %%i in (addnumbers-client-*.jar) DO %JAVA_HOME%\bin\java %NET_PROPS% %SSL_PROPS% -jar "%%i"
    3. Add the following line:
      for %%i in (addnumbers-client-*.jar) DO %JAVA_HOME%\bin\java %NET_PROPS% %SSL_PROPS%  -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts= -jar "%%i"
    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 C:\Program Files\HCL\DevOpsTestAPI/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.