Send a Test Message
To verify the installation, a test message can be sent to oneself. This process involves the client sending the message to the server, which then returns it to the client. The following example demonstrates sending a message via the file-based interface. However, the test message can also be sent analogously via the REST interface.
Avoid the processing of the test message
When a message is sent to oneself, it will appear in the inbox. Therefore, test messages should only be sent when the application processing the inbox is not running.
Send a test messageđź”—
After the sedex-Client has been started successfully, a test message can be sent.
The following procedure will send a so-called “echo message” – a message addressed to the sender. The message will be transmitted from the sedex-Client to the server and back to the sedex-Client again.
Create two text files with a text editor.đź”—
-
data_test.txt
This file contains the data of the message to be sent. Enter some random example text in this file.
Hello sedex! -
envl_test.xml
This file is the envelope of the message to be sent and contains the metadata about the message. Paste the following template into the envelope file and replace the parts marked with
** ... **as described below:The schema for the envelope is defined in eCH-0090 version 1.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<envelope xmlns="http://www.ech.ch/xmlns/eCH-0090/1" version="1.0">
<messageId>** TestMessageId **</messageId>
<messageType>** Use case MessageType **</messageType>
<messageClass>0</messageClass>
<senderId>** Your sedex ID here **</senderId>
<recipientId>** Your sedex ID here **</recipientId>
<eventDate>** Current Date **</eventDate>
<messageDate>** Current Date **</messageDate>
</envelope>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<envelope xmlns="http://www.ech.ch/xmlns/eCH-0090/1" version="1.0">
<messageId>TestMessage01</messageId>
<messageType>1234</messageType>
<messageClass>0</messageClass>
<senderId>1-1234-1</senderId>
<recipientId>1-1234-1</recipientId>
<eventDate>2023-12-31T23:00:00.000+02:00</eventDate>
<messageDate>2023-12-31T23:00:00.000+02:00</messageDate>
</envelope>
You must edit the marked strings before sending the message as follows
- The value of TestMessageId must be a unique identifier per message. Examples “TestMessage01”, “TestMessage02”, etc.
- The value of Use case MessageType must be one of the message types valid for your sedex domain. This is an integer value.
- Your sedex ID here must be replaced with the sedex ID entered during the installation. The standard format is: x-xxxxxx-x.
- The value of Current Date needs to be changed to the current date and time in Example: 2023-12-31T23:00:00.000+02:00.
Send the message.đź”—
First copy (or save) the data file and then the envelope file into the outbox folder (by default <sedex_home>/interface/outbox). It is important that the data file is copied to the outbox folder before the envelope file.
Verify if the Test Message was Sent and Receivedđź”—
If the sedex-Client is configured correctly, the sedex-Client will send the message to the server, and because the message recipient is the sending sedex-Client itself, the sent message should be received from server into the inbox folder (by default <sedex_home>/interface/inbox).
You can monitor the sedex Controller’s log files (by default in <sedex_home>/logs/controller/) and the sedex Adapter’s log file (by default in <sedex_home>/logs/adapter/) to see the sending progress or detect possible errors.