[omniORB] Re: value type: Marshall error

Андрей Пучин pouchin at gmail.com
Fri Sep 30 14:32:57 BST 2005


Hello again!

Duncan, tao and omni generates different typecodes for valuetypes inserted in Any.

For example for IDL:
   typedef any QueryAttributeValue;

   enum LogicOperation {
       LO_OR
       , LO_AND
       , LO_NOT
   };

   valuetype QueryDictData {
       public LogicOperation operation;

   };

   interface SearchManager {
     long search (in QueryAttributeValue search_query);
   };

omni ORB client while invoking SearchManager.search operation generates this
message:

-->message part skipped

49 44 4c 3a 56 61 6c 75  65 54 65 73 74 2f 51 75   IDL:ValueTest/Qu
65 72 79 44 69 63 74 44  61 74 61 3a 31 2e 30 00   eryDictData:1.0.
0e 00 00 00 51 75 65 72  79 44 69 63 74 44 61 74   ....QueryDictDat
61 00 00 00 00 00 00 00  01 00 00 00 0a 00 00 00   a...............
6f 70 65 72 61 74 69 6f  6e 00 00 00 11 00 00 00   operation.......

-->message part skipped

but tao client generates:

-->message part skipped

49 44 4c 3a 56 61 6c 75  65 54 65 73 74 2f 51 75   IDL:ValueTest/Qu
65 72 79 44 69 63 74 44  61 74 61 3a 31 2e 30 00   eryDictData:1.0.
0e 00 00 00 51 75 65 72  79 44 69 63 74 44 61 74   ....QueryDictDat
61 00 00 00 00 00 00 00  00 00 00 00 01 00 00 00   a...............
0a 00 00 00 6f 70 65 72  61 74 69 6f 6e 00 00 00   ....operation...

-->message part skipped

I think that difference in generated typecode is field with comment about no stateful base valuetype (see below). Omni does not creates this field in typecode, but tao server sends marshalling error while this field not presented:

// TAO_IDL - Generated from
// x:\ace_wrappers\tao\tao_idl\be\be_visitor_typecode/typecode_defn.cpp:295

static const CORBA::Long _oc_ValueTest_QueryDictData[] = {

//-> some fields skipped
  ACE_NTOHL (0x61000000),  // name = QueryDictData
    0, // value modifier
  CORBA::tk_null, // no stateful base valuetype

1, // member count
//-> some fields skipped
};

Is this Tao or omni problem?



Thursday, September 29, 2005, 1:34:15 PM, you wrote:

> On Thursday 29 September,
> =?Windows-1251?Q?=C0=ED=E4=F0=E5=E9_=CF=F3=F7=E8=ED?= wrote:

>> I've made a simple example, client and server on python.
>> it didn't work.
>> 
>> OmniORB raises exception when i put in Any valuetype
>> >> omniORB: throw BAD_TYPECODE from GIOP_C.cc:268 (NO,BAD_TYPECODE_UnknownKind)
>> 
>> What's wrong?

> Probably that you're using an ancient version...

>> omniORB and omniORBpy from
>> >> Mon Apr 25 19:26:20 BST 2005 dgrisby
>> 
>> Can't build latest version on Windows.

> What goes wrong?  It works fine for me. What compiler are you using?

> Cheers,

> Duncan.



-- 
Best regards,
 Андрей                            mailto:pouchin at gmail.com




More information about the omniORB-list mailing list