I want to persist a fix4.2 message to database by retrieving the value of each tag. I am having the ExecutionReport object of the fix message. I am retrieving the tag value of account using exec.getString(1) and this tag value is not present in the message so it is throwing FieldNotFound exception. In Fiximate I found that account is not a mandatory field.
I also tried with exec.getAccount().getValue() but got same exception. I found that every all these method throws FieldNotFound exception.
Is there any way to retrieve the tag value as null if that non-mandatory field is not present in the fix message.
Any help will be highly appreciated.
Thanks in advance.
Regards, Shadab