[omniORB] DSI server problem

Ondrej Bosik ondrej at frcatel.fri.utc.sk
Sat Jun 18 23:25:57 BST 2005


Hi Duncan,

I made a server using the DSI and encountered a little problem.
I am implementing the interface like

module Middleware
{
	struct Service_1_Request {...something ...};
	struct Service_1_Reply { ...something...};

	interface Service_1
	{
		Service_1_Reply call(in Service_1_Request req);
	};
};

When I create the parameter list and call

server_request->arguments() within _invoke() member function, I get a
parameter list with length of 2. The list is created by statement

CORBA::NVList_ptr args; //btw, why not CORBA::NVList_var ???
orb->create_list(1,args);
CORBA::NamedValue_ptr nv = args->add(CORBA::ARG_IN);
nv->value()->replace(Middleware::_tc_Service_1_Request, 0);

And what I get is the list of length 2, where the first item is a
CORBA::Any with type of tk_null. 

Thus, extarction from CORBA::Any on third line of 

const Middleware::Service_1_Request* req;
CORBA::Any* aa = args->item(0)->value();
*aa >>= req;

fails. When I use 1 as an index for item() call, the correct values are
matched and everything works fine.

I was digging in omniORB source to locate the problem but it's too
complicated to bo feasible in reasonable time for me.

Am I missing something or it's really a bug ?

		Ondrej




More information about the omniORB-list mailing list