From: Ilker C. <ilk...@as...> - 2010-02-17 09:06:59
|
Thanks Paul, I tried that but creating fix message from constructor has some problems. When a message has grouped tag (543 > 1 or NoPartyIDs > 1) it generated only one group and deleted others. Rather I'm using MessageUtils.parse which works fine. I guess this is because it has dataDictionary coming from Session. // message = MessageUtils.parse(session, line); Regards Ilker -----Original Message----- From: Paul Netherwood [mailto:pau...@be...] Sent: 16 February 2010 17:30 To: qui...@li... Subject: Re: [Quickfixj-users] converting string to fix message object QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ QuickFIX/J Support: http://www.quickfixj.org/support/ Hi The method I use is the following: // Parse string into raw message type to allow us to retreive the message type and begin string fields Message rawMessage = new Message(messageStr); BeginString beginString = new BeginString(); rawMessage.getHeader().getField(beginString); MsgType msgType = new MsgType(); rawMessage.getHeader().getField(msgType); // Create message class using message type and begin string fields MessageFactory messageFactory = new DefaultMessageFactory(); Message message = messageFactory.create(beginString.getValue(), msgType.getValue()); // Now we have the correct class we can populate its fields from the message string message.fromString(messageStr, null, false); ------------------------------------------------------------------------ --------------------------------------------- Dr Paul Netherwood Partner Beach Horizon LLP 10 Finsbury Square London EC2A 1AD Direct: +44 (0)20 7382 2465 Fax: +44 (0)20 7382 2465 Email: pa...@be... Web: www.beachhorizon.com > -----Original Message----- > From: Ilker Cikrikcili [mailto:ilk...@as...] > Sent: 16 February 2010 11:13 > To: qui...@li... > Subject: [Quickfixj-users] converting string to fix message object > > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > Hi to all, > > I have a newbie question for you. Is it possible to convert a string to > fix message object? > My acceptor application is taking a .log file as input which includes a > seperate fix 4.4 message on each line. > My aim is to parse this .log file and create a fix message for each > line. Is there a build in functionality to do this? > > Thanks in advance > > ----------------------------------------------------------------------- > ------- > SOLARIS 10 is the OS for Data Centers - provides features such as > DTrace, > Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW > http://p.sf.net/sfu/solaris-dev2dev > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users ******************************************************************** This message and any attachment are confidential. If you are not the intended recipient please contact the sender, delete this message and any attachment from your system and do not disclose, copy or distribute the contents to any other person. Beach Horizon LLP (Beach Horizon) is not responsible for any information contained in this email. Beach Horizon reserves the right to monitor all email messages passing through its network. ******************************************************************** ------------------------------------------------------------------------ ------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Quickfixj-users mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfixj-users |