Classe fournisseur de Service distant (class)
Introduction
Cette classe permet d'exécuter des requêtes sur un serveur SData distant.
Attributs
| endPointURL | |
| userName | |
| userPassword |
Méthodes
| postEntity | Création d'une entité |
| putEntity | Modification d'une entité |
| getEntity | Suppression d'une entité |
| getEntity | Lecture d'une entité |
| getEntityList | Lecture d'une liste d'entité |
Exemple :
begin
// dynamically build the endpoint url
dashboardUrl := 'http://dashboard-test.sage.fr/sdata/sdbApp/sdbFeed/';
endpoint := format('%s%s-%s',[dashboardUrl,customerCode,companyIdentifier]);
// build a remote sdata entity proxy
data := iPhonesdbData.create;
...
// create an instance of sdata service provider
prv := TSDataServiceProviderInfo.Create;
prv.UserName := userName;
prv.UserPassword := jeton;
prv.EndPointURL := endpoint;
// create this entity
// this will emit a HTTP POST request
prv.postEntity(data);
end;
Voir aussi :
— Code métier — Développement DSM —