[omniORB] type Any
Christophe de Vienne
cdevienne@alphacent.com
Tue Jul 9 14:04:00 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I have a problem with the Any type when using it with Visibroker 3.3 for
Delphi.
1) Description of what bother me :
On the server side we use OmniORB 3.0.4 on a Linux box (Slackware 8.1).
I have a method called xfSetRecord declared as follow in one of my interfaces:
void xfSetRecord(in data_record d) raises(Error, PermDenied);
The data_record type is declared like this :
typedef sequence<any> data_record;
The problem occur when we have a string in one the any. If the client is
omniORB or JavaORB, everything works perfectly. But if its visibroker, we
cannot extract the string from a Any.
For example, let's suppose first element of the given seq is a string :
void RessouceImpl::xfSetRecord(
const Myrdv::data_record & d)
throw (Myrdv::Error, Myrdv::PermDenied)
{
const char * s;
if( d[0] >>= s )
{
// this point is not reached
}
}
Having a closer look to what was going on, we put omnitracelevel to 30, and
observed what was transfered. Here are 2 samples of the same call to
xfSetRecord; one made by javaORB (this one works), one made by visibroker :
the call is
xfSetRecord(datas) with datas containing (6, 14, "j", "j", 0, 9)
JavaORB :
4749 4f50 0100 0000 0000 0094 0000 0001 GIOP............
4e45 4f00 0000 0002 000a 0000 0000 0078 NEO............x
0100 0000 0000 001d ff6d 7972 6476 5f70 .........myrdv_p
6f61 0073 655f 345f 325f 6370 5f43 464c oa.se_4_2_cp_CFL
5f72 735f 3600 0000 0000 000c 7866 5365 _rs_6.......xfSe
7452 6563 6f72 6400 0000 0000 0000 0006 tRecord.........
0000 0005 0000 0006 0000 0005 0000 000e ................
0000 0012 0000 0000 0000 0002 6a00 0000 ............j...
0000 0012 0000 0000 0000 0002 6a00 0000 ............j...
0000 0005 0000 0000 0000 0005 0000 0009 ................
Visibroker :
4749 4f50 0100 0100 8800 0000 0000 0000 GIOP............
9000 0000 ff20 2020 1d00 0000 ff6d 7972 ..... .....myr
6476 5f70 6f61 0073 655f 345f 315f 6370 dv_poa.se_4_1_cp
5f43 464c 5f72 735f 3620 2020 0c00 0000 _CFL_rs_6 ....
7866 5365 7452 6563 6f72 6400 0000 0000 xfSetRecord.....
0600 0000 0300 0000 0600 0000 0300 0000 ................
0e00 0000 1200 0000 0100 0000 0200 0000 ................
6a00 2020 1200 0000 0100 0000 0200 0000 j. ............
6a00 2020 0300 0000 0000 0000 0300 0000 j. ............
0900 0000 ....
It appear that the string is not encoded the same way. As far as the
Long/ULong, it is normal : Delphi Variant type, used as a base for Any type,
cannot be unsigned, but we found a workaround on this point.
2) The question
it's quite simple in fact : is there a simple way to have omniORB Any
implementation "anderstanding" the string as visibroker encode it ? Where can
I try to tweak OmniORB for that ?
Does this appear realistic to you ?
I would very appreciate any help on this blocking problem...
Regards,
Christophe de Vienne
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9Kt8vB+sU3TyOQjARAtmRAKC4KqkUHrUJMp1wDoik3quw6VFXXgCgwLTk
Y8rAnny/3h1fSzJdRAIcxoo=
=SX26
-----END PGP SIGNATURE-----