John, if you just want to create Message objects, you do not need the =20=
MessageCracker. The MessageCracker is only used if you require =20
version specific messages of a particular type. If you just want =20
generic messages, use the Message object constructor.
On Sep 22, 2007, at 2:36 PM, John K. wrote:
> QuickFIX Documentation: http://www.quickfixengine.org/quickfix/doc/=20
> html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
>
> I've resolved the issue I'd faced below, seems like I'd not =20
> realised that the
> header items cannot be accessed by just calling say getString(8). =20
> However
> items in the body can be accessed that way. Phew!
> Anyway, for anyone that may ever face this problem, to create a =20
> message from
> a string, just initialise it as usual. i.e.
> Dim msg as New Message(youstringhere) 'e.g. 8=3DFIX.4.4=019=3D141=0135=3D=
U1=0156
> msg.getString(44) 'for an item in the body
> msg.getHeader().getString(8) 'for an item in the header
>
> Hope this helps, I've left my post below just in case some drifter =20
> comes
> across a similar problem
> Thanks, (again), John.
> ------------
> Hi, I'm very new to quickfix and although I fully understand how the
> protocol and quickfix work, I'm not completely clear on how the =20
> Message and
> MessageCracker objects are supposed to be used.
>
> I've got massive log files that contain persisted fix data and I'd =20
> like to
> use the message object to persist the data to a database. I thought =20=
> it was
> just a matter of splitting the log file into text, and using the
> messageCracker to create a QuickFix.Message object from the string, =20=
> but I'm
> yet to get anything working.
>
> Basically i want to be able to create a message object that I can =20
> use to get
> data from any field, that is if given a string like
> (8=3DFIX.4.4=019=3D141=0135=3DU1=0156=3DRX=0149=3DFEE) etc, I'd like =
to be able to =20
> have a
> message object that I can then just call getString,getField etc.
>
> Any help will be much appreciated.
>
> Edit:
> Something weird i've noticed is that just by initialising the =20
> Message object
> with the string in the constructor, is that the message seems to be =20=
> fine.
> When I debug in VS2005 and call the ToXML() method, I get proper =20
> output like
> this
>
> <message>
> <header>
> <field number=3D"8"><![CDATA[FIX.4.4]]></field>
> <field number=3D"9"><![CDATA[141]]></field>
> <field number=3D"35"><![CDATA[U1]]></field>
> <field number=3D"34"><![CDATA[10319]]></field>
> <field number=3D"49"><![CDATA[FEED]]></field>
> etc...
>
> however when I try to use a method like say getString(8), I get a
> FieldNotFound exception, is this right? According to the XML =20
> output, all the
> fields have been found, so what gives?
>
>
> Thanks John.
>
> --=20
> View this message in context: http://www.nabble.com/Resolved%3A-=20
> Creating-Cracking-a-message-from-a-log-file--tf4501937.html#a12839320
> Sent from the QuickFIX - Dev mailing list archive at Nabble.com.
>
>
> ----------------------------------------------------------------------=20=
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
|