Connecting to the web service
Open a project in which you plan to use Fozium Analytics.
Select the menu item «File->Other…».
In the dialog box, select the «Delphi Projects -> WebServices -> WSDL Importer»
Click «Ок» and go to the field «Location of WSDL File or URL» in which you will specify the address with the prefix ?wsdl.
The full address of the web service is specified in your account.
You have just created a module to access the web services of Fozium Analytics.
Click «Finish» and save the file with that name or any name that you would like.
Working with the web service
Add to the modules of the project, from which the call will be from the web service of Fozium Analytics, in the section Uses module that accesses the web service.
The following code demonstrates how to call the service CheckApiKey, which returns information about the API-KEY.
By doing this you can also call on all of the other web services that Fozium Analytics offers.
uses SoftwareAnalyticsService; ... procedure TfrmSoftwareAnalytics.CheckApiKeyService; var ws: ISoftwareAnalyticsService; resultService: string; begin try ws := GetISoftwareAnalyticsService; with ws do resultService := CheckApiKey('API-KEY'); ShowMessage(resultService); except ShowMessage('Could not connect to the service'); end; end;
Names of available web services are described in your account.