As it is well-known, when a session is being established, it sends a Logon message, as it is defined by FIX Standard. However, in specific use contexts there may be a need to include additional information to the counterparty which is not specified by Standard. One of the common use case examples is when the counterparty requires authentication attributes like username and password. OnixS C++ FIX Engine supports this capability through the additional overload of the OnixS::FIX::Session class - OnixS::FIX::Session::logonAsInitiator.
A lot of trading systems, based on version 4.2 of the FIX Protocol, require username (tag #553) and password (tag #554) fields to be included in the Logon message. Both fields do not exist in version 4.2 of the formal Standard. These fields were implemented in later versions of the FIX Protocol standards releases. The following sample demonstrates the solution for this typical situation. In particular, it sends the Logon message with the additional fields which are required by the counterparty.