import java.rmi.server.UID;

public class UCIATMClient {

    public static String call() {
        String msgId = new UID().toString().replace(':', 'a');
        String pseudoDetail = "<MSG>" + msgId + "<MSG/>";
        System.out.println("Invocando un mensaje tipo FLAG a UCI, con MSG: " + msgId);
        String mensaje = "MsgID:[" + msgId + "], Response: ";
        Object response;
        try {
            response = UCIClient.send(pseudoDetail, "172.17.1.25", 30000, 5);
            System.out.println("Llamado a UCI ejecutado correctamente");
            System.out.println("Respuesta: " + response);
        } catch (Exception e) {
            response = e.getMessage();
            System.out.println(mensaje);
        }

        return mensaje + response;
    }

    public static void main(String[] args) {
        UCIATMClient.call();
    }
}