I have a Delphi Web Server setup and running, publishing Web Services, and I want to know some stuff on the calls to the web services:
- The IP address of the client who calls the web service.
- Some SOAP information on the call, such as username and password.
How can I get this information from within the service code? My class is inheriting from TSoapDataModule, so I figure there’s a way to get that info through it. Still, I can’t find how.
TMyAppServerDataModule = class(TSoapDataModule, ITMyAppServerDataModule , IAppServerSOAP, IAppServer, ITMySOAPWebService) // ...my working components and methods... // end;
You should be able to get a TWebRequest from the Request property of the TWebModule object you get from calling GetSOAPWebModule. TWebRequest will tell you lots of things about the request. Like RemoteAddr