Thank you Christoph John - I looked more carefully at the message being sent to the admin, and realized as per your suggestion) that the
Initiator.start()
snippet which is in thequickfix.py module is actually calling on the
GainApplication.toAdmin()
method, from the gain module (where the client is defined,) which I have modified:
def toAdmin(self, message, sessionID):
try:
msgType = fix.MsgType()
message.getHeader().getField(msgType)
if msgType.getValue() == fix.MsgType_Logon:
uuid = self.Settings.get().getString('Username')
password = self.Settings.get().getString('Password')
sendersubID = self.Settings.get().getString('SenderSubID')
rawdata = self.Settings.get().getString('RawData')
message.getHeader().setField(fix.RawData(rawdata))
message.getHeader().setField(fix.SenderSubID(sendersubID))
message.getHeader().setField(fix.Password(password))
message.getHeader().setField(fix.StringField(12003, uuid))
print('Perhaps we have a way!!!!!!!!!!!!!****************')
self.Logger.info("Sending Admin message to server. Session: %s. Message: %s" % (sessionID, message))
self.__messageStore.addRequest(message)
except fix.RuntimeError as e:
self.Logger.error('Error in toAdmin', e)
return
This seems to place the correct message to the server, so now I can move forward. Thanks!