RemObjects SDK, RONameSpaceAttribute usage?

  TMyService = class(TRORemoteDataModule)

What is the purpose of RONameSpaceAttribute? In the above code, it doesn’t seem to have any actual effect?

Instead, I found the only way to set namespace is
uRORTTIServerSupport.RODLLibraryNamespace := 'MyNameSpace;

What is the difference between using RONameSpaceAttribute versus setting the namespace directly to uRORTTIServerSupport.RODLLibraryNamespace?


This attribute was added for supporting several versions of the same objects.
You are right - it doesn’t work for services, but we handle it for enums, exceptions. complex types and arrays.

Mainly usage: client-side.
Client can use several versions of the same _Intf (old and new version).
Each _Intf should have personal namespace.
you can specify used namespaces in the Message.DefaultNameSpaces property so RO SDK will detect rules for serialization/deserialization of specific type.

Thank you.

Still confused. Any samples?

Should I specify RONamedpace attribute to service methods, or objects (enum, complex type, and array)?


you can no specify it at all.
this attribute was used in _Intf (i.e. on client side) when you generated CodeFirst-compatible file.
now this attribute (RONamespace) was replaced with ROLibraryAttributes.
a new attribute gives more useful information for cases when CodeFirst service uses items from existing RODLs like DataAbstract4.RODL.

Oh I see.

For server side Code-First service, I should use ROLibraryAttributes, right?

Thank you.


you can use

it will be enough