# Enterprise Communication Interface (ECI)

## ECI-Error Messages

To locate an error when calling eci_connect, set the environment variable ECI_TRACE to ON and call eci_connect again.

You can activate the error trace for ECI in the top menu Tools > Trace > Select Module selecting the ECI module. The trace file tst<pid> .trc is created in the temporary directory.

If an ECI function was called successfully, then the return code of the eci_call function is the name of the called ECI function.

If an error occurred, the return code consists of the string "eci_error". More detailed information can be found in the return parameter which consists of two parameters of the type string list. The return parameter has the following structure:

- Part 1
  - Function name

- Error message

- Error code

- Part 2
  - Last printed message (additional error message)

- Detailed error information (if available

To get this information, use the function eci_set_par(&ret_par, 1) and call eci_get_par(&ret_par, buffer) three times. The used error codes are listed in file eci_err.h. To get the additional messages, use function eci_set_par(&ret_par, 2) and call eci_get_par(&ret_par, buffer) two times.

List of ECI error messages

### Example

The ECI test program eci_test.c is available for testing the ECI interface in the following directory of the installation environment:

- $eci_root/src (Unix)
- %eci_root%\src (Windows)

The directory also contains a make file to create the corresponding executable 'eci_test'. The executable can be found in the directory.

- $ep_root/axalant/ bin/ $EP_MACH (Unix)
- %ep_root%\axalant\bin\%EP_MACH% (Windows)

To use the test program, start Agile e6 and call the ECI program with following syntax:

- eci_test transportnumber hostname resource

transportation mode | transportnumber | hostname | resource
tcpip | 1 | hostname where Java Client, MFC-Client or Agile e6 server process is running | socket number or socket name (from /etc/services)
windows_dde | 57 | any string (no relevant parameter) | value of ECI-TOPIC ("-p"-option of Agile e6 start script)