exception question



Hello,

I am new to ORBit so bare with me :) - I have several questions:

1. I get an exception #2 - tried looking for it through the sources but
couldnt find it (I get this in the client calling a simple method on the
server).

2. In my idl I have a typedef<octet> bytes; and later I have bytes
serialize() ;

Now, if I have a char* and want to put it in Data, can someone show me the
code to do this? I am just trying to get a hang of it. My guess is this:

DICE2_Basic_CORBA_bytes *retval;

/* hmmmmm.... lets see if this works */
retval = NULL;
retval = malloc(sizeof(struct CORBA_sequence_octet_struct));
if (retval) {
	retval->_buffer =
	malloc(sizeof(CORBA_octet)*(strlen(id_local)+1));
	if (retval->_buffer) {
		retval->_length = strlen(id_local);
		memcpy(retval->_buffer, local_id, strlen(id_local));
	}
}
return retval;

Am I completely lost and off track or...? :)

Ognen
-- 
Ognen Duzlevski
Plant Biotechnology Institute
National Research Council of Canada
Bioinformatics team




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]