{{Quickfixn}} How to prevent rejection of message missing an *optional* field.

Manuel Lopez lopez.post at gmail.com
Fri Jan 10 18:24:30 PST 2014


ok, I think I found the problem, a typo in my code.  The quickfix error
message is a bit cryptic, but I searched for LastPx in my code and found
this:
AvgPx_fx6 = msg.IsSetAvgPx() ? (decimal?)msg.LastPx.getValue() : null,

that should be AvgPx on the right, so I was a looking for LastPx without
checking for its existence.


On Fri, Jan 10, 2014 at 8:43 PM, Manuel Lopez <lopez.post at gmail.com> wrote:

> Unfortunately that didn't solve the problem--quickfixn is still rejecting
> messages based on a missing tag 31, even with data dictionary off.
> The code is in session.cs, and it is going through this and raising a
> CONDITIONALLY_REQUIRED_FIELD_MISSING error.
>
>             catch (FieldNotFoundException e)
>             {
>                 this.Log.OnEvent("Rejecting invalid message, field not
> found: " + e.Message);
>                 if
> ((SessionID.BeginString.CompareTo(FixValues.BeginString.FIX42) >= 0) &&
> (message.IsApp()))
>                 {
>                     GenerateBusinessMessageReject(message,
> Fields.BusinessRejectReason.CONDITIONALLY_REQUIRED_FIELD_MISSING, e.Field);
>                 }
>                 else
>                 {
>                     if (msgType.Equals(Fields.MsgType.LOGON))
>                     {
>                         this.Log.OnEvent("Required field missing from
> logon");
>                         Disconnect("Required field missing from logon");
>                     }
>                     else
>                         GenerateReject(message, new
> QuickFix.FixValues.SessionRejectReason(SessionRejectReason.REQUIRED_TAG_MISSING,
> "Required Tag Missing"), e.Field);
>                 }
>             }
>
>
>
> On Fri, Jan 10, 2014 at 7:21 PM, Manuel Lopez <lopez.post at gmail.com>wrote:
>
>> I think I'll set UseDataDictionary to "N."
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20140110/94510df1/attachment-0002.htm>


More information about the Quickfixn mailing list