summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-14 01:07:15 +0000
committermarina <marina@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-10-14 01:07:15 +0000
commite1932eac7e36676cc6b4e151f3d7399377dded72 (patch)
treea994a0c85ba17a917e0ee1356075b3d81017288c
parent7e5039ff53689358acd3b0971e687935f3ee20a3 (diff)
downloadATCD-e1932eac7e36676cc6b4e151f3d7399377dded72.tar.gz
ChangeLogTag:Fri Oct 13 20:03:01 2000 Marina Spivak <marina@cs.wustl.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a31
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/Client_Protocol.dsw41
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/Makefile66
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/Makefile.bor7
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/README93
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/client.bor34
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/client.cpp270
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/client.dsp204
-rwxr-xr-xTAO/tests/RTCORBA/Client_Protocol/run_test.pl73
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/server.bor35
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/server.cpp259
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/server.dsp216
-rw-r--r--TAO/tests/RTCORBA/Client_Protocol/test.idl12
13 files changed, 1334 insertions, 7 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index c24413ca898..f203b4c6538 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,20 @@
+Fri Oct 13 20:03:01 2000 Marina Spivak <marina@cs.wustl.edu>
+
+ * tests/RTCORBA/Client_Protocol/Client_Protocol.dsw
+ * tests/RTCORBA/Client_Protocol/Makefile
+ * tests/RTCORBA/Client_Protocol/Makefile.bor
+ * tests/RTCORBA/Client_Protocol/README
+ * tests/RTCORBA/Client_Protocol/client.bor
+ * tests/RTCORBA/Client_Protocol/client.cpp
+ * tests/RTCORBA/Client_Protocol/client.dsp
+ * tests/RTCORBA/Client_Protocol/run_test.pl
+ * tests/RTCORBA/Client_Protocol/server.bor
+ * tests/RTCORBA/Client_Protocol/server.cpp
+ * tests/RTCORBA/Client_Protocol/server.dsp
+ * tests/RTCORBA/Client_Protocol/test.idl:
+
+ Added a test for RTCORBA::ClientProtocolPolicy policy.
+
Fri Oct 13 18:17:06 2000 Jeff Parsons <parsons@cs.wustl.edu>
* TAO_IDL/be/be_visitor_argument/request_info_sh.cpp:
@@ -25,8 +42,8 @@ Fri Oct 13 13:21:06 2000 Jeff Parsons <parsons@cs.wustl.edu>
* TAO_IDL/tao_idl.cpp:
Added some missing commas in the functions that output
- the FE and BE version. Thanks to Craig Rodrigues
- <rodrigc@mediaone.net> for pointing this out and
+ the FE and BE version. Thanks to Craig Rodrigues
+ <rodrigc@mediaone.net> for pointing this out and
supplying a patch.
Fri Oct 13 11:27:03 2000 Jeff Parsons <parsons@cs.wustl.edu>
@@ -37,7 +54,7 @@ Fri Oct 13 11:27:03 2000 Jeff Parsons <parsons@cs.wustl.edu>
Added a check for an imported node along with all the
other checks that are there to decide whether to
generate the ACE_NESTED_CLASS macro or not for the
- members of the request info subclasses constructor signature
+ members of the request info subclasses constructor signature
and private member declaration. If the member is imported,
the full scoped name should be generated on all platforms.
Thanks to Base V Paul <basev@wiproge.med.ge.com> for
@@ -131,15 +148,15 @@ Fri Oct 13 10:06:03 2000 Jeff Parsons <parsons@cs.wustl.edu>
Fri 13 10:07:16 2000 Michael Kircher <Michael.Kircher@mchp.siemens.de>
* examples/Quoter/Quoter_i.cpp: Removed the code to move the
- Quoter object. This code was relying on the proprietary
+ Quoter object. This code was relying on the proprietary
TAO_POA::forward_object () method. To implement the move ()
- operation in a standard way, the whole example would have
+ operation in a standard way, the whole example would have
needed to be rewritten using a PortableServer::ServantLocator.
-
+
* examples/Quoter/client.cpp: Removed the code for moving
the Quoter object.
- * examples/Quoter/README: Documented the step described above.
+ * examples/Quoter/README: Documented the step described above.
Fri Oct 13 06:28:57 2000 Balachandran Natarajan <bala@cs.wustl.edu>
diff --git a/TAO/tests/RTCORBA/Client_Protocol/Client_Protocol.dsw b/TAO/tests/RTCORBA/Client_Protocol/Client_Protocol.dsw
new file mode 100644
index 00000000000..d17cf7c9604
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/Client_Protocol.dsw
@@ -0,0 +1,41 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "client"=.\client.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "server"=.\server.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/TAO/tests/RTCORBA/Client_Protocol/Makefile b/TAO/tests/RTCORBA/Client_Protocol/Makefile
new file mode 100644
index 00000000000..5b228e02b4e
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/Makefile
@@ -0,0 +1,66 @@
+#----------------------------------------------------------------------------
+#
+# $Id$
+#
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# Local macros
+#----------------------------------------------------------------------------
+
+ifndef TAO_ROOT
+ TAO_ROOT = $(ACE_ROOT)/TAO
+endif # ! TAO_ROOT
+
+LDLIBS = -lTAO
+
+IDL_FILES = test
+IDL_SRC = testC.cpp testS.cpp
+BIN_UNCHECKED = server client
+
+SRC = $(addsuffix .cpp, $(BIN)) $(IDL_SRC)
+
+CLIENT_OBJS = client.o testC.o
+SERVER_OBJS = server.o $(IDL_SRC:.cpp=.o)
+
+BUILD = $(BIN)
+VBIN = $(BIN:%=%$(VAR))
+TAO_IDLFLAGS += -Ge 1
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(TAO_ROOT)/rules.tao.GNU
+
+ifeq ($(rt_corba),1)
+BIN=$(BIN_UNCHECKED)
+endif # rt_corba
+
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+include $(TAO_ROOT)/taoconfig.mk
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
+.PRECIOUS: $(foreach ext, $(IDL_EXT), test$(ext))
+
+server: $(addprefix $(VDIR),$(SERVER_OBJS))
+ $(LINK.cc) $(LDFLAGS) -o $@ $^ $(TAO_SRVR_LIBS) $(POSTLINK)
+
+client: $(addprefix $(VDIR),$(CLIENT_OBJS))
+ $(LINK.cc) $(LDFLAGS) -o $@ $^ $(TAO_CLNT_LIBS) $(POSTLINK)
+
+realclean: clean
+ -$(RM) $(foreach ext, $(IDL_EXT), test$(ext))
+
+# DO NOT DELETE THIS LINE -- g++dep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/tests/RTCORBA/Client_Protocol/Makefile.bor b/TAO/tests/RTCORBA/Client_Protocol/Makefile.bor
new file mode 100644
index 00000000000..adecf33c643
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/Makefile.bor
@@ -0,0 +1,7 @@
+#
+# Makefile for building the Server_Protocol test executables
+#
+
+MAKEFILES = server.bor client.bor
+
+!include <$(ACE_ROOT)\include\makeinclude\recurse.bor>
diff --git a/TAO/tests/RTCORBA/Client_Protocol/README b/TAO/tests/RTCORBA/Client_Protocol/README
new file mode 100644
index 00000000000..301bf5cd106
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/README
@@ -0,0 +1,93 @@
+$Id$
+
+This is a unit test for RTCORBA::ClientProtocolPolicy.
+
+Scenario:
+--------
+The server first prints out its ORB default Server Protocol policy.
+If the <-p> command line option was specified, a child POA is created
+and configured with Server Protocol Policy containing a single
+protocol specified with <-p> (see options section below).
+The object is registered with child POA if one was created (root poa
+otherwise) and the server waits for requests.
+The client obtains server IOR and makes a single incocation, causing
+server process to shut down its orb and exit.
+
+To run (on Unix):
+-------
+$./server [-o <ior_file> -p <profile_id>]
+$./client [-k <ior>]
+
+
+Options:
+--------
+ Server:
+
+-o <ior_output_file> Default: test.ior
+ Filename for output of server's IOR.
+
+-p <profile_id> Default: none.
+ The POA with which the object will be
+ registered will be configured with Server
+ Protocol Policy cotaining a single protocol -
+ the one identified by <profile_id>. If this
+ option is not present, then the POA is not
+ configured with Server Protocol Policy and ORB
+ default is used.
+
+ Client:
+
+-k <server_ior> Default: file://test.ior
+ Server's IOR
+
+Expected output:
+----------------
+Expected output varies with the configurations used to run the test.
+General guidelines:
+
+1) ORB default ServerProtocolPolicy must contain all the protocols
+ that were loaded in the order they were loaded. This can be
+ manipulated through the use of service config files (see run_test.pl)
+
+2) Run client with -ORBdebuglevel 1 to see which protocol is used for
+ communication. Make sure it is the same protocol that was
+ specified with <-p> or the first available from orb default server
+ protocol policy if <-p> wasn't specified (see run_test.pl for
+ sample options)
+
+3) See OMG Real-Time CORBA specification and TAO's Real-Time CORBA
+ documentation for more information.
+
+
+Sample Run/Output (on Unix):
+----------------
+* Server:
+
+$./server -ORBendpoint iiop:// -ORBendpoint uiop:// -ORBendpoint \
+shmiop:// -p 1413566210
+
+ORB default for ServerProtocolPolicy contains 3 protocols:
+ Protocol 0: IOP::ProfileId = 0
+ Properties:
+ send_buffer_size = 65536
+ receive_buffer_size = 65536
+ no_delay = 1
+ Protocol 1: IOP::ProfileId = 1413566208
+ Properties:
+ send_buffer_size = 65536
+ receive_buffer_size = 65536
+ Protocol 2: IOP::ProfileId = 1413566210
+
+Activated as <IOR:000000000000000d49444c3a546573743a312e30000000000000000154414f020000008000010200000000116163652e63732e777573746c2e6564750000cbef0000002314010f004e535439b59013000388560000000100000001000000000000000100000001000000000300000000000000080000000054414f000000000100000014000000000001000100000000000101090000000054414f000000000400000000>
+
+Received request to shut down the ORB
+Server ORB event loop finished
+
+
+* Client (in a separate window):
+
+$./client -ORBdebuglevel 1
+TAO (20145|1) Loaded default protocol <IIOP_Factory>
+TAO (20145|1) Loaded default protocol <UIOP_Factory>
+TAO (20145|1) Loaded default protocol <SHMIOP_Factory>
+TAO (20145|1) SHMIOP connection to server <127.0.0.1:52207> on 8
diff --git a/TAO/tests/RTCORBA/Client_Protocol/client.bor b/TAO/tests/RTCORBA/Client_Protocol/client.bor
new file mode 100644
index 00000000000..d00bc36eac5
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/client.bor
@@ -0,0 +1,34 @@
+#
+# Makefile for building the Server_Protocol client
+#
+
+NAME = client
+
+TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe -Ge 1
+
+OBJFILES = \
+ $(OBJDIR)\testC.obj \
+ $(OBJDIR)\client.obj
+
+CFLAGS = \
+ $(ACE_CFLAGS) \
+ $(TAO_CFLAGS) \
+ $(TAO_PORTABLESERVER_CFLAGS)
+
+LIBFILES = \
+ $(ACE_LIB) \
+ $(TAO_LIB) \
+ $(TAO_PORTABLESERVER_LIB)
+
+CPPDIR = .
+
+IDLDIR = .
+
+!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor>
+
+#
+# IDL Build rules
+#
+
+$(IDLDIR)\testS.cpp $(IDLDIR)\testC.cpp: $(IDLDIR)\test.idl
+ $(TAO_IDL) $**
diff --git a/TAO/tests/RTCORBA/Client_Protocol/client.cpp b/TAO/tests/RTCORBA/Client_Protocol/client.cpp
new file mode 100644
index 00000000000..f04e8f69ec5
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/client.cpp
@@ -0,0 +1,270 @@
+// $Id$
+
+#include "testC.h"
+#include "ace/Get_Opt.h"
+#include "tao/RTCORBAC.h"
+
+#if (TAO_HAS_RT_CORBA == 1)
+
+const char *ior1 = "file://test1.ior";
+const char *ior2 = "file://test2.ior";
+CORBA::ULong protocol_type = 0;
+
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "s:c:p:");
+ int c, result;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 's':
+ ior1 = get_opts.optarg;
+ break;
+ case 'c':
+ ior2 = get_opts.optarg;
+ break;
+ case 'p':
+ result = ::sscanf (get_opts.optarg,
+ "%u",
+ &protocol_type);
+ if (result == 0 || result == EOF)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to process <-p> option"),
+ -1);
+ break;
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-s <ior> "
+ "-c <ior> "
+ "-p <protocol_type> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ return 0;
+}
+
+int
+check_for_nil (CORBA::Object_ptr obj, char *msg)
+{
+ if (CORBA::is_nil (obj))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Object reference <%s> is nil\n",
+ msg),
+ -1);
+ else
+ return 0;
+}
+
+void
+exception_test (Test_ptr server,
+ char *msg,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ ACE_TRY
+ {
+ server->test_method (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ ACE_DEBUG ((LM_DEBUG, msg));
+ }
+ ACE_CATCH (CORBA::INV_POLICY, ex)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "INV_POLICY exception is caught as expected.\n"));
+ }
+ ACE_CATCHANY
+ {
+ ACE_DEBUG ((LM_DEBUG, msg));
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
+ ACE_CHECK;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ // Initialize the ORB, resolve references and parse arguments.
+
+ // ORB.
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Parse arguments.
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ // RTORB.
+ CORBA::Object_var object =
+ orb->resolve_initial_references ("RTORB", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check_for_nil (rt_orb.in (), "RTORB") == -1)
+ return 1;
+
+ // PolicyManager.
+ object = orb->resolve_initial_references ("PolicyManager",
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ CORBA::PolicyManager_var policy_manager =
+ CORBA::PolicyManager::_narrow (object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check_for_nil (policy_manager.in (), "PolicyManager")
+ == -1)
+ return 1;
+
+ // PolicyCurrent.
+ object = orb->resolve_initial_references ("PolicyCurrent",
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ CORBA::PolicyCurrent_var policy_current =
+ CORBA::PolicyCurrent::_narrow (object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check_for_nil (policy_current.in (), "PolicyCurrent")
+ == -1)
+ return 1;
+
+ // Test object 1 (ClientProtocolPolicy set on server).
+ object = orb->string_to_object (ior1, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ Test_var server1 = Test::_narrow (object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check_for_nil (server1.in (), "server1") == -1)
+ return 1;
+
+ // Test object 2 (no client-exposed ClientProtocolPolicy).
+ object = orb->string_to_object (ior2, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ Test_var server2 = Test::_narrow (object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check_for_nil (server2.in (), "server2") == -1)
+ return 1;
+
+ // Do testing.
+
+ // Test 1: Invoke operation on the object that has
+ // ClientProtocolPolicy set on the server side.
+ ACE_DEBUG ((LM_DEBUG,
+ "\n Test 1\n"));
+ server1->test_method (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Test 2: Set the ORB-level ClientProtocolPolicy override, and
+ // attempt the same invocation again. Should get
+ // CORBA::INV_POLICY exception since the policy is set on both
+ // client and server sides.
+ ACE_DEBUG ((LM_DEBUG,
+ "\n Test 2\n"));
+ RTCORBA::ProtocolList protocols;
+ protocols.length (1);
+ protocols[0].protocol_type = protocol_type;
+ protocols[0].transport_protocol_properties =
+ RTCORBA::ProtocolProperties::_nil ();
+ protocols[0].orb_protocol_properties =
+ RTCORBA::ProtocolProperties::_nil ();
+
+ CORBA::PolicyList policy_list;
+ policy_list.length (1);
+ policy_list[0] =
+ rt_orb->create_client_protocol_policy (protocols,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ policy_manager->set_policy_overrides (policy_list,
+ CORBA::SET_OVERRIDE,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ exception_test (server1.in (),
+ "ERROR: Test 2 failed\n", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Test 3: Attempt the invocation on the second object reference
+ // (the one that didn't have ClientProtocolPolicy set on the
+ // server side). This should succeed since there are no
+ // conflicts.
+ ACE_DEBUG ((LM_DEBUG,
+ "\n Test 3\n"));
+ server2->test_method (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Test 4: Override ClientProtocolPolicy on the Current level.
+ // For the override value, use the sequence of protocols, none
+ // of which are available in the ORB. Attempt an invocation on
+ // the second object. Should get CORBA::INV_POLICY exception
+ // since none of the protocols specified in the policy are
+ // available.
+ ACE_DEBUG ((LM_DEBUG,
+ "\n Test 4\n"));
+ protocols.length (3);
+ protocols[0].protocol_type = 3;
+ protocols[1].protocol_type = 4;
+ protocols[2].protocol_type = 5;
+ policy_list[0] =
+ rt_orb->create_client_protocol_policy (protocols,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ policy_current->set_policy_overrides (policy_list,
+ CORBA::SET_OVERRIDE,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ exception_test (server2.in (),
+ "ERROR: Test 4 failed\n", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Test 5: Override ClientProtocolPolicy on the Current level
+ // again. This time use the sequence in which the first
+ // protocol isn't available and the second one is. The
+ // invocation should succeed through using the second protocol.
+ ACE_DEBUG ((LM_DEBUG,
+ "\n Test 5\n"));
+ protocols.length (2);
+ protocols[0].protocol_type = 3;
+ protocols[1].protocol_type = protocol_type;
+ policy_list[0] =
+ rt_orb->create_client_protocol_policy (protocols,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ policy_current->set_policy_overrides (policy_list,
+ CORBA::SET_OVERRIDE,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ server2->shutdown (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Unexpected exception caught in ClientProtocolPolicy test client:");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
+
+#else /* TAO_HAS_RT_CORBA == 1 */
+
+int
+main (int argc, char *argv[])
+{
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "\nRTCORBA must be enabled to run this test!\n"),
+ 1);
+}
+
+#endif /* TAO_HAS_RT_CORBA == 1 */
diff --git a/TAO/tests/RTCORBA/Client_Protocol/client.dsp b/TAO/tests/RTCORBA/Client_Protocol/client.dsp
new file mode 100644
index 00000000000..eaee341f444
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/client.dsp
@@ -0,0 +1,204 @@
+# Microsoft Developer Studio Project File - Name="client" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Server_Protocol Client - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "client.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "client.mak" CFG="Server_Protocol Client - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Server_Protocol Client - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Server_Protocol Client - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Server_Protocol Client - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib TAO.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "Server_Protocol Client - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\\" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Server_Protocol Client - Win32 Release"
+# Name "Server_Protocol Client - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\testC.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\testC.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i"
+# Begin Source File
+
+SOURCE=.\testC.i
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\test.idl
+
+!IF "$(CFG)" == "Server_Protocol Client - Win32 Release"
+
+USERDEP__TEST_="..\..\..\..\bin\Release\tao_idl.exe"
+# Begin Custom Build
+InputPath=.\test.idl
+InputName=test
+
+BuildCmds= \
+ ..\..\..\..\bin\Release\tao_idl.exe -Ge 1 $(InputName).idl
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "Server_Protocol Client - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__TEST_="..\..\..\..\bin\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL on $(InputName)
+InputPath=.\test.idl
+InputName=test
+
+BuildCmds= \
+ ..\..\..\..\bin\tao_idl -Ge 1 $(InputName).idl
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/tests/RTCORBA/Client_Protocol/run_test.pl b/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
new file mode 100755
index 00000000000..4408740a6b6
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/run_test.pl
@@ -0,0 +1,73 @@
+eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}'
+ & eval 'exec perl -S $0 $argv:q'
+ if 0;
+
+# $Id$
+# -*- perl -*-
+
+unshift @INC, '../../../../bin';
+require ACEutils;
+use Cwd;
+
+$cwd = getcwd();
+$iorfile1 = "$cwd$DIR_SEPARATOR" . "test1.ior";
+$iorfile2 = "$cwd$DIR_SEPARATOR" . "test2.ior";
+
+ACE::checkForTarget($cwd);
+
+print STDERR "********** RTCORBA Client Protocol Policy Unit Test\n\n";
+
+unlink $iorfile1;
+unlink $iorfile2;
+
+# Arguments are platform-dependent (UIOP not available on Windows).
+$server_args =
+ "-s $iorfile1 -c $iorfile2 -p 1413566208 "
+ ."-ORBendpoint iiop:// -ORBendpoint shmiop:// -ORBEndpoint uiop://";
+$client_args =
+ "-s file://$iorfile1 -c file://$iorfile2 -p 1413566210 -ORBdebuglevel 1";
+
+if ($^O eq "MSWin32")
+{
+$server_args =
+ "-s $iorfile1 -c $iorfile2 -p 1413566210 "
+ ."-ORBendpoint iiop:// -ORBendpoint shmiop://";
+$client_args =
+ "-s file://$iorfile1 -c file://$iorfile2 -p 1413566210 -ORBdebuglevel 1";
+}
+
+# Start server.
+$SV = Process::Create ($EXEPREFIX."server$EXE_EXT ",
+ $server_args);
+
+if (ACE::waitforfile_timed ($iorfile2, 10) == -1) {
+ print STDERR "ERROR: cannot find file <$iorfile2>\n";
+ $SV->Kill (); $SV->TimedWait (1);
+ exit 1;
+}
+
+# Start client.
+$CL = Process::Create ($EXEPREFIX."client$EXE_EXT ",
+ $client_args);
+
+# Clean up.
+$client = $CL->TimedWait (60);
+if ($client == -1) {
+ print STDERR "ERROR: client timedout\n";
+ $CL->Kill (); $CL->TimedWait (1);
+}
+
+$server = $SV->TimedWait (60);
+if ($server == -1) {
+ print STDERR "ERROR: server timedout\n";
+ $SV->Kill (); $SV->TimedWait (1);
+}
+
+unlink $iorfile1;
+unlink $iorfile2;
+
+if ($server != 0 || $client != 0) {
+ exit 1;
+}
+
+exit 0;
diff --git a/TAO/tests/RTCORBA/Client_Protocol/server.bor b/TAO/tests/RTCORBA/Client_Protocol/server.bor
new file mode 100644
index 00000000000..8c0820f9f96
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/server.bor
@@ -0,0 +1,35 @@
+#
+# Makefile for building the Server_Protocol server
+#
+
+NAME = server
+
+TAO_IDL = $(CORE_BINDIR)\tao_idl -g $(CORE_BINDIR)\gperf.exe -Ge 1
+
+OBJFILES = \
+ $(OBJDIR)\testS.obj \
+ $(OBJDIR)\testC.obj \
+ $(OBJDIR)\server.obj
+
+CFLAGS = \
+ $(ACE_CFLAGS) \
+ $(TAO_CFLAGS) \
+ $(TAO_PORTABLESERVER_CFLAGS)
+
+LIBFILES = \
+ $(ACE_LIB) \
+ $(TAO_LIB) \
+ $(TAO_PORTABLESERVER_LIB)
+
+CPPDIR = .
+
+IDLDIR = .
+
+!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor>
+
+#
+# IDL Build rules
+#
+
+$(IDLDIR)\testS.cpp $(IDLDIR)\testC.cpp: $(IDLDIR)\test.idl
+ $(TAO_IDL) $**
diff --git a/TAO/tests/RTCORBA/Client_Protocol/server.cpp b/TAO/tests/RTCORBA/Client_Protocol/server.cpp
new file mode 100644
index 00000000000..075b588206c
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/server.cpp
@@ -0,0 +1,259 @@
+// $Id$
+
+#include "testS.h"
+#include "ace/Get_Opt.h"
+#include "tao/RTCORBAC.h"
+
+#if (TAO_HAS_RT_CORBA == 1)
+
+class Test_i : public POA_Test
+{
+ // = TITLE
+ // An implementation for the Test interface in test.idl
+ //
+public:
+ Test_i (CORBA::ORB_ptr orb);
+ // ctor
+
+ void test_method (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void shutdown (CORBA::Environment&)
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ CORBA::ORB_var orb_;
+ // The ORB
+};
+
+Test_i::Test_i (CORBA::ORB_ptr orb)
+ : orb_ (CORBA::ORB::_duplicate (orb))
+{
+}
+
+void
+Test_i::test_method (CORBA::Environment& ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Test method invoked on the sever\n"));
+}
+
+void
+Test_i::shutdown (CORBA::Environment& ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+{
+ ACE_DEBUG ((LM_DEBUG,
+ "Received request to shut down the ORB\n"));
+ this->orb_->shutdown (0, ACE_TRY_ENV);
+}
+
+//*************************************************************************
+
+const char *ior_output_file1 = "test1.ior";
+const char *ior_output_file2 = "test2.ior";
+CORBA::ULong protocol_type = 0;
+
+// Parse command-line arguments.
+int
+parse_args (int argc, char *argv[])
+{
+ ACE_Get_Opt get_opts (argc, argv, "s:c:p:");
+ int c, result;
+
+ while ((c = get_opts ()) != -1)
+ switch (c)
+ {
+ case 's':
+ ior_output_file1 = get_opts.optarg;
+ break;
+
+ case 'c':
+ ior_output_file2 = get_opts.optarg;
+ break;
+
+ case 'p':
+ result = ::sscanf (get_opts.optarg,
+ "%u",
+ &protocol_type);
+ if (result == 0 || result == EOF)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Unable to process <-p> option"),
+ -1);
+ break;
+
+ case '?':
+ default:
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "usage: %s "
+ "-s <iorfile> "
+ "-c <iorfile> "
+ "-p <protocol_type> "
+ "\n",
+ argv [0]),
+ -1);
+ }
+
+ return 0;
+}
+
+int
+check_for_nil (CORBA::Object_ptr obj, char *msg)
+{
+ if (CORBA::is_nil (obj))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Object reference <%s> is nil\n",
+ msg),
+ -1);
+ else
+ return 0;
+}
+
+int
+create_object (PortableServer::POA_ptr poa,
+ CORBA::ORB_ptr orb,
+ Test_i *server_impl,
+ const char *filename,
+ CORBA::Environment &ACE_TRY_ENV)
+{
+ // Register with poa.
+ PortableServer::ObjectId_var id =
+ poa->activate_object (server_impl, ACE_TRY_ENV);
+ ACE_CHECK;
+
+ CORBA::Object_var server =
+ poa->id_to_reference (id.in (),
+ ACE_TRY_ENV);
+ ACE_CHECK;
+
+ // Print out the IOR.
+ CORBA::String_var ior =
+ orb->object_to_string (server.in (), ACE_TRY_ENV);
+ ACE_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "<%s>\n\n", ior.in ()));
+
+ // Print ior to the file.
+ if (filename != 0)
+ {
+ FILE *output_file= ACE_OS::fopen (filename, "w");
+ if (output_file == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Cannot open output file for writing IOR: %s",
+ filename),
+ -1);
+ ACE_OS::fprintf (output_file, "%s", ior.in ());
+ ACE_OS::fclose (output_file);
+ }
+
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ ACE_TRY_NEW_ENV
+ {
+ // ORB.
+ CORBA::ORB_var orb =
+ CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Parse arguments.
+ if (parse_args (argc, argv) != 0)
+ return 1;
+
+ // RTORB.
+ CORBA::Object_var object =
+ orb->resolve_initial_references ("RTORB", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in (),
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check_for_nil (rt_orb.in (), "RTORB") == -1)
+ return 1;
+
+ // RootPOA.
+ object =
+ orb->resolve_initial_references("RootPOA", ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ PortableServer::POA_var root_poa =
+ PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (check_for_nil (root_poa.in (), "RootPOA") == -1)
+ return 1;
+
+ // POAManager.
+ PortableServer::POAManager_var poa_manager =
+ root_poa->the_POAManager (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Create child POA with RTCORBA::ClientProtocolPolicy set.
+ RTCORBA::ProtocolList protocols;
+ protocols.length (1);
+ protocols[0].protocol_type = protocol_type;
+
+ CORBA::PolicyList poa_policy_list;
+ poa_policy_list.length (1);
+ poa_policy_list[0] =
+ rt_orb->create_server_protocol_policy (protocols,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ PortableServer::POA_var poa =
+ root_poa->create_POA ("Child_POA",
+ poa_manager.in (),
+ poa_policy_list,
+ ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ // Servant.
+ Test_i server_impl (orb.in ());
+
+ // Create object 1.
+ int result;
+ ACE_DEBUG ((LM_DEBUG, "\nActivated object one as "));
+ result = create_object (poa.in (), orb.in (), &server_impl,
+ ior_output_file1, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ if (result == -1)
+ return 1;
+
+ // Create object 2.
+ ACE_DEBUG ((LM_DEBUG, "\nActivated object two as "));
+ result = create_object (root_poa.in (), orb.in (), &server_impl,
+ ior_output_file2, ACE_TRY_ENV)
+ ACE_TRY_CHECK;
+ if (result == -1)
+ return 1;
+
+ // Run ORB Event loop.
+ poa_manager->activate (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ orb->run (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ ACE_DEBUG ((LM_DEBUG, "Server ORB event loop finished\n\n"));
+ }
+ ACE_CATCHANY
+ {
+ ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
+ "Unexpected exception caught in ClientProtocolPolicy: test server");
+ return 1;
+ }
+ ACE_ENDTRY;
+
+ return 0;
+}
+
+#else /* TAO_HAS_RT_CORBA == 1 */
+
+int
+main (int argc, char *argv[])
+{
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "\nRTCORBA must be enabled to run this test!\n"),
+ 1);
+}
+#endif /* TAO_HAS_RT_CORBA == 1 */
diff --git a/TAO/tests/RTCORBA/Client_Protocol/server.dsp b/TAO/tests/RTCORBA/Client_Protocol/server.dsp
new file mode 100644
index 00000000000..5995dd23ef1
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/server.dsp
@@ -0,0 +1,216 @@
+# Microsoft Developer Studio Project File - Name="Server_Protocol Server" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=Server_Protocol Server - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "server.mak" CFG="Server_Protocol Server - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "Server_Protocol Server - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "Server_Protocol Server - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "Server_Protocol Server - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\\" /I "..\..\..\\" /I "..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib TAO.lib TAO_PortableServer.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+
+!ELSEIF "$(CFG)" == "Server_Protocol Server - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\\" /I "..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 TAO_PortableServerd.lib TAOd.lib aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\tao\PortableServer" /libpath:"..\..\..\tao" /libpath:"..\..\..\..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "Server_Protocol Server - Win32 Release"
+# Name "Server_Protocol Server - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\testC.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\testS.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\testC.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\testS.h
+# End Source File
+# End Group
+# Begin Group "Inline Files"
+
+# PROP Default_Filter "i"
+# Begin Source File
+
+SOURCE=.\testC.i
+# End Source File
+# Begin Source File
+
+SOURCE=.\testS.i
+# End Source File
+# End Group
+# Begin Group "IDL Files"
+
+# PROP Default_Filter "idl"
+# Begin Source File
+
+SOURCE=.\test.idl
+
+!IF "$(CFG)" == "Server_Protocol Server - Win32 Release"
+
+USERDEP__TEST_="..\..\..\..\bin\Release\tao_idl.exe"
+# Begin Custom Build
+InputPath=.\test.idl
+InputName=test
+
+BuildCmds= \
+ ..\..\..\..\bin\Release\tao_idl.exe -Ge 1 $(InputName).idl
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "Server_Protocol Server - Win32 Debug"
+
+# PROP Ignore_Default_Tool 1
+USERDEP__TEST_="..\..\..\..\bin\tao_idl.exe"
+# Begin Custom Build - Invoking TAO_IDL on $(InputName)
+InputPath=.\test.idl
+InputName=test
+
+BuildCmds= \
+ ..\..\..\..\bin\tao_idl -Ge 1 $(InputName).idl
+
+"$(InputName)C.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)C.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.i" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"$(InputName)S_T.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/TAO/tests/RTCORBA/Client_Protocol/test.idl b/TAO/tests/RTCORBA/Client_Protocol/test.idl
new file mode 100644
index 00000000000..34da9984cf3
--- /dev/null
+++ b/TAO/tests/RTCORBA/Client_Protocol/test.idl
@@ -0,0 +1,12 @@
+//
+// $Id$
+//
+
+interface Test
+{
+ void test_method ();
+ // Test method.
+
+ oneway void shutdown ();
+ // Shut down the ORB.
+};