Monitoring > 3 - Management Monitoring Services Checks > Remove Monitoring Check Contacts

3.09 Remove Monitoring Check Contacts

By the method SetRemoveMonitoringCheckContacts you can remove a contacts of the check.

Parameters
removeMonitoringCheckContactsEntity
Type: RemoveMonitoringCheckContactsEntity
contains the parameters to remove a contact from a control.
/// WsMonitoring.SetRemoveMonitoringCheckContacts Method (c# .NET)
public static string SetRemoveMonitoringCheckContacts(WsMonitoringClient client,
    RemoveMonitoringCheckContactsEntity removeMonitoringCheckContactsEntity)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
 // call method SetRemoveMonitoringCheckContacts 
 // obtaining a WsResult item
 WsResult result = client.SetRemoveMonitoringCheckContacts
           (removeMonitoringCheckContactsEntity);

 //if the call is Success print value
 if (result.Success)
 {
     // get Value returned from server
     stringBuilder.Append(" Operation successfully. Result Code : ");
     stringBuilder.Append(result.ResultCode);
 }
 else
 {
     throw new ApplicationException(result.ResultMessage);
 }
    }
    catch (Exception ex)
    {
 // re-run the error
 throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
/// WsMonitoring.SetRemoveMonitoringCheckContacts Method (JAVA)
public static String SetRemoveMonitoringCheckContacts(IWsMonitoring client, 
    RemoveMonitoringCheckContactsEntity removeMonitoringCheckContactsEntity) 
{
    //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 
    {
    WsResult result = 
 client.setRemoveMonitoringCheckContacts
     (removeMonitoringCheckContactsEntity);

        if (!result.isSuccess()) 
 {
     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