Quantcast

quickfix.Message(String) not loading a message from a String correctly.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

quickfix.Message(String) not loading a message from a String correctly.

ali.n.naqvi
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



 

Hi All,

 

Quickfixj question: when I try to use the constructor of Message() class to load a 35=X message from a string, the 268 repeating group is truncated and only the first value is loaded into the new message.

 

I also tried MessageUtils.parse() and it gave me same erroneous result.

 

Is it because loading a MD update isnt supported in this format or am I doing something wrong?

 

public void fromApp(Message message, SessionID sessionId)

{

                // Deal with incoming msgs from the venue.

 

                try

                {

                                LOGGER.info("Original msg: " + message.toString());

                               

                                Message myMsg = new Message(message.toString());

                               

                                LOGGER.info("Copied msg: " + myMsg.toString());

                }

                catch (InvalidMessage e)

                {

                                LOGGER.info(e);

                }

}                             

                               

                               

Original msg:

8=FIXT.1.19=52935=X34=000000000449=MD52=20161108-16:00:29.86956=ID-WHATEVER-MD21128=942=20161108-16:00:29.869262=mdID1268=4279=1269=0278=1055=EUR/USD270=1.1042215=EUR271=1000000282=BOA.299=2058066335564=20161110279=1269=1278=5055=EUR/USD270=1.1044115=EUR271=1000000282=BOA.299=2058066335564=20161110279=1269=0278=1155=EUR/USD270=1.1041915=EUR271=5000000282=BOA.299=2058066335564=20161110279=1269=1278=5155=EUR/USD270=1.1044415=EUR271=5000000282=BOA.299=2058066335564=2016111010=055

 

Copied msg:

8=FIXT.1.19=23535=X34=000000000449=MD52=20161108-16:00:29.86956=ID-WHATEVER-MD21128=915=EUR42=20161108-16:00:29.86955=EUR/USD64=20161110262=mdID1268=4269=0270=1.10422271=1000000278=10279=1282=BOA.299=2058066335510=172

 

Many Thanks,

Ali




This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: quickfix.Message(String) not loading a message from a String correctly.

Grant Birchmeier
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



I'm pretty sure this is because your DataDictionary xml file doesn't match the messages that you are receiving.

When the parser encounters a field that the DD doesn't indicate belongs to the repeating group, the parser interprets this group as completed.

Get ahold of your counterparty's spec, and alter your DD accordingly to match what they'll be sending you.

On Mon, Nov 14, 2016 at 12:49 PM, <[hidden email]> wrote:
QuickFIX/J Documentation: <a href="http://www.quickfixj.org/documentation/ QuickFIX/J" rel="noreferrer" target="_blank">http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



 

Hi All,

 

Quickfixj question: when I try to use the constructor of Message() class to load a 35=X message from a string, the 268 repeating group is truncated and only the first value is loaded into the new message.

 

I also tried MessageUtils.parse() and it gave me same erroneous result.

 

Is it because loading a MD update isnt supported in this format or am I doing something wrong?

 

public void fromApp(Message message, SessionID sessionId)

{

                // Deal with incoming msgs from the venue.

 

                try

                {

                                LOGGER.info("Original msg: " + message.toString());

                               

                                Message myMsg = new Message(message.toString());

                               

                                LOGGER.info("Copied msg: " + myMsg.toString());

                }

                catch (InvalidMessage e)

                {

                                LOGGER.info(e);

                }

}                             

                               

                               

Original msg:

8=FIXT.1.19=52935=X34=000000000449=MD52=20161108-16:00:29.86956=ID-WHATEVER-MD21128=942=20161108-16:00:29.869262=mdID1268=4279=1269=0278=1055=EUR/USD270=1.1042215=EUR271=1000000282=BOA.299=2058066335564=20161110279=1269=1278=5055=EUR/USD270=1.1044115=EUR271=1000000282=BOA.299=2058066335564=20161110279=1269=0278=1155=EUR/USD270=1.1041915=EUR271=5000000282=BOA.299=2058066335564=20161110279=1269=1278=5155=EUR/USD270=1.1044415=EUR271=5000000282=BOA.299=2058066335564=2016111010=055

 

