Having problems with the server when using callbacks.

Article ID: 982
Last updated: 31 Jan, 2008
Article ID: 982
Last updated: 31 Jan, 2008
Revision: 1
Views: 2781
Posted: 07 Mar, 2000
by Dean J.
Updated: 31 Jan, 2008
by Dean J.
Problem


I am having problems with the server when using callbacks. The server fails with the following error:

Error message on this call:
Error:Marshal:TOBJ:Server Can Not Decode Request




Cause


This is a common problem we have been seeing with customers applications when using callback mechanisms. For example if I have the following idl:
module EchoModule {

interface Callback {
void callme(in string calstr);
};

interface Echo {
void echo(in string str, in Callback cbObj, in long count);
};

};
And the client tries to invoke the echo method:
EchoModule::Echo_ptr echoObj = EchoModule::Echo::_narrow(obj);
echoObj->echo(cbObj);
Then the client could run into the following error:
Error message on this call:
Error:Marshal:TOBJ:Server Can Not Decode Request

The problem is that the server code has no idea how to marshal the object reference as the decoding information for the Callback object is in the proxy code.


Action


You need to make sure that you are linking both the _proxy.obj and _skel.obj on both the client and the server. This should fix the problem.
This article was:   Helpful | Not helpful
Report an issue
Article ID: 982
Last updated: 31 Jan, 2008
Revision: 1
Views: 2781
Posted: 07 Mar, 2000 by Dean J.
Updated: 31 Jan, 2008 by Dean J.

Others in this category