[QFJ-679] TAG_NOT_DEFINED_FOR_THIS_MESSAGE_TYPE because of wrong order of tags Created: 03/May/12  Updated: 01/Aug/12  Resolved: 01/Aug/12

Status: Closed
Project: QuickFIX/J
Component/s: Message Generation
Affects Version/s: None
Fix Version/s: None

Type: Other Priority: Critical
Reporter: Sujit Jaju Assignee: Unassigned
Resolution: Not a bug Votes: 0
Labels: None


 Description   

The message I am creating is:
8=FIX.4.49=20135=R34=249=abcd52=20120503-04:25:30.61456=pqrs146=155=EUR/USD167=FOR38=10000063=664=2012052815=USD1=mnop40=C453=1131=1448=wxyz452=310=071
But I want to create it in the order:
8=FIX.4.49=20135=R34=249=abcd52=20120503-04:25:30.61456=pqrs131=1 146=155=EUR/USD167=FOR38=10000063=664=2012052815=USD1=mnop40=C453=1448=wxyz452=310=071

(Tag 131 at start of body and not between tag 453 and tag 458)

I have written following code:
QuoteRequest message = new QuoteRequest();
QuoteRequest.NoRelatedSym group = new QuoteRequest.NoRelatedSym();
group.setString(131, quoteRequestBean.getQuoteReqID().getValue());
group.setString(55, quoteRequestBean.getSymbol().getValue());
group.setString(167, quoteRequestBean.getSecurityType().getValue());
group.setDouble(38, quoteRequestBean.getOrderQty().getValue());
group.setChar(63, quoteRequestBean.getSettlType().getValue());
group.setString(64, quoteRequestBean.getSettlDate().getValue());
group.setString(15, quoteRequestBean.getCurrency().getValue());
group.setString(1, quoteRequestBean.getAccount().getValue());
group.setChar(40, quoteRequestBean.getOrdType().getValue());
group.setInt(453, quoteRequestBean.getNoPartyIDs().getValue());
group.setString(448, quoteRequestBean.getPartyID().getValue());
group.setInt(452, quoteRequestBean.getPartyRole().getValue());
message.addGroup(group);

But still it pushes the tag 131 between tag 453 and tag 448.
Since tag 448 is part of tag 453 group, i believe the error is coming as:

8=FIX.4.49=14435=334=249=abcd52=20120503-04:45:53.62756=pqrs45=258=Tag not defined for this message type371=448372=R373=210=005

Please help me solve this problem asap. Also let me know if any other input is needed from my side and if I am writing any step wrongly.



 Comments   
Comment by Grant Birchmeier [ 04/May/12 ]

You should try the mailing list. (Only a few eyes are alerted to bug submissions.)

Please note this bug number in your mail. If someone helps you solve it, please come back and close this bug.

Comment by Grant Birchmeier [ 04/May/12 ]

Um, if you don't want 131 in your group, why did you set it in the group?

This line sets it in the group.
group.setString(131, quoteRequestBean.getQuoteReqID().getValue());

I think you want this:
message.setString(131, quoteRequestBean.getQuoteReqID().getValue());

Also, you should consider using typesafe methods, instead of setString() and setInt().
http://quickfixj.org/quickfixj/usermanual/1.5.1/usage/sending_messages.html

Generated at Sat Nov 23 07:21:40 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.