From RAD Studio API Documentation
Jump to: navigation, search



TSoapDataModule = class(TDataModule, IAppServer, IAppServerSOAP, IProviderContainer)


class PASCALIMPLEMENTATION TSoapDataModule : public System::Classes::TDataModule


Type Visibility Source Unit Parent
class public


TSoapDataModule encapsulates the objects and interfaces of an application server in a SOAP-based multi-tiered database application.

Use a TSoapDataModule object as the central repository for all objects in a SOAP-based application server. SOAP data modules can contain any nonvisual components. Typically these are data access components, such as datasets and the provider components that handle communication between these datasets and client applications. They can also contain other nonvisual components, such as TTimer, or TImageList.

At design time a TSoapDataModule object provides a visual container into which a developer can place nonvisual components, set their properties, and write event handlers for them. In the unit file for the SOAP data module a developer can also code any business rules that are to be centralized in the middle tier of a multi-tiered application.

TSoapDataModule implements the IAppServer and IAppServerSOAP interfaces. These are both invokable interfaces, so if you add TSoapDataModule to a Web Service application, the invoker automatically forwards all IAppServer or IAppServerSOAP calls to the SOAP data module. The client application uses a TSoapConnection component to generate these calls.

To create a SOAP data module at design time,

1. Choose File|New|Other, and select Web Services application from the WebServices page of the new items dialog. This generates a Web module that contains a dispatcher and an invoker component. These components work together to interpret and execute incoming SOAP requests.

2. Choose File|New|Other, and select SOAP DataModule from the Web Services page of the new items dialog. This adds a TSoapDataModule descendant to your application. The TSoapDataModule descendant supports an invokable interface that descends from IAppServerSOAP as well as an IAppServer interface.

Note: Web Service applications should not include more than one TSoapDataModule descendant. When the invoker component that appears in the primary Web module receives a request for the IAppServer or IAppServerSOAP interface, it can't distinguish between multiple implementation classes.

See Also