In QWFIX, FIX messages have to created by a FIXSession. The created message contains all kinds of information, from message schema to associated session (and session persistence).
Application can add fields to the message once it is created. Because message knows its schema, any invalid operation will trigger an excpetion (e.g. unknown tag ID, invalod field data type, restricted fields such as SenderCompID or TargetCompID, etc).
FIX messages are sent through a FIXSession. It has to be sent through the same session that created it; otherwise an exception will be thrown. Once the FIXMessage is sent, a "FIX message token" will be returned. The token is a 8 bytes long integer in QWF)X_J. Application should keep the token and use it to retrieve the message it has sent in the future. NEVER KEEP THE REFERENCE OF THE MESSSAGE. USE TOKEN INSTEAD!
// Variable "msgType" is a string value of FIX message type.
|