{{Quickfixn}} username and password in logon message

Roberto Reff roberto.reff at poligram.de
Thu Nov 9 02:36:48 PST 2017


Hello Aidynchik.


ToAdmin and FromAdmin depends on the side your application is acting.

TradeClient or Executor …


Regards
Roberto

Von: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] Im Auftrag von ????? ???????
Gesendet: Donnerstag, 9. November 2017 09:29
An: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com>
Betreff: Re: {{Quickfixn}} username and password in logon message


Hello, Roberto!
I don't know why but your code in "toAdmin" method is not working.
I took the "TradeClient" example
--
С уважением, Айдын
среда, 08 ноября 2017г., 22:14 +06:00 от Roberto Reff <roberto.reff at poligram.de<mailto:roberto.reff at poligram.de>>:
Hello Aidynchik.
From my point of view you implement each message type you want or need to support be derive from QuickFix.MessageCracker.
I do not get the point why you have to have a manual prove for TAG 35.
See the examples:
*  https://github.com/connamara/quickfixn/blob/master/Examples/Executor/Executor.cs
*  https://github.com/connamara/quickfixn/blob/master/Examples/TradeClient/TradeClientApp.cs
You just need to add this:
///<summary>
///
///</summary>
///<param name="logonRequest"></param>
///<param name="session"></param>
publicvoid OnMessage(QuickFix.FIX44.Logon
logonRequest, SessionID
session) { }
And change to:
///<summary>
///
///</summary>
///<param name="logonRequest"></param>
///<param name="session"></param>
publicvoid OnMessage(QuickFix.FIX44.Logon
logonRequest, SessionID
session)
        {
            logonRequest.SetField(newUsername("USERNAME"),
true);
            logonRequest.SetField(newPassword("PASSWORD"),
true);
try
            {
Session.SendToTarget(logonRequest,
session);
            }
catch (SessionNotFound
ex)
            {
Console.WriteLine("==session
not found exception!==");
Console.WriteLine(ex.ToString());
            }
catch (Exception
ex)
{
Console.WriteLine(ex.ToString());
            }
        }
Or you change your ToAdmin Implementation, instead of sending to cracker catch that type and response to:
                Before:
publicvoid ToAdmin(Message
message, SessionID
sessionID) { }
       After:
Regards
Roberto
-----Ursprüngliche Nachricht-----
Von: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] Im Auftrag von ?????
Gesendet: Mittwoch, 8. November 2017 16:41
An: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>>
Betreff: Re: {{Quickfixn}} username and password in logon message
Hello!
Yes, thank you very much, I found it by myself already.
But what the best practice to check for the message type?
I did not find anything better than just checking that message contains characters "35 = A". Because in C #, the method MsgType of the Message class is hidden for some reason.
> 8 нояб. 2017 г., в 20:03, Hermes Radison <Hermes.Radison at oati.net<mailto:Hermes.Radison at oati.net>> написал(а):
>
>
> Hello,
>
> In your application class, inside ToAdmin, check for the message type logon then set the UserName and Password fields.
> You can use set field on the message, or cast it to a logon message then set the field directly.
>
> Thank you,
>
> -----Original Message-----
> From: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of
quickfixn-request at lists.quickfixn.com<mailto:quickfixn-request at lists.quickfixn.com>
> Sent: Wednesday, November 08, 2017 12:46 AM
> To: quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>
> Subject: Quickfixn Digest, Vol 73, Issue 6
>
> {External email message: This email is from an external source. Please exercise caution prior to opening attachments, clicking on links, or providing any sensitive information.}
>
> Send Quickfixn mailing list submissions to
>             quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>
>
> To subscribe or unsubscribe via the World Wide Web, visit
>             http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
> or, via email, send a message with subject or body 'help' to
>             quickfixn-request at lists.quickfixn.com<mailto:quickfixn-request at lists.quickfixn.com>
>
> You can reach the person managing the list at
>             quickfixn-owner at lists.quickfixn.com<mailto:quickfixn-owner at lists.quickfixn.com>
>
> When replying, please edit your Subject line so it is more specific than "Re: Contents of Quickfixn digest..."
>
>
> Today's Topics:
>
>   1.  Fwd: username and password in logon message (????? ???????)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 08 Nov 2017 09:45:32 +0300
> From: ????? ??????? <aidynchik_84 at mail.ru<mailto:aidynchik_84 at mail.ru>>
> To: quickfixn at lists.quickfixn.com<mailto:quickfixn at lists.quickfixn.com>
> Subject: {{Quickfixn}} Fwd: username and password in logon message
> Message-ID: <1510123532.985590326 at f54.i.mail.ru<mailto:1510123532.985590326 at f54.i.mail.ru>>
> Content-Type: text/plain; charset="utf-8"
>
>
> Hello!
> Please help me! =)
> I am trying to work with Kase.kz by FIX-protocol. My app is written on C#.
> Kase.kz requires these fields
> 34 MsgSeqNum SeqNum
> 49 SenderCompID String
> 52 SendingTime UTCTimestamp
> 56 TargetCompID String
> 108 HeartBtInt int
> 98 EncryptMethod int
> 141 ResetSeqNumFlag=Y boolean
> 553 Username String
> 554 Password String
> 1137 DefaultApplVerID
> I've downloaded an example TradeClient, configured it, but in the logon message there are no these fields - Username and Password.
> How to include them into the message? I attached my result.
> Here is my "tradeclient.cfg"
>
> [DEFAULT]
> ConnectionType=initiator
> ReconnectInterval=1000
> FileStorePath=store
> FileLogPath=log
> StartTime=00:00:00
> EndTime=00:00:00
> UseDataDictionary=Y
> DataDictionary=../../../../spec/fix/FIX44.xml
> AppDataDictionary=../../../../spec/fix/FIX50.xml
> DefaultApplVerID=FIX.5.0
> TargetCompID=KASE
> SocketConnectHost=212.19.144.39
> SocketConnectPort=9880
> SocketUseSSL=N
> LogoutTimeout=5
> ResetOnLogon=Y
> ResetOnDisconnect=Y
> Password=******
>
> [SESSION]
> BeginString=FIXT.1.1
> SenderCompID=001d01
> HeartBtInt=30
>
>
> ----------------------------------------------------------------------
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20171108/b2873f08/attachment.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: Screenshot_1.png
> Type: image/png
> Size: 20285 bytes
> Desc: not available
> URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20171108/b2873f08/attachment.png>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
> ------------------------------
>
> End of Quickfixn Digest, Vol 73, Issue 6
> ****************************************
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
Poligram GmbH
Rilkeweg 4
59519 Möhnesee
Geschäftsführung: Roberto Reff
Registergericht: Amtsgericht Arnsberg
Registernummer: HRB10900
USt.ID: DE251226082
http://www.poligram.de
This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are
notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com<mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com




________________________________
Poligram GmbH
Rilkeweg 4
59519 Möhnesee


Geschäftsführung: Roberto Reff
Registergericht: Amtsgericht Arnsberg
Registernummer: HRB10900
USt.ID: DE251226082

http://www.poligram.de


This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20171109/8a69a5f6/attachment.htm>


More information about the Quickfixn mailing list