From RAD Studio API Documentation
Jump to: navigation, search



TInvokableClass = class(TInterfacedObject, IInterface)


class PASCALIMPLEMENTATION TInvokableClass : public System::TInterfacedObject


Type Visibility Source Unit Parent
class public
Soap.InvokeRegistry Soap.InvokeRegistry


TInvokableClass is the base class for the implementation classes of invokable interfaces.

Use TInvokableClass as a base class when writing the implementation class of an invokable interface. TInvokableClass has the following important attributes:

The invocation registry (InvRegistry) knows how to create instances of TInvokableClass and (because it has a virtual constructor) its descendants. This allows the registry to supply an invoker in a Web Service application with an instance of the invokable class that can handle an incoming request.

TInvokableClass is an interfaced object that frees itself when the reference count on its interface drops to zero. Invoker components do not know when to free the implementation classes of the interfaces they call. Because TInvokableClass knows when to free itself, you do not need to supply your own lifetime management for this object.

TInvokableClass supports the ISOAPHeaders interface so that your server can process the headers that accompany requests and add headers to outgoing responses.

To use a TInvokableClass descendant in a Web Service application, you must register it with the invocation registry. Use the RegisterInvokableClass method of the invocation registry to register your TInvokableClass descendant.

Note: If you do not use TInvokableClass as a base class when writing the implementation class for an invokable interface, you must supply the invocation registry with a method to retrieve instances of your class and you must handle the lifetime management of your class. If you are sending or receiving SOAP headers, you must use the global GetSOAPHeaders function to obtain an ISOAPHeaders interface instead of obtaining one from the implementation class.

See Also