[omniORB] WString Marshalling Error?
Stephen Crawley
crawley@dstc.edu.au
Tue, 28 Aug 2001 13:09:40 +1000
> I'm using omniORB4, snapshot of 15-Aug-2001. In the implementation of the
> function TCS_W_UTF_16::marshalWString() (in the source file cs-utf-16.cc),
> there's a comment:
>
> // Just to be different, wstring is marshalled without a terminating
> // null. Length is in octets.
>
> Is this right?
Yes. It is really right.
> When trying to make a call to a method with a wstring
> parameter, and when the servant is implemented using a different ORB, I'm
> getting an IDL:omg.org/CORBA/MARSHAL:1.0 exception back from the
> servant. Everything I've been able to find so far (CORBA 2.3 spec, Henning
> and Vinoski) seems to state that the terminating null SHOULD be included
> with the wstring.
I believe that this changed in GIOP / CDR version 1.2.
Let me guess ... the other ORB is Visibroker 4.x, right? The
marshalling of WString in VB 4.0 is not GIOP 1.2 conformant. In VB 4.1
and 4.5, the marshalling of WString is backwards compatible with VB 4.0
by default. To get standards compliance (in VBJ 4.{1,5} at least) you
have to set the "vbroker.orb.enableVB4backcompat" property to false.
-- Steve