Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
greenelk committed Nov 19, 2014
1 parent 225e6fd commit fb2c93c
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 15 deletions.
12 changes: 10 additions & 2 deletions calculator/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Example : calculator

This example takes advantage of the **calculator** example web service that is integrated into
This example uses the **calculator** example web service that is built into
RTCP and includes:

- A Java calculator application which uses the *calculator* web service to perform mathematical calculations.
Expand Down Expand Up @@ -161,7 +161,13 @@ Compare the two startup scripts, **startCalulator** and **startCalculatorInTestM
You'll find the only real difference is the addition of two [java networking properties](http://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html) in
the startup script.

-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128
rem When running the app in a Java 7 environment the settings must be
set JAVA_TOOL_OPTIONS=-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttp.nonProxyHosts= -Djava.net.useSystemProxies=true
rem When running the app in a Java 6 environment the settings must be
rem set JAVA_TOOL_OPTIONS=-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttp.nonProxyHosts=~localhost -Djava.net.useSystemProxies=true

The [JAVA\_TOOL\_OPTIONS](http://www.oracle.com/technetwork/java/javase/envvars-138887.html#gbmsy) are automatically picked up by Java


During the default installation process for *Rational Integration Platform Pack* a default http proxy is installed and auto-started.
This proxy's configuration is determined by the contents of RIT-Platform/httptcp/registration.xml.
Expand All @@ -172,6 +178,8 @@ This proxy's configuration is determined by the contents of RIT-Platform/httptcp

Port 3128 is the default port that is used to manage http traffic, in conjunction with the associated RTCP instance (default is http://localhost:7819/RTCP)

The logic check for which Java is being used is due to differences in how Java 6 and follow on versions interpret **http.nonProxyHosts**

# Further reading
- TechNote : [Message filtering and validation](http://www-01.ibm.com/support/docview.wss?uid=swg21669000).
- developerWorks article : [Virtualize multiple behaviors in parallel with Rational Test Virtualization Server](http://www.ibm.com/developerworks/rational/library/multiple-behaviors-parallel-test-virtualization-server/index.html).
Binary file modified calculator/applications/client/calculator.jar
Binary file not shown.
9 changes: 5 additions & 4 deletions calculator/applications/client/startCalculator.bat
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
@rem ***************************************************************************
@rem Start Calculator Application
@rem ***************************************************************************
@echo off
rem ***************************************************************************
rem Start Calculator Application
rem ***************************************************************************

pushd
setlocal

title Calculator Client

@rem Location of downloaded Apache Axis2
rem Location of downloaded Apache Axis2
set AXIS2_HOME=./axis2-1.6.2


Expand Down
18 changes: 11 additions & 7 deletions calculator/applications/client/startCalculatorInTestMode.bat
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
@rem ***************************************************************************
@rem Start Calculator Application in test mode
@rem ***************************************************************************
@echo off
@echo off
rem ***************************************************************************
rem Start Calculator Application in test mode
rem ***************************************************************************

pushd
setlocal

title Start Calculator Application in test mode

@rem Location of downloaded Apache Axis2
rem Location of downloaded Apache Axis2
set AXIS2_HOME=./axis2-1.6.2

set PROXY=-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128

rem When running the app in a Java 7 environment the settings must be
set JAVA_TOOL_OPTIONS=-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttp.nonProxyHosts= -Djava.net.useSystemProxies=true
rem When running the app in a Java 6 environment the settings must be
rem set JAVA_TOOL_OPTIONS=-Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 -Dhttp.nonProxyHosts=~localhost -Djava.net.useSystemProxies=true

set CP=-classpath ./calculator.jar;%AXIS2_HOME%/lib/axiom-api-1.2.13.jar;%AXIS2_HOME%/lib/axiom-impl-1.2.13.jar;%AXIS2_HOME%/lib/axis2-adb-1.6.2.jar;%AXIS2_HOME%/lib/axis2-kernel-1.6.2.jar;%AXIS2_HOME%/lib/axis2-transport-http-1.6.2.jar;%AXIS2_HOME%/lib/axis2-transport-local-1.6.2.jar;%AXIS2_HOME%/lib/commons-codec-1.3.jar;%AXIS2_HOME%/lib/commons-httpclient-3.1.jar;%AXIS2_HOME%/lib/commons-logging-1.1.1.jar;%AXIS2_HOME%/lib/httpcore-4.0.jar;%AXIS2_HOME%/lib/mail-1.4.jar;%AXIS2_HOME%/lib/neethi-3.0.2.jar;%AXIS2_HOME%/lib/wsdl4j-1.6.2.jar;%AXIS2_HOME%/lib/XmlSchema-1.4.7.jar
java %PROXY% %CP% com.ibm.greenhat.examples.calculator.Calculator http://localhost:7819/RTCP
"%JAVA_HOME%"\bin\java %CP% com.ibm.greenhat.examples.calculator.Calculator http://localhost:7819/RTCP

endlocal
popd
Binary file modified calculator/rit-projects/rit-project-calculator.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion echo/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Example : echo

This example takes advantage of the **echo** example web service that is integrated into
This example uses the **echo** example web service that is built into
RTCP and includes:

- A RIT project which contains a test to exercise the *echo* operation of the web service.
Expand Down
2 changes: 1 addition & 1 deletion license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright [2014] [IBM Corporation]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 4 additions & 0 deletions phonebook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## COMING SOON
# Example : phonebook

This example will use the **phonebook** example REST interface that is built into RTCP.

0 comments on commit fb2c93c

Please sign in to comment.