One thing not easily understood in CameronFIX is how to set the username and password.
This is done in the config.xml by adding a MessageFactory to the <Session> element, like this:
<Session fixversion="4.4" heartbeat="120" compid="myId">
<Persister>
<ReplicatedFilePersister baselogfile="${session}" />
</Persister>
<MessageFactory>
<UsernameAndPasswordMessageFactory username="user" password="pass" />
</MessageFactory>
</Session>
The above sets tags username (553) and password (554) in the outbound Logon (A) message.
In some cases, you need to set the RawData (96) tag on the Logon message instead. This is a logon style used by the CME, for example, and other FIX counter-parties (those using Trading Technologies software, for example).
<Session fixversion="4.4" heartbeat="120" compid="myId">
<Persister>
<ReplicatedFilePersister baselogfile="${session}" />
</Persister>
<MessageFactory>
<CMEiLink2MessageFactory rawdata="pass" />
</MessageFactory>
</Session>
The above sets RawDataLength (95) and RawData (96) in the outbound Logon message. Although the name of the message factory says "CME," you can use it for any FIX counter-party that requires a certain string set in RawData on Logon.
- webadmin's blog
- Login or register to post comments