I'm implementing a client-server set based on QuickFIX. When I try to send a message that contains a Parties repeating group, I get the Reject with the following description: "58=Tag not defined for this message type|371=447|"
The message type thet I try to send is OrderCancelReplaceRequest.
The code sample is:
FIX44::OrderCancelReplaceRequest order(FIX::MsgType("G"));
FIX44::OrderCancelReplaceRequest::NoPartyIDs party;
// 448-PartyID
party.set(FIX::PartyID("PartyId"));
// 447-PartyIDSource
party.set(FIX::PartyIDSource('B'));
// 452-PartyRole
party.set(FIX::PartyRole(1));
// 802-NoPartySubIDs
party.set(FIX::NoPartySubIDs(0));
order.addGroup(party);
...
If the message contains no Parties group, it's validated successfully by the server.
Moreover, it's validated successfully even if it contains the FIX44::OrderCancelReplaceRequest::NoAllocs group:
FIX44::OrderCancelReplaceRequest::NoAllocs alloc;
// 79-AllocAccount
alloc.set(FIX::AllocAccount("Alloc Account"));
// 80-AllocQty
alloc.set(FIX::AllocQty(4.2));
order.addGroup(alloc);
So, I see this problem only when I try to use the Parties group.
The config file for the server is:
[DEFAULT]
ConnectionType=acceptor
SocketAcceptPort=28663
SocketReuseAddress=Y
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
DataDictionary=<some path here>/FIX44.xml
FileLogPath=QuickFixServerLog
ValidateUserDefinedFields=N
[SESSION]
BeginString=FIX.4.4
SenderCompID=EXECUTOR
TargetCompID=CLIENT1
FileStorePath=store
The config file of the client is:
[DEFAULT]
ConnectionType=initiator
ReconnectInterval=1
FileStorePath=store
StartTime=00:00:00
EndTime=00:00:00
UseDataDictionary=Y
DataDictionary=<some path here>/FIX44.xml
HttpAcceptPort=9911
ValidateUserDefinedFields=N
ResetOnLogout=Y
ResetOnLogon=Y
[SESSION]
BeginString=FIX.4.4
SenderCompID=CLIENT1
TargetCompID=EXECUTOR
SocketConnectHost=127.0.0.1
SocketConnectPort=28663
HeartBtInt=15
Upd.
The example of the request reseived by server (it's from the server logs) is:
8=FIX.4.4|9=234|35=G|34=2|49=CLIENT1|52=20150417-10:49:07.715|56=EXECUTOR|1=Account|11=Id123|38=11.11|40=1|41=OrigId321|44=4.2|54=2|55=Symbol|60=20150417-10:49:07|78=2|79=AllocAccount1|79=AllocAccount2|80=10|80=20|447=B|448=PartyId|452=1|453=1|802=0|10=185|
The response for that request is:
8=FIX.4.4|9=124|35=3|34=2|49=EXECUTOR|52=20150417-10:49:07.719|56=CLIENT1|45=2|58=Tag not defined for this message type|371=447|372=G|373=2|10=060|
As you noted after our conversation in the comments section, the order of the fields in the
<Parties> component block
group was incorrect. The field order in a repeating group (or component block as in case of<Parties>
) should be preserved. You can find here a blog post on the subject explaining the importance of field order in repeating groups.In your case, a client-side modification of the message screwed up the field order of the
<Parties>
group which resulted in aReject
message from the server.@TT My 10 cents. Fiximate is your friend.
In my FIX4.4 data dictionary I can see that for message type OrderCancelReplaceRequest the tag 447 PartyIDSource is not defined. I enclose my data dictionary message.
If you need to define PartyIDSource then add it to your data dictionary.