1.2 The Datacenters

Using the GetDatacenterConfigurations method you can get information on the configuration settings of the datacenters available at the time of the call.
//IWsEndUser.GetDatacenterConfigurations Method (c# .NET)
private static void GetDatacenterConfigurations(WsEndUserClient client)
{
    try
    {
        //calls the GetDatacenterConfigurations method, 
        //getting a WsResultOfArrayOfDatacenterConfig object 
        WsResultOfArrayOfDatacenterConfig result = client.GetDatacenterConfigurations();
        if (result.Success)
        {
            foreach (DatacenterConfig dc in result.Value)
            {
                Console.WriteLine(dc.AdminPanelBaseUrl);
                Console.WriteLine(dc.WsBaseUrl);
                Console.WriteLine(dc.Country);
                Console.WriteLine(dc.Name);
            }
        }
    }
    catch (Exception ex)
    {
        //relaunches the error 
        throw new ApplicationException(ex.Message);
    }
}
//IWsEndUser.GetDatacenterConfigurations Method (JAVA)
private static void GetDatacenterConfigurations(IWsEndUser client)
{
    try
    {
        //calls the GetDatacenterConfigurations method, 
        //getting a WsResultOfArrayOfDatacenterConfig object 
        WsResultOfArrayOfDatacenterConfig result = client.getDatacenterConfigurations();
        if (result.isSuccess())
        {
            //retrieves the DatacenterConfig list from the resulting object
            List<DatacenterConfig> dcs = result.getValue().getDatacenterConfig();
            for (DatacenterConfig dc: dcs)
            {
                System.out.println(dc.getName());
                System.out.println(dc.getCountry());
                System.out.println(dc.getWsBaseUrl());
                System.out.println(dc.getAdminPanelBaseUrl());
            }
        }
    }
    catch (Exception ex)
    {
        //prints the error 
        System.out.println(ex);
    }
}

Version
API: v2.8 URL: https://api.dc1.computing.cloud.it/WsCommon/v2.8/WsCommon.svc?wsdl
See also