Computing > 10 - Requests for Assistance > Send assistance request

10.4 Send assistance request

The method SetSendAssistanceRequest should be used when an user wants to send a previously inserted request in Draft status to the assistance team. After successful execution of the method of assistance team will take care of the request.

Parameters
requestId
Type: int
Value of type int with request identifier.

 
/// IWsEndUser.SetSendAssistanceRequest Method (c# .NET)
public static string SetSendAssistanceRequest(WsEndUserClient client,
    int requestId)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // create the object SendAssistanceRequest for the request 
        //with data to process
        SendAssistanceRequest request = new SendAssistanceRequest();
        request.AssistanceRequestId = requestId;

        //call method SetSendAssistanceRequest, 
        //obtaining a WsResult item
        WsResult result = client.SetSendAssistanceRequest(request);
                
        //if the call is not successful, re-run the error indicating the message
        if (result.Success)
        {
            // print the result code and message
            stringBuilder.Append("code: ");
            stringBuilder.Append(result.ResultCode);
            stringBuilder.Append(" - message: ");
            stringBuilder.Append(result.ResultMessage);
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }            
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException( ex.Message);
    }

    return stringBuilder.ToString(); 
}
// IWsEndUser.SetSendAssistanceRequest Method (JAVA)
private static String setSendAssistanceRequest(IWsEndUser client,
    int requestId)
{
    //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
    {
        // create the object SendAssistanceRequest for the request 
        //with data to process
        SendAssistanceRequest request = new SendAssistanceRequest();
        request.setAssistanceRequestId(requestId);

        //call method SetSendAssistanceRequest, 
        //obtaining a WsResult item
        WsResult result = client.setSendAssistanceRequest(request);

        //if the call is not successful, re-run the error indicating the message
        if (result.isSuccess())
        {
            // print the result code and message
            StringBuilder.append("code: ");
            StringBuilder.append(result.getResultCode());
            StringBuilder.append(" - message: ");
            StringBuilder.append(result.getResultMessage());
        }
        else
        {
            throw new Exception(result.getResultMessage());
        }            
    }
    catch (Exception ex)
    {
        // show the error
        System.out.println(ex);
    }

    System.out.println("StringBuilder: "+StringBuilder);
    
    return StringBuilder.toString(); 
}
Version
API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl