TRemotable = class
class PASCALIMPLEMENTATION TRemotable : public System::TObject
TRemotable is the base class for classes that can be passed as parameters or return values in a Web Service application.
Use TRemotable as a base class when defining a class that can be used for parameters or return values on an invokable interface. TRemotable descendants can represent non-scalar types, or scalar types that do not correspond to Object Pascal types. TRemotable is compiled with runtime type information (RTTI) and has a virtual constructor that the remotable class registry recognizes and uses to supply class instances.
Note: To create a class that represents scalar values that do not correspond directly to an Object Pascal type, use TRemotableXS as a base class instead. TRemotableXS is a descendant of the TRemotable class.
Note: When writing a TRemotable descendant, you can control whether a property is encoded as an element node or as an attribute node by using the stored directive. Properties declared with a stored directive set to AS_ATTRIBUTE are encoded as attribute nodes. Properties that are declared without a stored directive, or with a stored directive set to anything other than AS_ATTRIBUTE are encoded as element nodes.
Both the client application and server application must register a TRemotable descendant with the remotable class registry before they can use it. To register a remotable class, use the RegisterXSClass method of the object that the global RemTypeRegistry function returns.
On server applications, instances of TRemotable descendants that are input parameters on an invokable interface are automatically created when the method call is unmarshaled and automatically freed after any output parameters or return value are marshaled so that they can be sent to the client. When a TRemotable descendant is created in a method that was called remotely using an invokable interface, the instance is automatically freed after the value of the TRemotable descendant is marshaled for transport back to the client application.
The caller of an invokable interface (client) is responsible for creating any TRemotable instances that it passes as input parameters, and for freeing any TRemotable instances it creates or that are returned as output parameters or method results.