TSoapConnection = class(TCustomRemoteServer)
class PASCALIMPLEMENTATION TSoapConnection : public Datasnap::Dbclient::TCustomRemoteServer
TSoapConnection connects to an application server that is implemented as a Web Service.
TSoapConnection is used in the client portion of a multi-tiered database application to establish and maintain the connection between the client and a remote application server that is implemented as a Web Service.
The SOAP connection object can :
- Establish an initial connection to a remote application server.
- Obtain an interface for the application server.
- Obtain a list of providers on the application server.
- Drop the connection to the remote application server.
TSoapConnection establishes the initial connection between the client application and a remote application server using SOAP.
Note: To use TSoapConnection on Windows, you must have wininet.dll installed on the client system. wininet.dll is found in the Windows system directory if you have IE3 or higher installed.
TSoapConnection uses an internal THTTPRio object to obtain an interface from the Web Service application. This interface is either IAppServer or IAppServerSOAP (or one of their descendants), depending on the value of the UseSOAPAdapter property. The recommended approach is to use the IAppServerSOAP interface, which is better adapted to SOAP as a transport protocol. However, some application servers (those created using Delphi 6 or Kylix 2) only support an IAppServer interface. If you are using an application server that does not support IAppServerSOAP, set UseSOAPAdapter to false.
Regardless of which interface TSoapConnection uses to communicate with the application server, it makes the information available to client datasets in the client application by providing an IAppServer interface. Client datasets use the IAppServer interface from the SOAP connection component to communicate with providers on the application server, or to otherwise call the application server's data module interface.
Note: Unlike when using other DataSnap connection components, you can't use the AppServer property of TSoapConnection to call methods of the application server's interface that are not IAppServer methods. Instead, to communicate with a SOAP data module on the application interface, use a separate THTTPRIO object or specify the interface using the SOAPServerIID property and then call the GetSOAPServer method.
To connect to remote application servers using DCOM, use the TDCOMConnection component instead. To connect to remote application servers using TCP/IP, use the TSocketConnection component instead. To connect to remote application servers using HTTP (but not SOAP), use TWebConnection.