Copied msg:

8=FIXT.1.19=23535=X34=000000000449=MD52=20161108-16:00:29.86956=ID-WHATEVER-MD21128=915=EUR42=20161108-16:00:29.86955=EUR/USD64=20161110262=mdID1268=4269=0270=1.10422271=1000000278=10279=1282=BOA.299=2058066335510=172

 

Many Thanks,

Ali




This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users




--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.

------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: quickfix.Message(String) not loading a message from a String correctly.

ali.n.naqvi
QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J Support: http://www.quickfixj.org/support/



It works now. Thanks very much … I did try DD in the past but I was using incorrect version.

 

For others benefit my syntax is:

 

DataDictionary dd = new DataDictionary("FIX50SP2.xml");// or whatever your DD would be.

             

Message fixMsg = MessageUtils.parse(new MessageFactory() ,dd, “long fix message");

 

 

Thanks again J

             

 

From: Grant Birchmeier [mailto:[hidden email]]
Sent: 14 November 2016 19:03
To: [hidden email]
Cc: Naqvi, Ali N. (TR Technology & Ops)
Subject: Re: [Quickfixj-users] quickfix.Message(String) not loading a message from a String correctly.

 

I'm pretty sure this is because your DataDictionary xml file doesn't match the messages that you are receiving.

 

When the parser encounters a field that the DD doesn't indicate belongs to the repeating group, the parser interprets this group as completed.

 

Get ahold of your counterparty's spec, and alter your DD accordingly to match what they'll be sending you.

 

On Mon, Nov 14, 2016 at 12:49 PM, <[hidden email]> wrote:

QuickFIX/J Documentation: http://www.quickfixj.org/documentation/
QuickFIX/J
Support: http://www.quickfixj.org/support/


 

Hi All,

 

Quickfixj question: when I try to use the constructor of Message() class to load a 35=X message from a string, the 268 repeating group is truncated and only the first value is loaded into the new message.

 

I also tried MessageUtils.parse() and it gave me same erroneous result.

 

Is it because loading a MD update isnt supported in this format or am I doing something wrong?

 

public void fromApp(Message message, SessionID sessionId)

{

                // Deal with incoming msgs from the venue.

 

                try

                {

                                LOGGER.info("Original msg: " + message.toString());

                               

                                Message myMsg = new Message(message.toString());

                               

                                LOGGER.info("Copied msg: " + myMsg.toString());

                }

                catch (InvalidMessage e)

                {

                                LOGGER.info(e);

                }

}                             

                               

                               

Original msg:

8=FIXT.1.19=52935=X34=000000000449=MD52=20161108-16:00:29.86956=ID-WHATEVER-MD21128=942=20161108-16:00:29.869262=mdID1268=4279=1269=0278=1055=EUR/USD270=1.1042215=EUR271=1000000282=BOA.299=2058066335564=20161110279=1269=1278=5055=EUR/USD270=1.1044115=EUR271=1000000282=BOA.299=2058066335564=20161110279=1269=0278=1155=EUR/USD270=1.1041915=EUR271=5000000282=BOA.299=2058066335564=20161110279=1269=1278=5155=EUR/USD270=1.1044415=EUR271=5000000282=BOA.299=2058066335564=2016111010=055

 

Copied msg:

8=FIXT.1.19=23535=X34=000000000449=MD52=20161108-16:00:29.86956=ID-WHATEVER-MD21128=915=EUR42=20161108-16:00:29.86955=EUR/USD64=20161110262=mdID1268=4269=0270=1.10422271=1000000278=10279=1282=BOA.299=2058066335510=172

 

Many Thanks,

Ali

 



This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.


------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users



 

--

Grant Birchmeier

Connamara Systems, LLC

Made-To-Measure Trading Solutions.

Exactly what you need. No more. No less.


------------------------------------------------------------------------------

_______________________________________________
Quickfixj-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quickfixj-users
Loading...