Re: [Quickfix-users] Logon Message
Brought to you by:
orenmnero
From: sumit a. <aro...@ya...> - 2009-04-27 11:33:23
|
Hello Malinka, Following is the code I am using as my Initiator. The same is in java - import quickfix.*; import java.io.FileInputStream; public class CurrenexInitiator extends quickfix.MessageCracker implements quickfix.Application { public CurrenexInitiator() {} public void onCreate(SessionID sessionID) {} public void onLogon(SessionID sessionID) {} public void onLogout(SessionID sessionID) {} public void toAdmin(quickfix.Message message, SessionID sessionID) { } public void toApp(quickfix.Message message, SessionID sessionID) throws DoNotSend {} public void fromAdmin(quickfix.Message message, SessionID sessionID) throws FieldNotFound, IncorrectDataFormat, IncorrectTagValue, RejectLogon {} public void fromApp(quickfix.Message message, SessionID sessionID) throws FieldNotFound, IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType { crack(message, sessionID); } private static Initiator initiator = null; static { System.loadLibrary("quickfix_jni"); } public static void main(String args[]) throws Exception { if(args.length != 1) { System.out.println("usage: run_executor_java FILE."); return; } try { Application application = new Application(); SessionSettings settings =new SessionSettings(new FileInputStream("D:/QuickFIXEngineSource/quickfix/src/java/cfg/Initiator.cfg")); MessageStoreFactory storeFactory =new FileStoreFactory(settings); LogFactory logFactory =new ScreenLogFactory(settings); //MessageFactory messageFactory = new DefaultMessageFactory(); MessageFactory messageFactory = new quickfix.fix44.MessageFactory(); initiator = new SocketInitiator(application, storeFactory, settings, logFactory, messageFactory); initiator.start(); System.out.println("press <enter> to quit"); System.in.read(); initiator.stop(); Now, I did tried to implement your suggestions but wasn't able to work-out where exactly do I need to make the changes... can you pls help. Thanks a lot for your help, Sumit --- On Fri, 4/24/09, Malinka Rellikwodahs <ael...@gm...> wrote: From: Malinka Rellikwodahs <ael...@gm...> Subject: Re: [Quickfix-users] Logon Message To: aro...@ya... Cc: qui...@li... Date: Friday, April 24, 2009, 10:25 PM On Fri, Apr 24, 2009 at 12:28, sumit arora <aro...@ya...> wrote: > QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > > Hello, > > I am using the Initiator application, which is trying to logon to the ECN configured i my settings file, but the logon message it is sending doesn't have tag 554 (i.e. password) in it. > So, can somebody pls tell me - > > 1.How, can I change the default logon message ? toApp(FIX::Message &msg, const FIX::SessionID &ses) { MsgType type; msg.getHeader().getField(type); if(type.getValue() == "A") ; //Make Changes (Add UserName/Password/Etc.) } > 2.I am getting a message socket-error: connection reset by peer, I am putting the FileLogPath in the settings file but the logs are not getting created in that location, so can't figure out the reasons for the errors any ideas... Are you passing a FileLogFactory to you SocketInitiatior? > Thanks, > Sumit > |