API Support Forum
OEC API > FIX Support > FAST Template.xml
Author Topic: FAST Template.xml
(2 messages, Page 1 of 1)
Moderators: VPfau
MConcas
Posts: 8
Joined: Sep 15, 2020


Posted: Oct 14, 2020 @ 01:29 PM             Msg. 1 of 2
Hi,

we are getting this error message: "Cannot encode message: The template Logon has not been registered." as we load the template:
var templateLoader = new XmlMessageTemplateLoader { LoadTemplateIdFromAuxId = true };

TryDownload();

var template = File.Exists(LocalFilename)
? new FileStream(LocalFilename, FileMode.Open, FileAccess.Read)
: Assembly.GetExecutingAssembly().GetManifestResourceStream("OEC.FIX.Sample.template.template.xml");

templateLoader.Load(template);
_templateRegistry = templateLoader.TemplateRegistry;
MessageFactory = new FastMessageFactory(_templateRegistry);
_clientMessageHandler = new ClientMessageHandler();
_protocol = new SessionControlProtocol11();
_protocol.RegisterSessionTemplates(_templateRegistry);

How can we solve it? thanks
JSmith5611
Posts: 72
Joined: Aug 11, 2015


Posted: Oct 21, 2020 @ 12:04 PM             Msg. 2 of 2
Do you have any more information on what you are doing?
I pulled the fix example from bitbucket and it ran fine (connecting to both fix and fast) .
Jason Smith