[omniORB] omniINSPOA and wide character sets problem

Cameron Rochester Cameron.Rochester at Ripple-Systems.com
Mon Feb 16 11:13:18 GMT 2004


Hi all,

I am using the omniINSPOA to activate a servant that I need to contact
without a Naming Service. I believe it is called "bootstrapping" by some...
Let me give it an id of "fred" for the purposes of this example. Everything
is working fine until we started converting our apps to use wide strings for
multi-language support.

The problem, as I see it, is objects activated with the omniINSPOA do not
seem to have any character set information encoded on the server side. When
making a request on "fred" only the default character set (8859_1) is set by
the clientSendRequest interceptor
"setCodeSetServiceContext(omniInterceptors::clientSendRequest_T::info_T&
info)"

Even if I explicitly create the corbaloc url with IIOP version of 1.2 (it
defaults to 1.0) with something like "corbaloc:iiop:1.2 at host:port/fred" the
clientSendRequest interceptor still defaults to 8859_1, without any wide
character set at all (it is set to NULL).

A snippet of code from
"setCodeSetServiceContext(omniInterceptors::clientSendRequest_T::info_T&
info)" shows where the character sets are being assigned.

    tcs_c = info.ior.getIORInfo()->TCS_C();
    tcs_w = info.ior.getIORInfo()->TCS_W();
    if (tcs_c || tcs_w) {
      sendcontext = 1;
      d.tcs_c = tcs_c;
      d.tcs_w = tcs_w;
      d.version = ver;
      d.tcs_selected = 1;
    }
    else {
      // The server has not supplied any code set information.
      // Use the default code set.
      tcs_c = omniCodeSet::getTCS_C(omniCodeSet::ID_8859_1,ver);
    }

With "fred" tcs_c & tcs_w are NULL after the respective calls to
ior.getIORInfo()->TCS_C() and ior.getIORInfo()->TCS_W() resulting in only
the non-wide character set being set in the else statement. This results in
a BAD_PARAM_WCharTCSNotKnown exception being thrown (as tcs_w is NULL) the
first time an operation is called on "fred".

So, the questions are:
1) Is there a way I can activate an IIOP 1.2 compliant object with the
omniINSPOA that will give wide character set information via getIORInfo()? 
2) Failing 1), is it possible to get tcs_w set to the UTF-16 character set
in the
"setCodeSetServiceContext(omniInterceptors::clientSendRequest_T::info_T&
info)" clientSendRequest interceptor?
3) Failing 2), should I write my own clientSendRequest interceptor and set
info.giopstream.TCS_W( omniCodeSet::ID_UTF_16 ) manually?

Thanks
Cameron Rochester






More information about the omniORB-list mailing list