Consuming a Web Service in Saba happens in two steps:
1) Authorization of the consumer via a service exposed by Saba and available at the following address:
This service returns a certificate to use in step 2
2) Invoke the web service exposed by your installation of Saba using the certificate
To make life easier with step 1, Saba distributes a .NET assembly that is a wrapper around that service; this wrapper contains two classes in the Saba.Platform namespace:
- SabaLogin, that you should use for authentication
- InfoServiceClient, that you should use for invoking your own service
A quick example of how to use the above classes in C#:
string username = "admin";
string password = "welcome";
// get an authentication certificate
string certificate = SabaLogin.Authenticate(endpointURL, username, password);
// invoke the "updateUsername" service
Hashtable requestParams = new Hashtable();
requestParams["old_username"] = "JSMITH";
requestParams["new_username"] = "HPOTTER";
XmlDocument response = InfoServiceClient.CallService(
endpointURL,
"updateUsername",
certificate,
requestParams);
requestParams is a map of parameters to pass to the service (no generics yet, Saba is still on the old-fashioned .NET 1.1 code...)
Communication is over SOAP, no REST services in Saba yet.
Enjoy!
Vriendelike groete
@stefanotempesta