[QFJ-270] conditionally required field missing message uninformative Created: 10/Dec/07  Updated: 07/Aug/08  Resolved: 18/Jun/08

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.0.4
Fix Version/s: 1.3.2

Type: Improvement Priority: Minor
Reporter: John Coleman Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

JVM 1.5 on WindowsXP.



 Description   

When messages with conditionally required fields missing are submitted, the rejection message does not specify the tag number of the missing field. This probably needs to be somewhere in tag 58, as tag 371 is not a FIX standard tag for message rejections.



 Comments   
Comment by Steve Bate [ 03/Feb/08 ]

Can you add some more detail on this issue? At least in the Session implementation, conditionally-required field rejects do include the tag number. For FIX 4.2 and above it is put into tag 371. For older versions, it is included in the Text (58) field.

Is this an issue with the Banzai example program?

Comment by John Coleman [ 04/Feb/08 ]

I amended the following code in Session.java to resolve the issue:

public synchronized void next(Message message) throws FieldNotFound, RejectLogon,
...
if (sessionID.getBeginString().compareTo(FixVersions.BEGINSTRING_FIX42) >= 0
&& message.isApp())

{ generateBusinessReject(message, BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING, e.field); }

else {
generateReject(message, SessionRejectReason.REQUIRED_TAG_MISSING, e.field);
if (msgType.equals(MsgType.LOGON))

{ getLog().onEvent("Required field missing from logon"); disconnect(); }

}
...

private void generateBusinessReject(Message message, int err, int field) throws FieldNotFound, IOException

{ Message reject = messageFactory.create(sessionID.getBeginString(), MsgType.BUSINESS_MESSAGE_REJECT); initializeHeader(reject.getHeader()); String msgType = message.getHeader().getString(MsgType.FIELD); String msgSeqNum = message.getHeader().getString(MsgSeqNum.FIELD); reject.setString(RefMsgType.FIELD, msgType); reject.setString(RefSeqNum.FIELD, msgSeqNum); reject.setInt(BusinessRejectReason.FIELD, err); state.incrNextTargetMsgSeqNum(); String reason = BusinessRejectReasonText.getMessage(err) + " " + field; populateRejectReason(reject, reason); sendRaw(reject, 0); getLog().onEvent("Message " + msgSeqNum + " Rejected: " + reason); }
Generated at Sat Nov 23 00:12:12 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.