[omniORB] Invalid TypeCode..

Gary D. Duzan gdd0@gte.com
Tue, 25 Apr 2000 09:54:46 -0400


   This option changes how ANYs are encoded somewhat. Instead of
duplicating typecodes for member types, setting this option to 1
(presumably the default) tells the ORB to emit the first usage of
a typecode normally and emit an offset to the first typecode for
subsequent ones. Setting it to zero tells the ORB to be verbose
and emit the whole thing every time.
   As for why it breaks Orbix, there were known problems with
typecode offsets in some versions of Orbix, so I would assume this
is an aspect of the bug. Newer versions should have it fixed, but
you can use the workaround for now, though you may see some
performance degradation, depending on the complexity of the data
you are sending.

					Gary Duzan
					GTE Laboratories



In Message <20000425134414.26114.qmail@web1203.mail.yahoo.com> ,
   Shawn Bisgrove <shawn_bisgrove@yahoo.com> wrote:

=>Armin,
=>
=>   That worked.  Thanks!   
=>
=>   The question now is why did it work and what does
=>it do?   Forgive me for being dense.  I would like to
=>know if this is nescessary to solve the problem at
=>hand or if it is just coincidentally masking the
=>underlying problem.
=>
=>   omniORB::useTypeCodeIndirections = 0 ; //added 
=>
=>
=>s.
=>
=>--- Armin Gerritsen <a.a.gerritsen@phys.uu.nl> wrote:
=>> I had a similar problem with omniORB 2.8.0 and
=>> Visbroker 3.x.
=>> I ended up setting teh follwing line in my omniORB
=>> servercode:
=>> 
=>> CORBA::ORB_var orb = CORBA::ORB_init(argc, argv,
=>> "omniORB2");
=>> boa = orb->BOA_init(argc, argv, "omniORB2_BOA");
=>> 
=>> omniORB::useTypeCodeIndirections = 0 ; //added line
=>> 
=>> DataManagerImpl *impl = new DataManagerImpl( argv[1]
=>> ) ;
=>> 
=>> Regards,
=>> 
=>> Armin
=>> 
=>> > Guys,
=>> > 
=>> > Version OmniORB: 3.0 Apr 20
=>> > Solaris 2.6
=>> > 
=>> > 
=>> >    I have a problem that I am stumped on and have
=>> not
=>> > been able to verify where the problem resides.  I
=>> am
=>> > working with an IDL to "go" against a black box
=>> system
=>> > running ORBIX 3.0.1.   The system requires the
=>> passage
=>> > of a DAG with nodes having a attribute_name and
=>> value.
=>> >  The value is of type ANY.  For one structure I
=>> pass
=>> > in the system's DAG validator tells me that the
=>> node
=>> > does not contain the appropriate type
=>> > GIAS::AlterationSpec.  After verifying that I had
=>> > initialized the node correctly, I have been
=>> talking
=>> > with an individual on the other systems
=>> development
=>> > team.  He thinks that it might be a typecode
=>> mangling
=>> > problem.  
=>> > 
=>> > Just as an aside, when I use JDK 1.3 idlj and send
=>> a
=>> > GIAS::AlterationSpec (using a similiar program)
=>> within
=>> > the DAG to this black box, everything works OK.
=>> > 
=>> > My next check would be to code a simple server
=>> > interface using OmniORB 3.0 (Apr 20) and use a
=>> java
=>> > client to verify that OmniORB can extract the
=>> > GIAS::AlterationSpec correctly.
=>> > 
=>> > I usually like to narrow down the problem to a
=>> line of
=>> > code before I ship it out to you guys, but I cant
=>> seem
=>> > to do any better than this at the moment.  Here is
=>> the
=>> > structure definition for a GIAS::AlterationSpec as
=>> it
=>> > exists for both systems.
=>> > 
=>> > = gias.idl
=>> ===========================================
=>> > #ifndef _GIAS_IDL_
=>> > #define _GIAS_IDL_
=>> > #include "ucos.idl"
=>> > module GIAS
=>> > {
=>> > 
=>> > typedef UCO::Rectangle GeoRegion;
=>> > 
=>> > typedef string          ProductFormat;
=>> > typedef string          ImageFormat;
=>> > typedef string          Compression;
=>> > typedef short           BitsPerPixel;
=>> > typedef sequence<short> RsetList;
=>> > typedef string          Algorithm;
=>> > 
=>> > struct ImageSpec{
=>> >         ImageFormat     ift;
=>> >         Compression     comp;
=>> >         BitsPerPixel    bpp;
=>> >         RsetList        rsl;
=>> >         GeoRegion       gr;
=>> >         Algorithm       algo;
=>> >         };
=>> > 
=>> > typedef sequence<ImageSpec> ImageSpecList;
=>> > 
=>> > struct AlterationSpec{
=>> >       ProductFormat          pf;
=>> >       ImageSpecList          isl;
=>> >       };
=>> > };
=>> > #endif file://_GIAS_IDL_
=>> >
=>>
=>=====================================================
=>> > = ucos.idl
=>> ==========================================
=>> > #ifndef _UCOS_IDL_
=>> > #define _UCOS_IDL_
=>> > 
=>> > module UCO
=>> > {
=>> > // Basic Geospatial  data types
=>> > file://3D integer coordinate
=>> >   struct LongCoord
=>> >     {
=>> >       long x;
=>> >       long y;
=>> >       long z;
=>> >     };
=>> > 
=>> > // 3D floating point coordinate
=>> >   struct DoubleCoord
=>> >     {
=>> >       double x;
=>> >       double y;
=>> >       double z;
=>> >     };
=>> > 
=>> >   enum CoordinateType
=>> >     {
=>> >       TYPEDOUBLE, TYPELONG
=>> >     };
=>> > 
=>> >   union Coordinate switch (CoordinateType)
=>> >     {
=>> >     case TYPEDOUBLE:
=>> >       DoubleCoord d_coord;
=>> >     case TYPELONG:
=>> >       LongCoord l_coord;
=>> >     };
=>> > 
=>> >   struct Rectangle
=>> >     {
=>> >       Coordinate ul;
=>> >       Coordinate lr;
=>> >     };
=>> > };                              // End of module
=>> UCO
=>> > 
=>> > #endif // _UCOS_IDL_
=>> >
=>> ====================================================
=>> > 
=>> > Any ideas??
=>> > 
=>> > 
=>> > s.
=>> > 
=>> > 
=>> > =====
=>> > ________________________________________
=>> > |shawn_bisgrove@partech.com
=>> > |http://www.geocities.com/shawn_bisgrove
=>> > 
=>> > __________________________________________________
=>> > Do You Yahoo!?
=>> > Send online invitations with Yahoo! Invites.
=>> > http://invites.yahoo.com
=>> > 
=>> 
=>
=>=====
=>________________________________________
=>|shawn_bisgrove@partech.com
=>|http://www.geocities.com/shawn_bisgrove
=>
=>__________________________________________________
=>Do You Yahoo!?
=>Send online invitations with Yahoo! Invites.
=>http://invites.yahoo.com