Monitoring > 1 - Understanding the platform > Monitoring Services Types

1.1 Monitoring Services Types


By the method GetMonitoringClassOfServices you can retrieve the list of Class of services available.

/// WsMonitoring.GetMonitoringClassOfServices Method (c# .NET)
public static string GetMonitoringClassOfServices(WsMonitoringClient client)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
 // call method GetMonitoringClassOfServices 
 // obtaining a WsResultOfArrayOfMonitoringClassOfServiceEntity item
 WsResultOfArrayOfMonitoringClassOfServiceEntity result = 
     client.GetMonitoringClassOfServices();

 // if the call is Success print returned values
 if (result.Success)
 {                    
     stringBuilder.Append("Operation ends successfully\n");

     // get Value returned from server
     MonitoringClassOfServiceEntity[] items = result.Value;

     // for each items print the information
     foreach (MonitoringClassOfServiceEntity item in items)
     {
  stringBuilder.Append("\nProductID: ");
  stringBuilder.Append(item.ProductID);
  stringBuilder.Append("\nDescription: ");
  stringBuilder.Append(item.Description);                        
     }
 }
 else
 {
     throw new ApplicationException(result.ResultMessage);
 }
    }
    catch (Exception ex)
    {
 // re-run the error
 throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
/// WsMonitoring.GetMonitoringClassOfServices Method (JAVA)
public static String GetMonitoringClassOfServices(IWsMonitoring client)
{
    //specify the account login details 
    ((BindingProvider) client).getRequestContext()
            .put(BindingProvider.USERNAME_PROPERTY, "ARU-0000");
    ((BindingProvider) client).getRequestContext()
            .put(BindingProvider.PASSWORD_PROPERTY, "0123456789");

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // call method GetMonitoringClassOfServices 
        // obtaining a WsResultOfArrayOfMonitoringClassOfServiceEntity item
        WsResultOfArrayOfMonitoringClassOfServiceEntity result =
           client.getMonitoringClassOfServices();

        //if the call is Success print values
        if (result.isSuccess())
        {
            ArrayOfMonitoringClassOfServiceEntity items = result.getValue();
            List<monitoringclassofserviceentity> 
                monitoringClassOfServiceEntityList =
                    items.getMonitoringClassOfServiceEntity();

            for (Iterator<MonitoringClassOfServiceEntity> it =
                    monitoringClassOfServiceEntityList.iterator(); it.hasNext();)
            {
                MonitoringClassOfServiceEntity item = it.next();
                stringBuilder.append("\nProductID: ");
                stringBuilder.append(item.getProductID());
                stringBuilder.append("\nDescription: ");
                stringBuilder.append(item.getDescription());

            }
        }
        else
        {
            throw new Exception(result.getResultMessage());
        }
    }
    catch (Exception ex)
    {
        System.out.println(ex);
    }

    return stringBuilder.toString();
}
Version
API: v2.8 URL:https://api.services.cloud.it/wsMonitoring/v2.8/wsMonitoring.svc?wsdl
See also