Ice-1.1.1:
To help me learn about Ice I thought I'd try adapting the Ice/demo/throughput
clients (C++ and Java) to use oneway messaging instead of twoway. I had
no problems with the Java version, but when I try to run my modified
Client.cpp I get:
sending and receiving 1 sequences of size 4096 (this may take a while)
BasicStream.cpp:464: Ice::UnmarshalOutOfBoundsException:
protocol error: out of bounds during unmarshaling
(I've also modified the program to accept repetitions and seqSize as
command line arguments, hence the change in the above message. This
code works fine in the twoway case.)
I built the oneway example following the example given in 16.10 of the
manual - the key code segment in the modified Client.cpp is:
Ice::ObjectPrx base = communicator->stringToProxy(proxy);
Ice::ObjectPrx oneway;
try {
oneway = base->ice_oneway();
}
catch (...) { // Couldn't compile with (const Ice::NoEndPointException &) per example?
cerr << "No endpoint for oneway invocations" << endl;
return EXIT_FAILURE;
}
ThroughputPrx throughput = ThroughputPrx::uncheckedCast(oneway);
if(!throughput)
{
cerr << argv[0] << ": invalid proxy" << endl;
return EXIT_FAILURE;
}
This compiles and builds, but dies on the later:
throughput->echoByteSeq(seq);
with the above message.
Can someone point me to what I've done wrong?
Thanks!

Reply With Quote