To call into an API service, you must have .NET Framework 3.0 or later. Version 3.0 introduced support for the Windows Communication Foundation (WCF), a service-oriented messaging system that enables programs to interoperate locally or remotely similar to web services WCF.
The following example illustrates a call to the Touchstone Re API to retrieve a list of business units.
Getting Business Units Using Touchstone API | |
---|---|
using System; using AIR.Services.Security.Api; namespace StarterKit { class Program { static void Main(string[] args) { // Create a new instance of the SecurityServiceClient class. SecurityServiceClient securityClient = new SecurityServiceClient(); // Create a new instance of GetBusinessUnitsRequest. GetBusinessUnitsRequest request = new GetBusinessUnitsRequest(); // Submit the request and get the response back. GetBusinessUnitsResponse response = securityClient.GetBusinessUnits(request); } } } |