summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-11-26 14:18:59 -0330
committerDwayne Boone <dwayne@zeroc.com>2009-11-26 14:18:59 -0330
commiteb9894afe8da3a9ef6a7da0ca27e0a6b32676b0c (patch)
treeb0abd1a4d60e7842b1b74ac8c9bbb02797db8a8b /cpp/test
parentRemoved getCookie from C# AsyncResult (diff)
downloadice-eb9894afe8da3a9ef6a7da0ca27e0a6b32676b0c.tar.bz2
ice-eb9894afe8da3a9ef6a7da0ca27e0a6b32676b0c.tar.xz
ice-eb9894afe8da3a9ef6a7da0ca27e0a6b32676b0c.zip
Added invoke test
Cleaned up invoke demo Fixed order of paramaters in end_ice_invoke in C++
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/Makefile3
-rw-r--r--cpp/test/Ice/Makefile.mak5
-rw-r--r--cpp/test/Ice/invoke/.depend8
-rw-r--r--cpp/test/Ice/invoke/.gitignore7
-rw-r--r--cpp/test/Ice/invoke/AllTests.cpp435
-rw-r--r--cpp/test/Ice/invoke/BlobjectI.cpp104
-rw-r--r--cpp/test/Ice/invoke/BlobjectI.h47
-rw-r--r--cpp/test/Ice/invoke/Client.cpp62
-rw-r--r--cpp/test/Ice/invoke/Makefile43
-rw-r--r--cpp/test/Ice/invoke/Makefile.mak51
-rw-r--r--cpp/test/Ice/invoke/Server.cpp130
-rw-r--r--cpp/test/Ice/invoke/Test.ice31
-rwxr-xr-xcpp/test/Ice/invoke/run.py31
13 files changed, 954 insertions, 3 deletions
diff --git a/cpp/test/Ice/Makefile b/cpp/test/Ice/Makefile
index d4a2b82b556..c606bf3ef27 100644
--- a/cpp/test/Ice/Makefile
+++ b/cpp/test/Ice/Makefile
@@ -37,7 +37,8 @@ SUBDIRS = proxy \
background \
udp \
defaultServant \
- threadPoolPriority
+ threadPoolPriority \
+ invoke
$(EVERYTHING)::
@for subdir in $(SUBDIRS); \
diff --git a/cpp/test/Ice/Makefile.mak b/cpp/test/Ice/Makefile.mak
index fdeb3dfafd2..36f808dbec7 100644
--- a/cpp/test/Ice/Makefile.mak
+++ b/cpp/test/Ice/Makefile.mak
@@ -36,11 +36,12 @@ SUBDIRS = proxy \
background \
udp \
defaultServant \
- threadPoolPriority
+ threadPoolPriority \
!if "$(CPP_COMPILER)" != "VC60"
SUBDIRS = $(SUBDIRS) \
- stream
+ stream,
+ invoke
!endif
$(EVERYTHING)::
diff --git a/cpp/test/Ice/invoke/.depend b/cpp/test/Ice/invoke/.depend
new file mode 100644
index 00000000000..f2177514ce0
--- /dev/null
+++ b/cpp/test/Ice/invoke/.depend
@@ -0,0 +1,8 @@
+Test$(OBJEXT): Test.cpp ./Test.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/Stream.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/ObjectFactory.h $(includedir)/IceUtil/Iterator.h
+Client$(OBJEXT): Client.cpp $(includedir)/Ice/Ice.h $(includedir)/Ice/Initialize.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/Stream.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/ObjectFactory.h $(includedir)/Ice/ObjectAdapter.h $(includedir)/Ice/FacetMap.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/ServantLocator.h $(includedir)/Ice/IncomingAsync.h $(includedir)/Ice/Process.h $(includedir)/Ice/Application.h $(includedir)/Ice/Connection.h $(includedir)/Ice/Functional.h $(includedir)/IceUtil/Functional.h $(includedir)/Ice/ImplicitContext.h $(includedir)/Ice/Locator.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/ProcessF.h $(includedir)/Ice/Router.h $(includedir)/Ice/DispatchInterceptor.h $(includedir)/Ice/IconvStringConverter.h ../../include/TestCommon.h ./Test.h
+AllTests$(OBJEXT): AllTests.cpp $(includedir)/Ice/Ice.h $(includedir)/Ice/Initialize.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/Stream.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/ObjectFactory.h $(includedir)/Ice/ObjectAdapter.h $(includedir)/Ice/FacetMap.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/ServantLocator.h $(includedir)/Ice/IncomingAsync.h $(includedir)/Ice/Process.h $(includedir)/Ice/Application.h $(includedir)/Ice/Connection.h $(includedir)/Ice/Functional.h $(includedir)/IceUtil/Functional.h $(includedir)/Ice/ImplicitContext.h $(includedir)/Ice/Locator.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/ProcessF.h $(includedir)/Ice/Router.h $(includedir)/Ice/DispatchInterceptor.h $(includedir)/Ice/IconvStringConverter.h ../../include/TestCommon.h ./Test.h
+Test$(OBJEXT): Test.cpp ./Test.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/Stream.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/ObjectFactory.h $(includedir)/IceUtil/Iterator.h
+BlobjectI$(OBJEXT): BlobjectI.cpp $(includedir)/Ice/Ice.h $(includedir)/Ice/Initialize.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/Stream.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/ObjectFactory.h $(includedir)/Ice/ObjectAdapter.h $(includedir)/Ice/FacetMap.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/ServantLocator.h $(includedir)/Ice/IncomingAsync.h $(includedir)/Ice/Process.h $(includedir)/Ice/Application.h $(includedir)/Ice/Connection.h $(includedir)/Ice/Functional.h $(includedir)/IceUtil/Functional.h $(includedir)/Ice/ImplicitContext.h $(includedir)/Ice/Locator.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/ProcessF.h $(includedir)/Ice/Router.h $(includedir)/Ice/DispatchInterceptor.h $(includedir)/Ice/IconvStringConverter.h ./BlobjectI.h ./Test.h ../../include/TestCommon.h
+Server$(OBJEXT): Server.cpp $(includedir)/Ice/Ice.h $(includedir)/Ice/Initialize.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/Stream.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/ObjectFactory.h $(includedir)/Ice/ObjectAdapter.h $(includedir)/Ice/FacetMap.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/ServantLocator.h $(includedir)/Ice/IncomingAsync.h $(includedir)/Ice/Process.h $(includedir)/Ice/Application.h $(includedir)/Ice/Connection.h $(includedir)/Ice/Functional.h $(includedir)/IceUtil/Functional.h $(includedir)/Ice/ImplicitContext.h $(includedir)/Ice/Locator.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/IceUtil/StaticMutex.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/ProcessF.h $(includedir)/Ice/Router.h $(includedir)/Ice/DispatchInterceptor.h $(includedir)/Ice/IconvStringConverter.h $(includedir)/IceUtil/Options.h $(includedir)/IceUtil/RecMutex.h ./BlobjectI.h
+Test.cpp: Test.ice
+Test.ice: $(SLICE2CPP) $(SLICEPARSERLIB)
diff --git a/cpp/test/Ice/invoke/.gitignore b/cpp/test/Ice/invoke/.gitignore
new file mode 100644
index 00000000000..67872faa673
--- /dev/null
+++ b/cpp/test/Ice/invoke/.gitignore
@@ -0,0 +1,7 @@
+// Generated by makegitignore.py
+
+// IMPORTANT: Do not edit this file -- any edits made here will be lost!
+client
+server
+Test.cpp
+Test.h
diff --git a/cpp/test/Ice/invoke/AllTests.cpp b/cpp/test/Ice/invoke/AllTests.cpp
new file mode 100644
index 00000000000..5d334bcfd18
--- /dev/null
+++ b/cpp/test/Ice/invoke/AllTests.cpp
@@ -0,0 +1,435 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <Ice/Stream.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+static string testString = "This is a test string";
+
+class Cookie : public Ice::LocalObject
+{
+public:
+
+ string getString()
+ {
+ return testString;
+ }
+};
+typedef IceUtil::Handle<Cookie> CookiePtr;
+
+class CallbackBase : public IceUtil::Monitor<IceUtil::Mutex>
+{
+public:
+
+ CallbackBase() :
+ _called(false)
+ {
+ }
+
+ virtual ~CallbackBase()
+ {
+ }
+
+ void check()
+ {
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ while(!_called)
+ {
+ wait();
+ }
+ _called = false;
+ }
+
+protected:
+
+ void called()
+ {
+ IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
+ assert(!_called);
+ _called = true;
+ notify();
+ }
+
+private:
+
+ bool _called;
+};
+
+class Callback : public IceUtil::Shared, public CallbackBase
+{
+public:
+
+ Callback(const Ice::CommunicatorPtr& communicator, bool useCookie) :
+ _communicator(communicator),
+ _useCookie(useCookie)
+ {
+ }
+
+ void opString(const Ice::AsyncResultPtr& result)
+ {
+ string cmp = testString;
+ if(_useCookie)
+ {
+ CookiePtr cookie = CookiePtr::dynamicCast(result->getCookie());
+ cmp = cookie->getString();
+ }
+
+ Ice::ByteSeq outParams;
+ if(result->getProxy()->end_ice_invoke(outParams, result))
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
+ string s;
+ in->read(s);
+ test(s == cmp);
+ in->read(s);
+ test(s == cmp);
+ called();
+ }
+ else
+ {
+ test(false);
+ };
+ }
+
+ void opException(const Ice::AsyncResultPtr& result)
+ {
+ if(_useCookie)
+ {
+ CookiePtr cookie = CookiePtr::dynamicCast(result->getCookie());
+ test(cookie->getString() == testString);
+ }
+
+ Ice::ByteSeq outParams;
+ if(result->getProxy()->end_ice_invoke(outParams, result))
+ {
+ test(false);
+ }
+ else
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
+ try
+ {
+ in->throwException();
+ }
+ catch(const Test::MyException&)
+ {
+ called();
+ }
+ catch(...)
+ {
+ test(false);
+ }
+ }
+ }
+
+ void opStringNC(bool ok, const Ice::ByteSeq& outParams)
+ {
+ if(ok)
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
+ string s;
+ in->read(s);
+ test(s == testString);
+ in->read(s);
+ test(s == testString);
+ called();
+ }
+ else
+ {
+ test(false);
+ }
+ }
+
+ void opStringWC(bool ok, const Ice::ByteSeq& outParams, const CookiePtr& cookie)
+ {
+ if(ok)
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
+ string s;
+ in->read(s);
+ test(s == cookie->getString());
+ in->read(s);
+ test(s == cookie->getString());
+ called();
+ }
+ else
+ {
+ test(false);
+ }
+ }
+
+ void opExceptionNC(bool ok, const Ice::ByteSeq& outParams)
+ {
+ if(ok)
+ {
+ test(false);
+ }
+ else
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
+ try
+ {
+ in->throwException();
+ }
+ catch(const Test::MyException&)
+ {
+ called();
+ }
+ catch(...)
+ {
+ test(false);
+ }
+ }
+ }
+
+ void opExceptionWC(bool ok, const Ice::ByteSeq& outParams, const CookiePtr& cookie)
+ {
+ test(cookie->getString() == testString);
+ if(ok)
+ {
+ test(false);
+ }
+ else
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(_communicator, outParams);
+ try
+ {
+ in->throwException();
+ }
+ catch(const Test::MyException&)
+ {
+ called();
+ }
+ catch(...)
+ {
+ test(false);
+ }
+ }
+ }
+
+private:
+
+ Ice::CommunicatorPtr _communicator;
+ bool _useCookie;
+};
+typedef IceUtil::Handle<Callback> CallbackPtr;
+
+Test::MyClassPrx
+allTests(const Ice::CommunicatorPtr& communicator)
+{
+ string ref = "test:default -p 12010";
+ Ice::ObjectPrx base = communicator->stringToProxy(ref);
+ test(base);
+
+ Test::MyClassPrx cl = Test::MyClassPrx::checkedCast(base);
+ test(cl);
+
+ cout << "testing ice_invoke... " << flush;
+
+ {
+ Ice::ByteSeq inParams, outParams;
+ Ice::OutputStreamPtr out = Ice::createOutputStream(communicator);
+ out->write(testString);
+ out->finished(inParams);
+
+ // ice_invoke
+ if(cl->ice_invoke("opString", Ice::Normal, inParams, outParams))
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(communicator, outParams);
+ string s;
+ in->read(s);
+ test(s == testString);
+ in->read(s);
+ test(s == testString);
+ }
+ else
+ {
+ test(false);
+ }
+
+ // ice_invoke with array mapping
+ pair<const ::Ice::Byte*, const ::Ice::Byte*> inPair(&inParams[0], &inParams[0] + inParams.size());
+ if(cl->ice_invoke("opString", Ice::Normal, inPair, outParams))
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(communicator, outParams);
+ string s;
+ in->read(s);
+ test(s == testString);
+ in->read(s);
+ test(s == testString);
+ }
+ else
+ {
+ test(false);
+ }
+ }
+
+ {
+ Ice::ByteSeq inParams, outParams;
+ if(cl->ice_invoke("opException", Ice::Normal, inParams, outParams))
+ {
+ test(false);
+ }
+ else
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(communicator, outParams);
+ try
+ {
+ in->throwException();
+ }
+ catch(const Test::MyException&)
+ {
+ }
+ catch(...)
+ {
+ test(false);
+ }
+ }
+ }
+
+ cout << "ok" << endl;
+
+ cout << "testing asynchronous ice_invoke... " << flush;
+
+ {
+ CookiePtr cookie = new Cookie();
+
+ Ice::ByteSeq inParams, outParams;
+ Ice::OutputStreamPtr out = Ice::createOutputStream(communicator);
+ out->write(testString);
+ out->finished(inParams);
+
+ // begin_ice_invoke with no callback
+ Ice::AsyncResultPtr result = cl->begin_ice_invoke("opString", Ice::Normal, inParams);
+ if(cl->end_ice_invoke(outParams, result))
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(communicator, outParams);
+ string s;
+ in->read(s);
+ test(s == testString);
+ in->read(s);
+ test(s == testString);
+ }
+ else
+ {
+ test(false);
+ };
+
+ // begin_ice_invoke with no callback and array mapping
+ pair<const ::Ice::Byte*, const ::Ice::Byte*> inPair(&inParams[0], &inParams[0] + inParams.size());
+ result = cl->begin_ice_invoke("opString", Ice::Normal, inPair);
+ pair<const ::Ice::Byte*, const ::Ice::Byte*> outPair;
+ if(cl->end_ice_invoke(outPair, result))
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(communicator, outPair);
+ string s;
+ in->read(s);
+ test(s == testString);
+ in->read(s);
+ test(s == testString);
+ }
+ else
+ {
+ test(false);
+ };
+
+ // begin_ice_invoke with Callback
+ CallbackPtr cb = new Callback(communicator, false);
+ cl->begin_ice_invoke("opString", Ice::Normal, inParams, Ice::newCallback(cb, &Callback::opString));
+ cb->check();
+
+ // begin_ice_invoke with Callback and Cookie
+ cb = new Callback(communicator, true);
+ cl->begin_ice_invoke("opString", Ice::Normal, inParams, Ice::newCallback(cb, &Callback::opString), cookie);
+ cb->check();
+
+ // begin_ice_invoke with Callback_Object_ice_invoke
+ cb = new Callback(communicator, false);
+ Ice::Callback_Object_ice_invokePtr d =
+ Ice::newCallback_Object_ice_invoke(cb, &Callback::opStringNC);
+ cl->begin_ice_invoke("opString", Ice::Normal, inParams, d);
+ cb->check();
+
+ // begin_ice_invoke with Callback_Object_ice_invoke with Cookie
+ cb = new Callback(communicator, false);
+ d = Ice::newCallback_Object_ice_invoke(cb, &Callback::opStringWC);
+ cl->begin_ice_invoke("opString", Ice::Normal, inParams, d, cookie);
+ cb->check();
+
+ // begin_ice_invoke with Callback_Object_ice_invoke and array mapping
+ cb = new Callback(communicator, false);
+ d = Ice::newCallback_Object_ice_invoke(cb, &Callback::opStringNC);
+ cl->begin_ice_invoke("opString", Ice::Normal, inPair, d);
+ cb->check();
+
+ // begin_ice_invoke with Callback_Object_ice_invoke and array mapping with Cookie
+ cb = new Callback(communicator, false);
+ d = Ice::newCallback_Object_ice_invoke(cb, &Callback::opStringWC);
+ cl->begin_ice_invoke("opString", Ice::Normal, inPair, d, cookie);
+ cb->check();
+ }
+
+ {
+ CookiePtr cookie = new Cookie();
+ Ice::ByteSeq inParams, outParams;
+
+ // begin_ice_invoke with no callback
+ Ice::AsyncResultPtr result = cl->begin_ice_invoke("opException", Ice::Normal, inParams);
+ if(cl->end_ice_invoke(outParams, result))
+ {
+ test(false);
+ }
+ else
+ {
+ Ice::InputStreamPtr in = Ice::createInputStream(communicator, outParams);
+ try
+ {
+ in->throwException();
+ }
+ catch(const Test::MyException&)
+ {
+ }
+ catch(...)
+ {
+ test(false);
+ }
+ }
+
+ // begin_ice_invoke with Callback
+ CallbackPtr cb = new Callback(communicator, false);
+ cl->begin_ice_invoke("opException", Ice::Normal, inParams, Ice::newCallback(cb, &Callback::opException));
+ cb->check();
+
+ // begin_ice_invoke with Callback and Cookie
+ cb = new Callback(communicator, true);
+ cl->begin_ice_invoke("opException", Ice::Normal, inParams, Ice::newCallback(cb, &Callback::opException),
+ cookie);
+ cb->check();
+
+ // begin_ice_invoke with Callback_Object_ice_invoke
+ cb = new Callback(communicator, false);
+ Ice::Callback_Object_ice_invokePtr d = Ice::newCallback_Object_ice_invoke(cb, &Callback::opExceptionNC);
+ cl->begin_ice_invoke("opException", Ice::Normal, inParams, d);
+ cb->check();
+
+ // begin_ice_invoke with Callback_Object_ice_invoke with Cookie
+ cb = new Callback(communicator, false);
+ d = Ice::newCallback_Object_ice_invoke(cb, &Callback::opExceptionWC);
+ cl->begin_ice_invoke("opException", Ice::Normal, inParams, d, cookie);
+ cb->check();
+ }
+
+ cout << "ok" << endl;
+
+ return cl;
+}
diff --git a/cpp/test/Ice/invoke/BlobjectI.cpp b/cpp/test/Ice/invoke/BlobjectI.cpp
new file mode 100644
index 00000000000..b1bb6c08b9b
--- /dev/null
+++ b/cpp/test/Ice/invoke/BlobjectI.cpp
@@ -0,0 +1,104 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <BlobjectI.h>
+#include <Test.h>
+#include <TestCommon.h>
+
+using namespace std;
+
+bool
+invokeInternal(const Ice::InputStreamPtr& in, vector<Ice::Byte>& outParams, const Ice::Current& current)
+{
+ Ice::CommunicatorPtr communicator = current.adapter->getCommunicator();
+ Ice::OutputStreamPtr out = Ice::createOutputStream(communicator);
+ if(current.operation == "opString")
+ {
+ string s;
+ in->read(s);
+ out->write(s);
+ out->write(s);
+ out->finished(outParams);
+ return true;
+ }
+ else if(current.operation == "opException")
+ {
+ Test::MyException ex;
+ out->writeException(ex);
+ out->finished(outParams);
+ return false;
+ }
+ else if(current.operation == "shutdown")
+ {
+ communicator->shutdown();
+ return true;
+ }
+ else if(current.operation == "ice_isA")
+ {
+ string s;
+ in->read(s);
+ if(s == "::Test::MyClass")
+ {
+ out->write(true);
+ }
+ else
+ {
+ out->write(false);
+ }
+ out->finished(outParams);
+ return true;
+ }
+ else
+ {
+ Ice::OperationNotExistException ex(__FILE__, __LINE__);
+ ex.id = current.id;
+ ex.facet = current.facet;
+ ex.operation = current.operation;
+ throw ex;
+ }
+}
+
+bool
+BlobjectI::ice_invoke(const vector<Ice::Byte>& inParams, vector<Ice::Byte>& outParams, const Ice::Current& current)
+{
+ Ice::InputStreamPtr in = Ice::createInputStream(current.adapter->getCommunicator(), inParams);
+ return invokeInternal(in, outParams, current);
+}
+
+bool
+BlobjectArrayI::ice_invoke(const pair<const Ice::Byte*, const Ice::Byte*>& inParams, vector<Ice::Byte>& outParams,
+ const Ice::Current& current)
+{
+ Ice::InputStreamPtr in = Ice::createInputStream(current.adapter->getCommunicator(), inParams);
+ return invokeInternal(in, outParams, current);
+}
+
+
+void
+BlobjectAsyncI::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& cb, const vector<Ice::Byte>& inParams,
+ const Ice::Current& current)
+{
+ Ice::InputStreamPtr in = Ice::createInputStream(current.adapter->getCommunicator(), inParams);
+ vector<Ice::Byte> outParams;
+ bool ok = invokeInternal(in, outParams, current);
+ cb->ice_response(ok, outParams);
+}
+
+void
+BlobjectArrayAsyncI::ice_invoke_async(const Ice::AMD_Object_ice_invokePtr& cb,
+ const pair<const Ice::Byte*, const Ice::Byte*>& inParams,
+ const Ice::Current& current)
+{
+ Ice::InputStreamPtr in = Ice::createInputStream(current.adapter->getCommunicator(), inParams);
+ vector<Ice::Byte> outParams;
+ bool ok = invokeInternal(in, outParams, current);
+ pair<const Ice::Byte*, const Ice::Byte*> outPair(&outParams[0], &outParams[0] + outParams.size());
+ cb->ice_response(ok, outParams);
+}
diff --git a/cpp/test/Ice/invoke/BlobjectI.h b/cpp/test/Ice/invoke/BlobjectI.h
new file mode 100644
index 00000000000..08b6f4c1d2a
--- /dev/null
+++ b/cpp/test/Ice/invoke/BlobjectI.h
@@ -0,0 +1,47 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef BLOBJECT_H
+#define BLOBJECT_H
+
+#include <Ice/Object.h>
+
+class BlobjectI : public Ice::Blobject
+{
+public:
+
+ virtual bool ice_invoke(const std::vector<Ice::Byte>&, std::vector<Ice::Byte>&, const Ice::Current&);
+};
+
+class BlobjectArrayI : public Ice::BlobjectArray
+{
+public:
+
+ virtual bool ice_invoke(const std::pair<const Ice::Byte*, const Ice::Byte*>&, std::vector<Ice::Byte>&,
+ const Ice::Current&);
+};
+
+
+class BlobjectAsyncI : public Ice::BlobjectAsync
+{
+public:
+
+ virtual void ice_invoke_async(const Ice::AMD_Object_ice_invokePtr&, const std::vector<Ice::Byte>&,
+ const Ice::Current&);
+};
+
+class BlobjectArrayAsyncI : public Ice::BlobjectArrayAsync
+{
+public:
+
+ virtual void ice_invoke_async(const Ice::AMD_Object_ice_invokePtr&,
+ const std::pair<const Ice::Byte*, const Ice::Byte*>&, const Ice::Current&);
+};
+
+#endif
diff --git a/cpp/test/Ice/invoke/Client.cpp b/cpp/test/Ice/invoke/Client.cpp
new file mode 100644
index 00000000000..394be5c412d
--- /dev/null
+++ b/cpp/test/Ice/invoke/Client.cpp
@@ -0,0 +1,62 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[],
+ const Ice::CommunicatorPtr& communicator,
+ const Ice::InitializationData& initData)
+{
+ Test::MyClassPrx allTests(const Ice::CommunicatorPtr&);
+ Test::MyClassPrx myClass = allTests(communicator);
+
+ myClass->shutdown();
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ communicator = Ice::initialize(argc, argv, initData);
+ status = run(argc, argv, communicator, initData);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if(communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/invoke/Makefile b/cpp/test/Ice/invoke/Makefile
new file mode 100644
index 00000000000..a00870cdcb3
--- /dev/null
+++ b/cpp/test/Ice/invoke/Makefile
@@ -0,0 +1,43 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+
+TARGETS = $(CLIENT) $(SERVER)
+
+COBJS = Test.o \
+ Client.o \
+ AllTests.o
+
+SOBJS = Test.o \
+ BlobjectI.o \
+ Server.o
+
+SRCS = $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp)
+
+SLICE_SRCS = Test.ice
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+SLICE2CPPFLAGS := --stream $(SLICE2CPPFLAGS)
+
+$(CLIENT): $(COBJS)
+ rm -f $@
+ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(LIBS)
+
+$(SERVER): $(SOBJS)
+ rm -f $@
+ $(CXX) $(LDFLAGS) -o $@ $(SOBJS) $(LIBS)
+
+include .depend
diff --git a/cpp/test/Ice/invoke/Makefile.mak b/cpp/test/Ice/invoke/Makefile.mak
new file mode 100644
index 00000000000..979a5e71f1c
--- /dev/null
+++ b/cpp/test/Ice/invoke/Makefile.mak
@@ -0,0 +1,51 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..\..\..
+
+CLIENT = client.exe
+SERVER = server.exe
+
+TARGETS = $(CLIENT) $(SERVER)
+
+COBJS = Test.obj \
+ Client.obj \
+ AllTests.obj
+
+SOBJS = Test.obj \
+ BlobjectI.obj \
+ Server.obj
+
+SRCS = $(COBJS:.obj=.cpp) \
+ $(SOBJS:.obj=.cpp)
+
+!include $(top_srcdir)/config/Make.rules.mak
+
+CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+SLICE2CPPFLAGS = --stream $(SLICE2CPPFLAGS)
+
+!if "$(GENERATE_PDB)" == "yes"
+CPDBFLAGS = /pdb:$(CLIENT:.exe=.pdb)
+SPDBFLAGS = /pdb:$(SERVER:.exe=.pdb)
+!endif
+
+$(CLIENT): $(COBJS)
+ $(LINK) $(LD_EXEFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
+
+$(SERVER): $(SOBJS)
+ $(LINK) $(LD_EXEFLAGS) $(SPDBFLAGS) $(SETARGV) $(SOBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
+
+clean::
+ del /q Test.cpp Test.h
+
+!include .depend
diff --git a/cpp/test/Ice/invoke/Server.cpp b/cpp/test/Ice/invoke/Server.cpp
new file mode 100644
index 00000000000..f704ffae89c
--- /dev/null
+++ b/cpp/test/Ice/invoke/Server.cpp
@@ -0,0 +1,130 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceUtil/Options.h>
+#include <BlobjectI.h>
+
+using namespace std;
+
+class ServantLocatorI : public Ice::ServantLocator
+{
+public:
+
+ ServantLocatorI(bool array, bool async)
+ {
+ if(array)
+ {
+ if(async)
+ {
+ _blobject = new BlobjectArrayAsyncI();
+ }
+ else
+ {
+ _blobject = new BlobjectArrayI();
+ }
+ }
+ else
+ {
+ if(async)
+ {
+ _blobject = new BlobjectAsyncI();
+ }
+ else
+ {
+ _blobject = new BlobjectI();
+ }
+ }
+ }
+
+ virtual Ice::ObjectPtr
+ locate(const Ice::Current&, Ice::LocalObjectPtr&)
+ {
+ return _blobject;
+ }
+
+ virtual void
+ finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr&)
+ {
+ }
+
+ virtual void
+ deactivate(const string&)
+ {
+ }
+
+private:
+
+ Ice::ObjectPtr _blobject;
+};
+
+
+int
+run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
+{
+ IceUtilInternal::Options opts;
+ opts.addOpt("", "array");
+ opts.addOpt("", "async");
+
+ vector<string> args;
+ try
+ {
+ args = opts.parse(argc, (const char**)argv);
+ }
+ catch(const IceUtilInternal::BadOptException& e)
+ {
+ cout << argv[0] << ": " << e.reason << endl;
+ return false;
+ }
+ bool array = opts.isSet("array");
+ bool async = opts.isSet("async");
+
+ communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
+ adapter->addServantLocator(new ServantLocatorI(array, async), "");
+ adapter->activate();
+
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ Ice::InitializationData initData;
+ initData.properties = Ice::createProperties(argc, argv);
+ communicator = Ice::initialize(argc, argv, initData);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if(communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/invoke/Test.ice b/cpp/test/Ice/invoke/Test.ice
new file mode 100644
index 00000000000..5e624e9204b
--- /dev/null
+++ b/cpp/test/Ice/invoke/Test.ice
@@ -0,0 +1,31 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+module Test
+{
+
+exception MyException
+{
+};
+
+class MyClass
+{
+ string opString(string s1, out string s2);
+
+ void opException() throws MyException;
+
+ void shutdown();
+};
+
+};
+
+#endif
diff --git a/cpp/test/Ice/invoke/run.py b/cpp/test/Ice/invoke/run.py
new file mode 100755
index 00000000000..6b63023f48e
--- /dev/null
+++ b/cpp/test/Ice/invoke/run.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys
+
+path = [ ".", "..", "../..", "../../..", "../../../.." ]
+head = os.path.dirname(sys.argv[0])
+if len(head) > 0:
+ path = [os.path.join(head, p) for p in path]
+path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
+if len(path) == 0:
+ raise "can't find toplevel directory!"
+sys.path.append(os.path.join(path[0]))
+from scripts import *
+
+print "tests with Blobject server."
+TestUtil.clientServerTest()
+print "tests with BlobjectArray server."
+TestUtil.clientServerTest(additionalServerOptions = "--array")
+print "tests with BlobjectAsync server."
+TestUtil.clientServerTest(additionalServerOptions = "--async")
+print "tests with BlobjectAsyncArray server."
+TestUtil.clientServerTest(additionalServerOptions = "--array --async")
+