**Using Beta RemObjects Remoting SDK for Delphi - 9.3.0.1323**
I am getting the error something like:
An exception was raised on the server: Error reading parameter AData: Unexpected class found in stream; class "TMyROComplexType" does not descend from "TMyROComplexType".
It is streng that the same type is twice in the message. And my RODL for this types looks like:
TMyROComplexType = class(TROComplexType)
...
end;
...
TMyANOTHERROComplexType = class(TROArray<TMyROComplexType>);
I have generated the _intf and _serveraccess files using the latest rodl2code.exe
By generating there is a bug also: not all units are added, e.g. I had to add manually these units in each _ServerAccess file:
System.TypInfo, uROClientIntf, uROAsync, uROServerLocator, uROBinMessage
Do you have any ideas?
Thx!
This error comes in this code:
line : if not lActualClass.InheritsFrom(aClass) then RaiseError(err_UnexpectedClassInStream,[clsnme,aClass.ClassName]);
function TROStreamSerializer.ReadStruct(const aName: string;
aClass: TClass; var Ref; ArrayElementId: integer): Boolean;
var
obj : TROComplexType absolute Ref;
IsAssigned : ByteBool;
clsnme : string;
lActualClass:TROComplexTypeClass;
begin
fStream.ReadBuffer(IsAssigned, SizeOf(IsAssigned));
Result := IsAssigned;
if Result then begin
ReadLegacyString('', clsnme,[paAsUTF8String],-1,MAX_ITEM_NAME);
lActualClass := FindROClass(clsnme,DefaultNamespaces);
if not Assigned(lActualClass) then RaiseError(err_UnknownClassInStream,[clsnme,aClass.ClassName]);
if not lActualClass.InheritsFrom(aClass) then RaiseError(err_UnexpectedClassInStream,[clsnme,aClass.ClassName]);
obj := lActualClass.Create;
try
obj.ReadComplex(self);
except
FreeAndNil(obj);
raise;
end;
end
else
Obj:=nil;
end;