as
Alejandro Acuña
2025-01-21 61cdfc6ee7f013c4533add51d797c1886b312883
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package art.servers.transactionsserver.test.socket;
 
import art.library.interop.InteropParameter;
import art.library.interop.InteropParameters;
import art.library.interop.InteropResponse;
import art.library.interop.serialization.Serialization;
import art.library.interop.serialization.SerializationException;
import java.net.Socket;
 
public class TestSocketTransactionsStartSession1
{
 
    public static void main(String[] args)
    {
        try
        {
            Socket socket = new Socket("172.16.11.210", 5001);
 
            InteropParameters parameters = new InteropParameters();
            parameters.addParameter(new InteropParameter("operation", "getDevices"));
            parameters.addParameter(new InteropParameter("language", "ca-ES"));
            parameters.addParameter(new InteropParameter("timestamp", "0"));
            InteropResponse response = (InteropResponse) Serialization.invoke("operation", parameters, socket);
 
        } catch (SerializationException e)
        {
            System.out.println(e.getStackMessage());
        } catch (Exception e)
        {
            e.printStackTrace();
        }
    }
}