RE: [Quickfix-developers] Required Tag missing - 58
Brought to you by:
orenmnero
|
From: Shepheard, T. (London) <Tob...@ml...> - 2006-02-06 16:11:17
|
First of all, you are misinterpreting the toAdmin message. This is a response to you, from the other server, with a MsgType (tag 35) of 3 - a reject message. The field 58 is a text field telling you why your message was rejected - it was missing a required tag. Field 371, RefTagId, is saying that the missing tag was tag 35. This isn't good, because tag 35 is the message type! So, you were sending a message without setting the msgType...now to look at why... =20 If you look at your code, you're actually sending a QuickFix.Message object. This is a generic message object, and you're never telling it what type of FIX message it is meant to be. You're creating the report-type message and then not doing anything with it at the moment. You should really use the typesafe set methods as described in the docs I pointed at earlier, not the setField method. (http://www.quickfixengine.org/quickfix/doc/html/sending_messages.html). Whilst both work, the recommended method is recommended for good reasons - including the fact that it sets the msgType and other header fields for you :) =20 Thus: =20 QuickFix44.TradeCaptureReportRequest myTCRreport =3D new QuickFix44.TradeCaptureReportRequest(); myTCRreport.set(new QuickFix.SubscriptionRequestType('1')); myTCRreport.set(new QuickFix.TradeRequestType(1)); myTCRreport.set(new QuickFix.TradeRequestID("abc101")); myTCRreport.set(new QuickFix.Text("TCR")); =20 Session.sendToTarget(msg,e.SessionID); =20 =20 As a minor aside, perhaps its worth adding a check in the QuickFIX code to catch people trying to send messages formed from the base class and with no specific type. =20 Regards Toby -----Original Message----- From: qui...@li... [mailto:qui...@li...] On Behalf Of Shankar Krishnan Sent: 06 February 2006 15:49 To: qui...@li... Subject: [Quickfix-developers] Required Tag missing - 58 =09 =09 =20 When sending a Session.sendToTarget request for a trade capture report request coded as =20 QuickFix44.TradeCaptureReportRequest myTCRreport =3D new QuickFix44.TradeCaptureReportRequest(); QuickFix.Message msg =3D new QuickFix.Message(); msg.setField(new QuickFix.SubscriptionRequestType('1')); msg.setField(new QuickFix.TradeRequestType(1)); msg.setField(new QuickFix.TradeRequestID("abc101")); msg.setField(new QuickFix.Text("TCR")); =20 Session.sendToTarget(msg,e.SessionID); -- =20 My ToAdmin message string looks like =20 To Admin:::::8=3DFIX.4.4_ 9=3D117 35=3D3 34=3D2 49=3D XXXXX 52=3D20060206-15:44:09.729 56=3Dxxxxxxxx 45=3D1 58=3DRequired tag missing 371=3D35 372=3DA_ 373=3D1 10=3D009 =20 I am using FIX 4.4, the TCR request does not mention any tag 58, which seems to be a text field, I tried inserting A text field that did not work too. =20 Thanks -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the = sender, delete it and do not read, act upon, print, disclose, copy, = retain or redistribute it. Click here for important additional terms = relating to this e-mail. http://www.ml.com/email_terms/ -------------------------------------------------------- |