Server with ROAnsiString and clients with delphi 7

i have clients developed in delphi 7 RO SDK 9.2.101.1295 and server developed with Tokio 10.2 and RO SDk 9.2.
Now i have updated RO SDK on Delphi Tokio to 9.4.107.1363 on our server and is itroduced ROAnsiString instead ansistring. Our clients (delphi 7 RO 9.2) have problems to connect to our server (delphi tokio RO 9.4), there is an exception read stream error. I think the problem was on the server were ROAnsistrig is mapped in uROEncoding to string (that is unicode in delphi tokio) while in the clients (delphi 7) is ansistring. How can i resolve this ?

What server type (RODL or Code-First) you are using ?

if RODL based, is AnsiString datatype used?

for Code-First servers, you should specify ROSerializeResultAsAnsiString/ROSerializeAsAnsiString attributes.

    [ROServiceMethod]
    [ROSerializeResultAsAnsiString]
    function Echo([ROSerializeAsAnsiString] const aValue: ROAnsiString):ROAnsiString;

after this, data will be serialized as pure AnsiString

is that!!

Thanks

Some service are Code-first and some are RODL based, I have added attributes ROSerializeResultAsAnsiString/ROSerializeAsAnsiString to first code service and work fine. In RODL service the data type used is AnsiString but in the intf are translated in ROAnsiString !

it is as designed.

in mobile platforms and Linux, AnsiString type isn’t present so we use common String type.
for users convenience we have introduces these string aliases: ROAnsiString/ROUtf8String.

if you look at your _Intf. you will see something like

__Serializer.ReadLegacyString('NewField', l_NewField, [paAsAnsiString]);
__Serializer.ReadLegacyString('NewField1', l_NewField1, [paAsUTF8String]);

these parameters paAsAnsiString/paAsUTF8String work similar to CodeFirst attributes