Discussion:
[omniORB] TypeCode Any problems continued
PK
2010-05-18 16:00:27 UTC
Permalink
Hello,

Continuation of the problem regarding the TypeCode in the Any.

I tried the following:



CORBA::TypeCode_var tc_any_a = orb->create_alias_tc("IDL:c/*l*/*c*/*s*
/aList:1.0","alist",CORBA::_tc_any);



CORBA::StructMemberSeq a_tc_members;

a_tc_members.length(4);

a_tc_members[0].name = CORBA::string_dup("n");

a_tc_members[0].type = CORBA::TypeCode::_duplicate(CORBA::_tc_string);

a_tc_members[1].name = CORBA::string_dup("v");

a_tc_members[1].type = tc_any_a;

a_tc_members[2].name = CORBA::string_dup("f");

a_tc_members[2].type = CORBA::TypeCode::_duplicate(CORBA::_tc_long);

a_tc_members[3].name = CORBA::string_dup("l");

a_tc_members[3].type = CORBA::TypeCode::_duplicate(CORBA::_tc_short);

CORBA::TypeCode_var tc_a= orb->create_struct_tc("IDL:c/*l*/*c*/*s*
/a:1.0","a",a_tc_members);



CORBA::TypeCode_var tc_alist= orb->create_sequence_tc(0, tc_a);

DynamicAny::DynAny_var dv = daf->create_dyn_any_from_type_code(tc_alist);



My intention was to correctly insert the TypeCode information into the ?a?.

The output was the same, no Type description nor Id related to the list or
the listlist TypeCode was found in the logs.

How can I insert the correct alias information to the request? The server
side cannot interpret the request I am sending. Am I misunderstanding
something?

Thanks in advance for the help.

Best Regards

PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20100518/3abcf9c1/attachment-0001.htm
Duncan Grisby
2010-06-01 17:32:16 UTC
Permalink
On Tue, 2010-05-18 at 12:00 +0200, PK wrote:

[...]
Post by PK
How can I insert the correct alias information to the request? The
server side cannot interpret the request I am sending. Am I
misunderstanding something?
Please come up with an absolutely minimal example that shows the problem
and post the complete code for it. It's impossible to diagnose anything
with just small fragments of your code.

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
PK
2010-06-01 19:52:37 UTC
Permalink
Hello,
I found a solution, just did not have time to send it to the mailing list.
The problem was caused by the flag tcAliasExpand.
But not just simple that.
I had an omniORB.cfg file, had all environment variable set up correctly. In
the cfg file I had the tcAliasExpand flag set to 0, as it was ment.
In the code I had a recommended code by the guide:
const char* options[][2] = {{"maxGIOPVersion","1.2"},
{"lcdMode","1"},{"clientCallTimeOutPeriod", "0"}, {"traceLevel",
"40"},{"tcAliasExpand","0"}, {0,0} };
orb = CORBA::ORB_init(argc, argv,"omniORB4", options);
Despite in the cfg file, and in the options part set value, in the logs I
could see that the tcAliasExpand is 1.
The solution was to use
orb = CORBA::ORB_init(argc, argv);
and this solved the tcAliasExpand problem, and the problem with alias
interpretation also.

I am struggling with another problem, if I do not find a solution, I will
post it to the mailing list.
Best Regards
PK
Post by Duncan Grisby
[...]
Post by PK
How can I insert the correct alias information to the request? The
server side cannot interpret the request I am sending. Am I
misunderstanding something?
Please come up with an absolutely minimal example that shows the problem
and post the complete code for it. It's impossible to diagnose anything
with just small fragments of your code.
Duncan.
--
-- Duncan Grisby --
-- http://www.grisby.org --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20100601/dbadb6d6/attachment.htm
Loading...