[omniORB] Invalid TypeCode..

Armin Gerritsen a.a.gerritsen@phys.uu.nl
Tue, 25 Apr 2000 15:30:06 +0200


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