{{Quickfixn}} Please Help in changing logon message
Grant Birchmeier
gbirchmeier at connamara.com
Thu Dec 5 06:38:00 PST 2013
The FAQ does show you a way to extract username/password from a QF config
file. I don't really understand why you'd need to change the internal QF/n
code for your purposes.
But if what you've done works for you, that's cool. Don't fix something
that's working!
On Thu, Dec 5, 2013 at 12:53 AM, Nirjhar Jain <nirjhar.jain at commdel.net>wrote:
> Hi Grant Sir,
>
>
>
> Earlier I have done the same thing as you have mentioned in FAQ, but in
> this case, password and username will be hard-coded. That’s why I have
> changed the QuickFixn code according to my requirement and entered the
> username & password in config file.
>
> Actually my problem is I have to make a code which request data with 2
> banks simultaneously. For this I have to use only single QuickFixn.dll. But
> both banks have their own specifications in which one bank needs password
> while other bank don’t. Some other changes were also their in both bank’s
> specifications.
>
> So I have edited three file to make them usable for both the banks. I have
> changed SessionSettings.cs, Session.cs and SessionID.cs files in the
> quickfixn code. I have changed the constructor definitions in SessionID.cs.
> & Hence calling of constructors in SessionSettings.
>
>
>
> After all the changes, now my single dll is working absolutely fine with
> both the banks.
>
>
>
> May be I have used the long process. But this has increased my
> understanding of Quickfixn internal coding.
>
>
>
> Thanks & Regards,
>
> *Nirjhar Jain*
>
> Software Engineer
>
>
> *COMMDEL*
>
> Commdel Consulting Services P Ltd,
>
> H-134, Sector-63, Noida - U.P. (India)
>
>
>
> www.commdel.net
>
> *A n **I S O 9 0 0 1 : 2 0 0 8** C e r t i f i e d C o m p
> a n y*
>
> *Payment* *Enterprise* *Mobility*
> *Internet*
>
>
>
> *From:* quickfixn-bounces at lists.quickfixn.com [mailto:
> quickfixn-bounces at lists.quickfixn.com] *On Behalf Of *Grant Birchmeier
> *Sent:* Wednesday, December 04, 2013 10:45 PM
>
> *To:* Mailing list for QuickFIX/n
> *Subject:* Re: {{Quickfixn}} Please Help in changing logon message
>
>
>
> Hi Nirjhar,
>
>
>
> See this FAQ that I just wrote.
>
> https://github.com/connamara/quickfixn/wiki/User-FAQ
>
>
>
> You'll need to pass your settings object into your IApplication somehow
> (or at least the username/password strings), so that your ToAdmin()
> callback can see it.
>
>
>
> (The SessionSettings interface could use some improvement, but it will
> work well enough for what you are proposing.)
>
>
>
> -Grant
>
>
>
>
>
> On Thu, Nov 28, 2013 at 11:26 PM, Nirjhar Jain <nirjhar.jain at commdel.net>
> wrote:
>
> Actually I have added
>
>
>
> if (SessionID.IsSet(this.SessionID.Password))
>
> logon.SetField(new Fields.Password(this
> .SessionID.Password));
>
>
>
> in the GenerateLogon() function. Only adding Password in QF config file
> had not worked for me.
>
>
>
>
>
> Thanks & Regards,
>
> *Nirjhar Jain*
>
> Software Engineer
>
>
> *COMMDEL*
>
> Commdel Consulting Services P Ltd,
>
> H-134, Sector-63, Noida - U.P. (India)
>
>
>
> www.commdel.net
>
> *A n I S O 9 0 0 1 : 2 0 0 8 C e r t i f i e d C o m p a n
> y*
>
> *Payment** Enterprise Mobility Internet *
>
>
>
> *From:* quickfixn-bounces at lists.quickfixn.com [mailto:
> quickfixn-bounces at lists.quickfixn.com] *On Behalf Of *Øyvind Sævareid
> Ellefsen
> *Sent:* Thursday, November 28, 2013 9:57 PM
>
>
> *To:* Mailing list for QuickFIX/n
> *Subject:* Re: {{Quickfixn}} Please Help in changing logon message
>
>
>
> Hmm, I have had trouble with that earlier.
>
>
>
> Just Password=YOURPASSWORDSTRING in each session it is needed?
>
>
>
>
>
> -Oeyvind
>
>
>
> *From:* quickfixn-bounces at lists.quickfixn.com [
> mailto:quickfixn-bounces at lists.quickfixn.com<quickfixn-bounces at lists.quickfixn.com>]
> *On Behalf Of *Grant Birchmeier
> *Sent:* 28. november 2013 17:11
> *To:* Mailing list for QuickFIX/n
> *Subject:* Re: {{Quickfixn}} Please Help in changing logon message
>
>
>
> You can put the username/password in your QF config file and then read
> them from your SessionSettings object.
>
>
>
> I would recommend this over editing the QF source.
>
>
>
>
>
> On Thu, Nov 28, 2013 at 9:42 AM, Nirjhar Jain <nirjhar.jain at commdel.net>
> wrote:
>
> This will hardcode the password in the code, but I don’t want that. I want
> to pass it in .cfg file.
>
>
>
> It’s Ok. I found the solution for this.
>
>
>
> I have added the password in generateLogon() in Session.cs class.
>
> This resolved my issue.
>
>
>
> Thanks for quick response.
>
>
>
> Thanks & Regards,
>
> *Nirjhar Jain*
>
> Software Engineer
>
>
> *COMMDEL*
>
> Commdel Consulting Services P Ltd,
>
> H-134, Sector-63, Noida - U.P. (India)
>
>
>
> www.commdel.net
>
> *A n I S O 9 0 0 1 : 2 0 0 8 C e r t i f i e d C o m p a n
> y*
>
> *Payment** Enterprise Mobility Internet *
>
>
>
> *From:* quickfixn-bounces at lists.quickfixn.com [mailto:
> quickfixn-bounces at lists.quickfixn.com] *On Behalf Of *Øyvind Sævareid
> Ellefsen
> *Sent:* Thursday, November 28, 2013 7:07 PM
>
>
> *To:* Mailing list for QuickFIX/n
>
> *Subject:* Re: {{Quickfixn}} Please Help in changing logon message
>
>
>
> Hi, you can have something like this in your class;
>
>
>
> public void ToAdmin(Message message, SessionID sessionID)
>
> {
>
> Header header = message.Header;
>
>
>
> if (header.GetField(Tags.MsgType) == MsgType.LOGON)
>
> {
>
> message.SetField(new Password("<your-password-goes-here"));
>
> message.SetField(new EncryptMethod(EncryptMethod.NONE));
>
> message.SetField(new HeartBtInt(30));
>
>
>
> }
>
>
>
> }
>
>
>
> It will then apply your password to the message sent to your counterpart.
>
>
>
> I have seen this as very undocumented, so I had to spend some time finding
> out myself.
>
>
>
> Mvh / Brgds
>
> Oeyvind Ellefsen
>
>
>
>
>
> *From:* quickfixn-bounces at lists.quickfixn.com [
> mailto:quickfixn-bounces at lists.quickfixn.com<quickfixn-bounces at lists.quickfixn.com>]
> *On Behalf Of *Nirjhar Jain
> *Sent:* 28. november 2013 14:34
> *To:* 'Mailing list for QuickFIX/n'
> *Subject:* {{Quickfixn}} Please Help in changing logon message
>
>
>
> Hi All,
>
>
>
> If I want to add 2 field in Logon message to be sent to the acceptor
> server, that are Account and Password, then what changes I have to do in
> QuickFix code.
>
>
>
>
>
> Thanks & Regards,
>
> *Nirjhar Jain*
>
> Software Engineer
>
>
> *COMMDEL*
>
> Commdel Consulting Services P Ltd,
>
> H-134, Sector-63, Noida - U.P. (India)
>
>
>
> www.commdel.net
>
> *A n I S O 9 0 0 1 : 2 0 0 8 C e r t i f i e d C o m p a n
> y*
>
> *Payment** Enterprise Mobility Internet *
>
>
>
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
>
>
>
> --
>
> Grant Birchmeier
>
> *Connamara Systems, LLC*
>
> *Made-To-Measure Trading Solutions.*
>
> Exactly what you need. No more. No less.
>
> http://connamara.com
>
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
>
>
>
> --
>
> Grant Birchmeier
>
> *Connamara Systems, LLC*
>
> *Made-To-Measure Trading Solutions.*
>
> Exactly what you need. No more. No less.
>
> http://connamara.com
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
--
Grant Birchmeier
*Connamara Systems, LLC*
*Made-To-Measure Trading Solutions.*
Exactly what you need. No more. No less.
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20131205/47ff340f/attachment-0002.htm>
More information about the Quickfixn
mailing list