Imported from previous forum
Hello,
I need to create a custom message with my some new custom fields.
I have made the custom fields and used them successfully in prdefined messages. I did changes in .xml file and added new fields, made custom field classes and used them. Now i am looking to create my own messages and made new tag in .xml file for my Message and gave msgtype = U1.
But when i tried sending that message the acceptor gave an error “Message 12 Rejected: Value is incorrect (out of range) for this tag:35”
Please help me out. I think i able understand the error, that U1 is not defined in MSGTYPE class. I hope i am right. Please give a step by step solution
As I understand from your post, your FIX engine is session initiator. You have configured ^35=U1^ in your FIX Engine. You need to ask your counterparty (FIX Session acceptor) to also configure MsgType U1 along with applicable fields in their FIX engine’s xml definition, otherwise the counterparty’s FIX engine would not be able to accept ^35=U1^ as a valid MsgType.
Hello, I need to create a custom message with my some new custom fields.
I have made the custom fields and used them successfully in prdefined
messages. I did changes in .xml file and added new fields, made custom
field classes and used them. Now i am looking to create my own messages
and made new tag in .xml file for my Message and gave msgtype = U1.But when i tried sending that message the acceptor gave an error
“Message 12 Rejected: Value is incorrect (out of range) for this tag:35”Please help me out. I think i able understand the error, that U1 is
not defined in MSGTYPE class. I hope i am right. Please give a step by
step solution
The both ends are using the same .xml file. above are the lines i added. Also i added the fields, namely, CustomINT and CustomSTRING.
I have a class at client end MyMessage which extends quickfix.42.Message
…detail of constructor is below
MyMessage(CustomINT intData, CustomSTRING stringData) {
getheader().setField(new MsgType(“U1”));
setField(intData);
setField(stringData);
}
CustomINT and CustomSTRING are also defined and are inherited from IntField and StringField…
now where is the problem
The xml fragments you posted are missing, repost it replacing < with [ and > with ]
The both ends are using the same .xml file. above are the lines i added.
Also i added the fields, namely, CustomINT and CustomSTRING.I have a class at client end MyMessage which extends quickfix.42.Message
…detail of constructor is belowMyMessage(CustomINT intData, CustomSTRING stringData) {
getheader().setField(new MsgType(“U1”)); setField(intData);
setField(stringData); }CustomINT and CustomSTRING are also defined and are inherited from
IntField and StringField…now where is the problem
[message name=“MyMessage” msgtype=“U1” msgcat=“admin”]
[field name=“CustomINT” required=“N” /]
[field name=“CustomSTRING” required=“N” /]
[/message]
The both ends are using the same .xml file. above are the lines i
added. Also i added the fields, namely, CustomINT and CustomSTRING.
I have a class at client end MyMessage which extends
quickfix.42.Message …detail of constructor is belowMyMessage(CustomINT intData, CustomSTRING stringData) {
getheader().setField(new MsgType(“U1”)); setField(intData);
setField(stringData); }CustomINT and CustomSTRING are also defined and are inherited from
IntField and StringField…now where is the problem
I have been using the .xml definitions as provided in the FIXProtocol.org website at
http://fixprotocol.org/repository
which has five .xml files for FIX.4.2. I am not familiar with the format / contents of the QuickFIX repository.
[message name=“MyMessage” msgtype=“U1” msgcat=“admin”] [field
name=“CustomINT” required=“N” /] [field name=“CustomSTRING”
required=“N” /] [/message]The both ends are using the same .xml file. above are the lines i
added. Also i added the fields, namely, CustomINT and CustomSTRING.
I have a class at client end MyMessage which extends
quickfix.42.Message …detail of constructor is belowMyMessage(CustomINT intData, CustomSTRING stringData) {
getheader().setField(new MsgType(“U1”)); setField(intData);
setField(stringData); }CustomINT and CustomSTRING are also defined and are inherited from
IntField and StringField…now where is the problem
Thanx Mahesh
I have solved the problem. Actually i was missing one more entry related to the my custom message in my .xml file.
ThankYou for your help…